[Gridflow-dev] most-hated gridflow bugs

ClaudiusMaximus gloriousclaudiusmaximus at yahoo.co.uk
Tue May 10 16:13:10 EDT 2005


I'm sure there are more bugs I hate, but I can't recall them.  Listed in 
order of hatred (most hated first).  Example patches are attached, with 
backtraces for the segfaults.  My gridflow cvs compile is a month old, 
so there is a chance that these bugs are fixed already (apologies, if 
they are).

BUG1
    [#store] [put_at ...( / [reassign ...( cause segfaults.

BUG2
    [#store] sending a badly-dim'd grid to the left inlet causes segfaults.

BUG3
    [#out] JPEG fails for large images (I tried but can't reproduce this,
    I have not kept the patch that showed the error, so it's likely that it
    was something I did wrong...).

BUG4
    [#rotate] doesn't work with any type other than int32, and gives an
    obscure message that doesn't mention [#rotate] (although the
    "find last error" menu item highlights the [#rotate] correctly):

error: ArgumentError: [#inner]: same type please (in has float32\; r has 
int32)
base/flow_objects.c.fcs:579:in `void GridInner::grin_0(GridInlet*, int, 
Pt<T>) [with T = float32]'
[#inner]

-------------- next part --------------
#N canvas 0 0 419 157 10;
#X obj 13 105 #store ( 3 3 3 # 0 );
#X msg 188 45 put_at ( 1 1 0 ) \, ( 1 1 3 # 2 );
#X msg 188 15 reassign \, ( 3 3 3 # 1 );
#X msg 188 75 reassign \, ( 3 3 3 # 3 );
#X text 95 15 click 1st;
#X text 96 45 click 2nd;
#X text 95 75 click 3rd;
#X obj 13 125 #print;
#X obj 13 76 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X text 8 8 BUG1.pd;
#X connect 0 0 7 0;
#X connect 1 0 0 1;
#X connect 2 0 0 1;
#X connect 3 0 0 1;
#X connect 8 0 0 0;
-------------- next part --------------
$ ~/puredata-miller-0-38-4.sh
Pd version 0.38.4
compiled 10:09:47 Mar 20 2005
port 5400
TCL_LIBRARY="/home/claude/pd-miller-0-38-4/lib/pd/tcl/library" TK_LIBRARY="/home /claude/pd-miller-0-38-4/lib/pd/tk/library"  "/home/claude/pd-miller-0-38-4/lib/ pd/bin/pd-gui" 5400
Waiting for connection request...
... connected
device 1: tried /dev/midi READ/WRITE; returned 5
OSS: requested audio buffer size 8820 limited to 8192
OSS: issuing first ADC 'read' ... ...done.
old RUBY_STACK_END = bffff6a0
new RUBY_STACK_END = bffffffc
GridFlow::Display
GridFlow::GridEdit
GridFlow::Peephole
socket receive error: Connection reset by peer (104)
/home/claude/puredata-miller-0-38-4.sh: line 6: 29004 Segmentation fault      (core dumped) /home/claude/pd-miller-0-38-4/bin/pd

$ gdb /home/claude/pd-miller-0-38-4/bin/pd /home/claude/claudiusmaximus/core.29004
GNU gdb Red Hat Linux (6.1post-1.20040607.43rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xffffe000
Core was generated by `/home/claude/pd-miller-0-38-4/bin/pd'.
Program terminated with signal 11, Segmentation fault.

warning: svr4_current_sos: Can't read pathname for load map: Input/output error

Reading symbols from /usr/lib/libasound.so.2...done.
Loaded symbols for /usr/lib/libasound.so.2
Reading symbols from /lib/tls/librt.so.1...done.
Loaded symbols for /lib/tls/librt.so.1
Reading symbols from /usr/lib/libjack.so.0...done.
Loaded symbols for /usr/lib/libjack.so.0
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/tls/libm.so.6...done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /lib/tls/libpthread.so.0...done.
Loaded symbols for /lib/tls/libpthread.so.0
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /home/claude/pd-miller-0-38-4/lib/pd/extra/gridflow.pd_linux...done.
Loaded symbols for /home/claude/pd-miller-0-38-4/lib/pd/extra/gridflow.pd_linux
Reading symbols from /usr/lib/libruby.so.1.8...done.
Loaded symbols for /usr/lib/libruby.so.1.8
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /usr/lib/site_ruby/1.8/i386-linux/gridflow.so...done.
Loaded symbols for /usr/lib/site_ruby/1.8/i386-linux/gridflow.so
Reading symbols from /usr/lib/libusb-0.1.so.4...done.
Loaded symbols for /usr/lib/libusb-0.1.so.4
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Loaded symbols for /usr/X11R6/lib/libX11.so.6
Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
Loaded symbols for /usr/X11R6/lib/libXext.so.6
Reading symbols from /usr/lib/libSDL-1.2.so.0...done.
Loaded symbols for /usr/lib/libSDL-1.2.so.0
Reading symbols from /usr/lib/libaa.so.1...done.
Loaded symbols for /usr/lib/libaa.so.1
Reading symbols from /usr/lib/libjpeg.so.62...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /usr/lib/libpng12.so.0...done.
Loaded symbols for /usr/lib/libpng12.so.0
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libquicktime.so.0...done.
Loaded symbols for /usr/lib/libquicktime.so.0
Reading symbols from /usr/lib/libglib-1.2.so.0...done.
Loaded symbols for /usr/lib/libglib-1.2.so.0
Reading symbols from /usr/lib/libncurses.so.5...done.
Loaded symbols for /usr/lib/libncurses.so.5
Reading symbols from /usr/lib/libslang-utf8.so.1...done.
Loaded symbols for /usr/lib/libslang-utf8.so.1
Reading symbols from /usr/lib/libgpm.so.1...done.
Loaded symbols for /usr/lib/libgpm.so.1
Reading symbols from /usr/lib/ruby/1.8/i386-linux/socket.so...done.
Loaded symbols for /usr/lib/ruby/1.8/i386-linux/socket.so
Reading symbols from /usr/lib/ruby/1.8/i386-linux/fcntl.so...done.
Loaded symbols for /usr/lib/ruby/1.8/i386-linux/fcntl.so
#0  0xb7dc7955 in P (this=0xbfffd000, _p=@0x10) at grid.h.fcs:366
366     grid.h.fcs: No such file or directory.
        in grid.h.fcs
(gdb) bt
#0  0xb7dc7955 in P (this=0xbfffd000, _p=@0x10) at grid.h.fcs:366
#1  0xb7dc66b9 in PtrGrid::operator= (this=0x828b9d0, _p=0x0) at grid.h.fcs:831
#2  0xb7e7fad8 in GridStore::_1_reassign (this=0x828b998, argc=0, argv=0xbfffd868) at base/flow_objects.c.fcs:388
#3  0xb7e7fa97 in GridStore::_1_reassign_wrap (argc=0, argv=0xbfffd868, rself=3083653796) at base/flow_objects.c.fcs:388
#4  0x426167ed in rb_with_disable_interrupt () from /usr/lib/libruby.so.1.8
#5  0x42615e4c in rb_with_disable_interrupt () from /usr/lib/libruby.so.1.8
#6  0x42617174 in rb_with_disable_interrupt () from /usr/lib/libruby.so.1.8
#7  0x42617544 in rb_funcall2 () from /usr/lib/libruby.so.1.8
#8  0xb7ddd60f in send_in_2 (h=0xbfffd580) at base/main.c.fcs:176
#9  0x42615423 in rb_ensure () from /usr/lib/libruby.so.1.8
#10 0xb7ddd800 in FObject::send_in (this=0x828b998, argc=2, argv=0xbfffd860) at base/main.c.fcs:185
#11 0xb7ddd767 in FObject::send_in_wrap (argc=2, argv=0xbfffd860, rself=3083653796) at base/main.c.fcs:183
#12 0x426167ed in rb_with_disable_interrupt () from /usr/lib/libruby.so.1.8
#13 0x42615e4c in rb_with_disable_interrupt () from /usr/lib/libruby.so.1.8
#14 0x42617174 in rb_with_disable_interrupt () from /usr/lib/libruby.so.1.8
#15 0x42617544 in rb_funcall2 () from /usr/lib/libruby.so.1.8
#16 0xb7ffa00c in BFObject_method_missing_1 (fm=0xbfffdaa0) at bridge/puredata.c.fcs:226
#17 0x4261508b in rb_rescue2 () from /usr/lib/libruby.so.1.8
#18 0xb7ffa176 in BFObject_method_missing (bself=0x82812e8, winlet=1, selector=0x82511a0, ac=0, at=0x80f8370) at bridge/puredata.c.fcs:247
#19 0xb7ffa1df in BFProxy_method_missing (self=0x8293d98, s=0x82511a0, argc=0, argv=0x80f8370) at bridge/puredata.c.fcs:260
#20 0x08095308 in pd_typedmess (x=0x0, s=0x82511a0, argc=0, argv=0x80f8370) at m_class.c:749
#21 0x08095308 in pd_typedmess (x=0x80f8370, s=0x82511a0, argc=0, argv=0x80f8370) at m_class.c:749
#22 0x08096d47 in outlet_anything (x=0xbfffd000, s=0x82511a0, argc=0, argv=0x80f8370) at m_obj.c:445
#23 0x08095308 in pd_typedmess (x=0x829b1b0, s=0x82511a0, argc=0, argv=0x80f8370) at m_class.c:749
#24 0x08099747 in binbuf_eval (x=0x10, target=0x82d9d40, argc=137207132, argv=0x805dc04) at m_binbuf.c:581
#25 0x0805dc04 in text_click (z=0x82d9d40, glist=0xff, xpix=137270280, ypix=134711973, shift=137207132, alt=-1073750728, dbl=255, doit=1) at g_text.c:300
Previous frame inner to this frame (corrupt stack?)
-------------- next part --------------
#N canvas 0 0 175 93 10;
#X obj 14 39 #store ( 3 3 3 # 0 );
#X obj 14 64 #print;
#X msg 14 16 1;
#X text 50 16 click 1st;
#X text 89 63 BUG2.pd;
#X connect 0 0 1 0;
#X connect 2 0 0 0;
-------------- next part --------------
$ ~/puredata-miller-0-38-4.sh
Pd version 0.38.4
compiled 10:09:47 Mar 20 2005
port 5400
TCL_LIBRARY="/home/claude/pd-miller-0-38-4/lib/pd/tcl/library" TK_LIBRARY="/home/claude/pd-miller-0-38-4/lib/pd/tk/library"  "/home/claude/pd-miller-0-38-4/lib/pd/bin/pd-gui" 5400
Waiting for connection request...
... connected
device 1: tried /dev/midi READ/WRITE; returned 5
OSS: requested audio buffer size 8820 limited to 8192
OSS: issuing first ADC 'read' ... ...done.
old RUBY_STACK_END = bffff6a0
new RUBY_STACK_END = bffffffc
GridFlow::Display
GridFlow::GridEdit
GridFlow::Peephole
BUFFER OVERFLOW: 0x082782b8[-1]=0x082782b4 is not in 0x082782b8..0x082782f8
at: T& Pt<T>::operator[](ptrdiff_t) [with T = int32]
socket receive error: Connection reset by peer (104)
/home/claude/puredata-miller-0-38-4.sh: line 6: 29164 Segmentation fault      (core dumped) /home/claude/pd-miller-0-38-4/bin/pd

$ gdb /home/claude/pd-miller-0-38-4/bin/pd /home/claude/claudiusmaximus/core.29164
GNU gdb Red Hat Linux (6.1post-1.20040607.43rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xffffe000
Core was generated by `/home/claude/pd-miller-0-38-4/bin/pd'.
Program terminated with signal 11, Segmentation fault.

warning: svr4_current_sos: Can't read pathname for load map: Input/output error

Reading symbols from /usr/lib/libasound.so.2...done.
Loaded symbols for /usr/lib/libasound.so.2
Reading symbols from /lib/tls/librt.so.1...done.
Loaded symbols for /lib/tls/librt.so.1
Reading symbols from /usr/lib/libjack.so.0...done.
Loaded symbols for /usr/lib/libjack.so.0
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/tls/libm.so.6...done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /lib/tls/libpthread.so.0...done.
Loaded symbols for /lib/tls/libpthread.so.0
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /home/claude/pd-miller-0-38-4/lib/pd/extra/gridflow.pd_linux...done.
Loaded symbols for /home/claude/pd-miller-0-38-4/lib/pd/extra/gridflow.pd_linux
Reading symbols from /usr/lib/libruby.so.1.8...done.
Loaded symbols for /usr/lib/libruby.so.1.8
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /usr/lib/site_ruby/1.8/i386-linux/gridflow.so...done.
Loaded symbols for /usr/lib/site_ruby/1.8/i386-linux/gridflow.so
Reading symbols from /usr/lib/libusb-0.1.so.4...done.
Loaded symbols for /usr/lib/libusb-0.1.so.4
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Loaded symbols for /usr/X11R6/lib/libX11.so.6
Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
Loaded symbols for /usr/X11R6/lib/libXext.so.6
Reading symbols from /usr/lib/libSDL-1.2.so.0...done.
Loaded symbols for /usr/lib/libSDL-1.2.so.0
Reading symbols from /usr/lib/libaa.so.1...done.
Loaded symbols for /usr/lib/libaa.so.1
Reading symbols from /usr/lib/libjpeg.so.62...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /usr/lib/libpng12.so.0...done.
Loaded symbols for /usr/lib/libpng12.so.0
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libquicktime.so.0...done.
Loaded symbols for /usr/lib/libquicktime.so.0
Reading symbols from /usr/lib/libglib-1.2.so.0...done.
Loaded symbols for /usr/lib/libglib-1.2.so.0
Reading symbols from /usr/lib/libncurses.so.5...done.
Loaded symbols for /usr/lib/libncurses.so.5
Reading symbols from /usr/lib/libslang-utf8.so.1...done.
Loaded symbols for /usr/lib/libslang-utf8.so.1
Reading symbols from /usr/lib/libgpm.so.1...done.
Loaded symbols for /usr/lib/libgpm.so.1
Reading symbols from /usr/lib/ruby/1.8/i386-linux/socket.so...done.
Loaded symbols for /usr/lib/ruby/1.8/i386-linux/socket.so
Reading symbols from /usr/lib/ruby/1.8/i386-linux/fcntl.so...done.
Loaded symbols for /usr/lib/ruby/1.8/i386-linux/fcntl.so
#0  0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0x4125c624 in raise () from /lib/tls/libpthread.so.0
#2  0xb7ffccb4 in Pt<int>::operator[] (this=0x82782ac, i=-1) at grid.h.fcs:308
#3  0xb7dc6dbf in Dim::get (this=0x8278298, i=-1) at grid.h.fcs:542
#4  0xb7e94f87 in GridStore::grin_0<int> (this=0x828b998, in=0x8272fc0, n=-1, data={p = 0x0, start = 0x0, n = 0}) at base/flow_objects.c.fcs:260
#5  0xb7e89de7 in GridStore::grinw_0<int> (in=0x8272fc0, n=-1, data={p = 0x0, start = 0x0, n = 0}) at base/flow_objects.c.fcs:255
#6  0xb7dc6aec in GridHandler::flow (this=0xb7f53f80, in=0x8272fc0, n=-1, data={p = 0x0, start = 0x0, n = 0}) at grid.h.fcs:889
#7  0xb7dc98bf in GridInlet::from_grid2<int> (this=0x8272fc0, g=0xbfffd010, foo=0) at base/grid.c.fcs:282
#8  0xb7dc2989 in GridInlet::from_grid (this=0x8272fc0, g=0xbfffd010) at base/grid.c.fcs:318
#9  0xb7dc714d in GridInlet::from_ruby (this=0x8272fc0, argc=1, argv=0xbfffd394) at grid.h.fcs:925
#10 0xb7dc4b34 in GridObject::method_missing (this=0x828b998, argc=2, argv=0xbfffd390) at base/grid.c.fcs:575
#11 0xb7dc46fb in GridObject::method_missing_wrap (argc=2, argv=0xbfffd390, rself=3083653796) at base/grid.c.fcs:546
#12 0x426167ed in rb_with_disable_interrupt () from /usr/lib/libruby.so.1.8
#13 0x42615e4c in rb_with_disable_interrupt () from /usr/lib/libruby.so.1.8
#14 0x42617174 in rb_with_disable_interrupt () from /usr/lib/libruby.so.1.8
#15 0x42617544 in rb_funcall2 () from /usr/lib/libruby.so.1.8
#16 0x42615a55 in rb_with_disable_interrupt () from /usr/lib/libruby.so.1.8
#17 0x4261705e in rb_with_disable_interrupt () from /usr/lib/libruby.so.1.8
#18 0x42617544 in rb_funcall2 () from /usr/lib/libruby.so.1.8
#19 0xb7ddd60f in send_in_2 (h=0xbfffd710) at base/main.c.fcs:176
#20 0x42615423 in rb_ensure () from /usr/lib/libruby.so.1.8
#21 0xb7ddd800 in FObject::send_in (this=0x828b998, argc=3, argv=0xbfffd9f0) at base/main.c.fcs:185
#22 0xb7ddd767 in FObject::send_in_wrap (argc=3, argv=0xbfffd9f0, rself=3083653796) at base/main.c.fcs:183
#23 0x426167ed in rb_with_disable_interrupt () from /usr/lib/libruby.so.1.8
#24 0x42615e4c in rb_with_disable_interrupt () from /usr/lib/libruby.so.1.8
#25 0x42617174 in rb_with_disable_interrupt () from /usr/lib/libruby.so.1.8
#26 0x42617544 in rb_funcall2 () from /usr/lib/libruby.so.1.8
#27 0xb7ffa00c in BFObject_method_missing_1 (fm=0xbfffdc30) at bridge/puredata.c.fcs:226
#28 0x4261508b in rb_rescue2 () from /usr/lib/libruby.so.1.8
#29 0xb7ffa176 in BFObject_method_missing (bself=0x825f5f0, winlet=0, selector=0x80f6bb8, ac=1, at=0xbfffdc98) at bridge/puredata.c.fcs:247
#30 0xb7ffa1aa in BFObject_method_missing0 (self=0x825f5f0, s=0x80f6bb8, argc=1, argv=0xbfffdc98) at bridge/puredata.c.fcs:255
#31 0x080948b4 in pd_defaultfloat (x=0x71ec, f=0) at m_class.c:68
#32 0x08096c18 in outlet_float (x=0xb, f=1) at m_obj.c:391
#33 0x080997c3 in binbuf_eval (x=0x0, target=0x8267328, argc=136737604, argv=0x805dc04) at m_binbuf.c:584
#34 0x0805dc04 in text_click (z=0x8267328, glist=0x1c, xpix=137270280, ypix=134711973, shift=136737604, alt=-1073750728, dbl=28, doit=1) at g_text.c:300
Previous frame inner to this frame (corrupt stack?)
-------------- next part --------------
#N canvas 0 0 309 201 10;
#X obj 36 169 #out;
#X msg 100 22 open BUG3.jpg;
#X obj 100 82 # rand;
#X msg 100 122 close;
#X text 28 22 click 1st;
#X text 28 62 click 2nd;
#X text 28 122 click 3rd;
#X text 187 141 BUG3.pd;
#X msg 100 62 ( 4096 4096 3 int32 # 256 );
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 8 0 2 0;
-------------- next part --------------
#N canvas 0 0 298 221 10;
#X obj 40 128 #remap_image;
#X obj 171 157 #cast int32;
#X obj 40 31 # rand;
#X msg 40 9 ( 240 320 3 # 256 );
#X obj 171 127 #rotate 3600;
#X obj 40 184 #out window;
#X text 187 8 click 1st;
#X text 172 190 BUG4.pd;
#X obj 40 54 #convolve ( 16 1 # 1 );
#X obj 40 77 # >> 4;
#X obj 171 99 #cast float32;
#X connect 0 0 5 0;
#X connect 0 1 10 0;
#X connect 1 0 0 1;
#X connect 2 0 8 0;
#X connect 3 0 2 0;
#X connect 4 0 1 0;
#X connect 8 0 9 0;
#X connect 9 0 0 0;
#X connect 10 0 4 0;
-------------- next part --------------
reading startup file: /home/claude/.pdrc
input channels = 2, output channels = 2
opened 1 MIDI input device(s) and 1 MIDI output device(s).
input channels = 2, output channels = 2
opened /dev/dsp for reading and writing

opened audio output on /dev/dsp\; got 2 channels
bytes per sample = 2
setting nfrags = 8, fragsize 1024

audiobuffer set to 50 msec
opened audio input device /dev/dsp\; got 2 channels
bytes per sample = 2
tried /mnt/jam/claude/public/claudiusmaximus/gridflow.pd_linux and failed
tried ./gridflow.pd_linux and failed
tried /home/claude/pd-miller-0-38-4/lib/pd/extra/gridflow.pd_linux and succeeded
setting up Ruby-for-PureData...
we are using Ruby version 1.8.2
(done)
[gf] This is GridFlow 0.7.8 within Ruby version 1.8.2
[gf] base/main.c was compiled on Apr 11 2005, 05:46:58
[gf] startup_cpu: using MMX optimisations


More information about the Gridflow-dev mailing list