[GEM-dev] painful crashes in pd37test2+3 gem0.888cvs

ben at ekran.org ben at ekran.org
Wed Jan 14 19:51:45 CET 2004


Below is a long email I wrote while getting to the root of my crashes. I'm
not sure how these relate to the libGL ones, but they occur at the same
time... either the same problem or two different ones. Anyhow I have a
patch that exhibits the crash, at least on this machine!

Hopefully it'll help.

Hey All,

I've narrowed the cause of my libGL (and libc) crashes to sending the
gemwin a  "1" message to start rendering. This does not happen when I
first open a patch, but happens after the patch is running for a while.
Anyhow this one I got today was not nvidia's fault:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 1916)]
0x40117f1d in _int_malloc () from /lib/i686/libc.so.6
(gdb) where
#0  0x40117f1d in _int_malloc () from /lib/i686/libc.so.6
#1  0x4011706c in malloc () from /lib/i686/libc.so.6
#2  0x40bc269e in operator new(unsigned) () from /usr/lib/libstdc++.so.5
#3  0x403577e9 in gemhead::startRendering() ()
   from /home/bbogart/gem/gemcvs/Gem.pd_linux
#4  0x402eee7c in GemMan::startRendering() ()
   from /home/bbogart/gem/gemcvs/Gem.pd_linux
#5  0x4035a11d in gemwin::intMess(int) ()
   from /home/bbogart/gem/gemcvs/Gem.pd_linux
#6  0x4035b49c in gemwin::floatMessCallback(void*, float) ()
   from /home/bbogart/gem/gemcvs/Gem.pd_linux
#7  0x080951d2 in pd_float (x=0x1, f=4.51218106e-43) at m_pd.c:274
#8  0x0809720c in outlet_float (x=0x401d3a28, f=1) at m_obj.c:355
#9  0x080951d2 in pd_float (x=0x1, f=4.48891538e-34) at m_pd.c:274
#10 0x080951d2 in pd_float (x=0x1, f=6.19402981) at m_pd.c:274
#11 0x0809720c in outlet_float (x=0x401d3a28, f=1) at m_obj.c:355
#12 0x080951d2 in pd_float (x=0x1, f=4.44994039e-34) at m_pd.c:274
#13 0x0808cef4 in toggle_newclick (z=0x813dfe8, glist=0x808ce70,
    xpix=135520232, ypix=134713638, shift=135520232, alt=135517760, dbl=32,
    doit=322) at g_toggle.c:252
#14 0x0808ce70 in toggle_click () at g_toggle.c:252
#15 0x0813dfe8 in ?? ()
#16 0x0813d640 in ?? ()
#17 0x00000020 in ?? ()
#18 0x00000142 in ?? ()

Ok I tried one of the example patches (04.moveimages) turn everything on,
and then hit 0,1 on the gemwin and segfault:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 2128)]
0x40117f1d in _int_malloc () from /lib/i686/libc.so.6
(gdb) where
#0  0x40117f1d in _int_malloc () from /lib/i686/libc.so.6
#1  0x4011706c in malloc () from /lib/i686/libc.so.6
#2  0x40bc269e in operator new(unsigned) () from /usr/lib/libstdc++.so.5
#3  0x403577e9 in gemhead::startRendering() ()
   from /home/bbogart/gem/gemcvs/Gem.pd_linux
#4  0x402eee7c in GemMan::startRendering() ()
   from /home/bbogart/gem/gemcvs/Gem.pd_linux
#5  0x4035a11d in gemwin::intMess(int) ()
   from /home/bbogart/gem/gemcvs/Gem.pd_linux
#6  0x4035b49c in gemwin::floatMessCallback(void*, float) ()
   from /home/bbogart/gem/gemcvs/Gem.pd_linux
#7  0x080951d2 in pd_float (x=0x1, f=0) at m_pd.c:274
#8  0x0809720c in outlet_float (x=0x401d3a28, f=1) at m_obj.c:355
#9  0x080951d2 in pd_float (x=0x1, f=0) at m_pd.c:274
#10 0x080997f3 in binbuf_eval (x=0x1, target=0x812990c, argc=0,
argv=0x805f69e)
    at m_binbuf.c:582
#11 0x401d3a30 in main_arena () from /lib/i686/libc.so.6
#12 0x401d2fd8 in __DTOR_END__ () from /lib/i686/libc.so.6
#13 0xbfffcd98 in ?? ()
#14 0x4011744c in realloc () from /lib/i686/libc.so.6
Previous frame inner to this frame (corrupt stack?)

04.MoveSpheres also does it:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 2132)]
0x40117f1d in _int_malloc () from /lib/i686/libc.so.6
(gdb) where
#0  0x40117f1d in _int_malloc () from /lib/i686/libc.so.6
#1  0x4011706c in malloc () from /lib/i686/libc.so.6
#2  0x40bc269e in operator new(unsigned) () from /usr/lib/libstdc++.so.5
#3  0x403577e9 in gemhead::startRendering() ()
   from /home/bbogart/gem/gemcvs/Gem.pd_linux
#4  0x402eee7c in GemMan::startRendering() ()
   from /home/bbogart/gem/gemcvs/Gem.pd_linux
#5  0x4035a11d in gemwin::intMess(int) ()
   from /home/bbogart/gem/gemcvs/Gem.pd_linux
#6  0x4035b49c in gemwin::floatMessCallback(void*, float) ()
   from /home/bbogart/gem/gemcvs/Gem.pd_linux
#7  0x080951d2 in pd_float (x=0x1, f=-nan(0x7fffff)) at m_pd.c:274
#8  0x0809720c in outlet_float (x=0x401d3a28, f=1) at m_obj.c:355
#9  0x080951d2 in pd_float (x=0x1, f=0) at m_pd.c:274
#10 0x080997f3 in binbuf_eval (x=0x1, target=0x812a1a4, argc=0,
argv=0x805f69e)
    at m_binbuf.c:582
#11 0x401d3a30 in main_arena () from /lib/i686/libc.so.6
#12 0x401d2fd8 in __DTOR_END__ () from /lib/i686/libc.so.6
#13 0xbfffcd98 in ?? ()
#14 0x4011744c in realloc () from /lib/i686/libc.so.6
Previous frame inner to this frame (corrupt stack?)

Well I'm attaching a crash patch that segfaults with: (test2)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 2220)]
0x4011875e in malloc_consolidate () from /lib/i686/libc.so.6
(gdb) where
#0  0x4011875e in malloc_consolidate () from /lib/i686/libc.so.6
#1  0x4011863a in _int_free () from /lib/i686/libc.so.6
#2  0x401189f9 in _int_realloc () from /lib/i686/libc.so.6
#3  0x40117392 in realloc () from /lib/i686/libc.so.6
#4  0x08098459 in resizebytes (old=0x401d3a7c, oldsize=1075657248,
    newsize=1075654616) at m_memory.c:55
#5  0x00000030 in ?? ()
#6  0xbfffd8c0 in ?? ()
#7  0x081d83d0 in ?? ()
#8  0x080989a9 in binbuf_text (x=0x105, text=0x80f6888 "¨h\017\b\005\001",
    size=32) at m_binbuf.c:191
#9  0x0809fcc6 in socketreceiver_read (x=0x80f6888, fd=261) at s_inter.c:271
Previous frame inner to this frame (corrupt stack?)

Well the damn patch behaves differently in test3 in fact:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 2332)]
0x40117f1d in _int_malloc () from /lib/i686/libc.so.6
(gdb) where
#0  0x40117f1d in _int_malloc () from /lib/i686/libc.so.6
#1  0x40117955 in calloc () from /lib/i686/libc.so.6
#2  0x080984b6 in getbytes (nbytes=1) at m_memory.c:24
#3  0x08096453 in gensym (s=0xbfffd4f0 "Control_L") at m_class.c:477
#4  0x08098ab5 in binbuf_text (x=0xfc1, text=0x80f6890 "°h\017\bÁ\017",
    size=28) at m_binbuf.c:176
#5  0x08128798 in ?? ()
#6  0x080ec268 in ?? ()

Yup thats "control_l" if you hit the left control it crashes immediatly.
But only if the metro is attached to the gemchain.

Alright, I'm giving up for today.

Maybe I'm losing my mind... Please let me know if anyone can reproduce this.

Thanks
Ben


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01.redSquare-crash.pd
Type: application/octet-stream
Size: 2540 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/gem-dev/attachments/20040114/e58a2711/attachment.obj>


More information about the GEM-dev mailing list