part_render crash when speed is set high
Brought to you by:
zmoelnig
I have a particle system with part_head with no arguments (defaults to 1000 particles max).
I use part_render and start rendering.
Then I set part_head's speed to eg. 300, then my pd crash.
My system is: PD 0.42.5 - GEM 0.92.2 - Ubuntu 9.04 64 bit - NVIDIA GTX 260
Anonymous
file to reproduce the bug
pd crash with Segmentation fault
with -verbose flag the console says "Errore del bus" (italian) -> "Bus error" (I think this is the translation) when the crash occur
could you provide a backtrace of the crash?
on linux/osx/similar you can use gdb for producing one:
$ gdb -args /path/to/pd -lib Gem -open /my/faulty/patch.pd
[...]
(gdb) run
[... do something to trigger the crasher bug ...]
(gdb) backtrace
[...]
Hi Iohannes,
this is the gdb output when pd crashed:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fcb6c31b6f0 (LWP 16777)]
pd_typedmess (x=0x3f8000003f800000, s=0x1ca5e60, argc=2, argv=0x7fff74341e90)
at m_class.c:635
635 t_class *c = *x;
this is the gdb backtrace:
#0 pd_typedmess (x=0x3f8000003f800000, s=0x1ca5e60, argc=2,
argv=0x7fff74341e90) at m_class.c:635
#1 0x0000000000469b9a in outlet_anything (x=<value optimized out>,
s=0x1ca5e60, argc=2, argv=0x7fff74341e90) at m_obj.c:390
#2 0x00007fcb6a178105 in GemBase::continueRender ()
from /usr/local/lib/pd/extra/Gem.pd_linux
#3 0x00007fcb6a20188d in part_render::render ()
from /usr/local/lib/pd/extra/Gem.pd_linux
#4 0x00007fcb6a178163 in GemBase::gem_renderMess ()
from /usr/local/lib/pd/extra/Gem.pd_linux
#5 0x000000000046703a in pd_typedmess (x=0x25fe200, s=0x1ca5e60, argc=2,
argv=0x7fff74341e90) at m_class.c:681
#6 0x0000000000469b9a in outlet_anything (x=<value optimized out>,
s=0x1ca5e60, argc=2, argv=0x7fff74341ff0) at m_obj.c:390
#7 0x00007fcb6a178105 in GemBase::continueRender ()
from /usr/local/lib/pd/extra/Gem.pd_linux
#8 0x00007fcb6a17816e in GemBase::gem_renderMess ()
from /usr/local/lib/pd/extra/Gem.pd_linux
#9 0x000000000046703a in pd_typedmess (x=0x2623c10, s=0x1ca5e60, argc=2,
argv=0x7fff74341e90) at m_class.c:681
#10 0x0000000000469b9a in outlet_anything (x=<value optimized out>,
s=0x1ca5e60, argc=2, argv=0x7fff743420f0) at m_obj.c:390
#11 0x00007fcb6a178105 in GemBase::continueRender ()
#12 0x00007fcb6a17816e in GemBase::gem_renderMess ()
from /usr/local/lib/pd/extra/Gem.pd_linux
#13 0x000000000046703a in pd_typedmess (x=0x26239f0, s=0x1ca5e60, argc=2,
argv=0x7fff74341e90) at m_class.c:681
#14 0x0000000000469b9a in outlet_anything (x=<value optimized out>,
s=0x1ca5e60, argc=2, argv=0x7fff743421f0) at m_obj.c:390
#15 0x00007fcb6a178105 in GemBase::continueRender ()
from /usr/local/lib/pd/extra/Gem.pd_linux
#16 0x00007fcb6a17816e in GemBase::gem_renderMess ()
from /usr/local/lib/pd/extra/Gem.pd_linux
#17 0x000000000046703a in pd_typedmess (x=0x25fe080, s=0x1ca5e60, argc=2,
argv=0x7fff74341e90) at m_class.c:681
#18 0x0000000000469b9a in outlet_anything (x=<value optimized out>,
s=0x1ca5e60, argc=2, argv=0x7fff743422f0) at m_obj.c:390
#19 0x00007fcb6a178105 in GemBase::continueRender ()
from /usr/local/lib/pd/extra/Gem.pd_linux
#20 0x00007fcb6a17816e in GemBase::gem_renderMess ()
from /usr/local/lib/pd/extra/Gem.pd_linux
#21 0x000000000046703a in pd_typedmess (x=0x25ffe40, s=0x1ca5e60, argc=2,
argv=0x7fff74341e90) at m_class.c:681
#22 0x0000000000469b9a in outlet_anything (x=<value optimized out>,
s=0x1ca5e60, argc=2, argv=0x7fff743423f0) at m_obj.c:390
#23 0x00007fcb6a1c8f33 in gemhead::renderGL ()
from /usr/local/lib/pd/extra/Gem.pd_linux
#24 0x00007fcb6a197e2b in GemMan::renderChain ()
from /usr/local/lib/pd/extra/Gem.pd_linux
#25 0x00007fcb6a1983d4 in GemMan::render ()
from /usr/local/lib/pd/extra/Gem.pd_linux
#26 0x0000000000474db6 in m_mainloop () at m_sched.c:372
#27 0x0000000000479fcd in sys_main (argc=<value optimized out>,
argv=<value optimized out>) at s_main.c:313
#28 0x00007fcb6b3085a6 in __libc_start_main () from /lib/libc.so.6
#29 0x00000000004107f9 in _start () at ../sysdeps/x86_64/elf/start.S:113
Thanks a lot!
dario
thanks for the backtrace
could you also provide a minimal patch triggering the crash?
there was an obvious allocation problem, which i have no fixed in both trunk and branch/0.92
http://pd-gem.svn.sourceforge.net/viewvc/pd-gem?view=rev&revision=3260
could you try and tell whether this fixes the problem?
I've substituted the two files (part_render.cpp and part_render.h) in my gem 0.92.2 folder.
Then make give me the following error:
part_render.cpp:17: error: stray ‘#’ in program
part_render.cpp:17:66: error: invalid suffix "px" on integer constant
part_render.cpp:17: error: stray ‘#’ in program
part_render.cpp:17:95: error: invalid suffix "px" on integer constant
part_render.cpp:17:158: error: exponent has no digits
part_render.cpp:17:190: error: exponent has no digits
part_render.cpp:27:23: warning: character constant too long for its type
part_render.cpp:28:32: warning: character constant too long for its type
part_render.cpp:29:39: error: empty character constant
part_render.cpp:167:16: warning: character constant too long for its type
part_render.cpp:167:126: warning: character constant too long for its type
part_render.cpp:167:153: warning: unknown escape sequence '\/'
part_render.cpp:167:153: warning: character constant too long for its type
part_render.cpp:238: error: stray ‘#’ in program
part_render.cpp:240: error: stray ‘#’ in program
part_render.cpp:241: error: stray ‘#’ in program
part_render.cpp:243: error: stray ‘#’ in program
part_render.cpp:366:103: error: too many decimal points in number
part_render.cpp:5: error: expected unqualified-id before ‘<’ token
part_render.cpp:17: error: expected constructor, destructor, or type conversion before ‘.’ token
part_render.cpp:17: error: expected constructor, destructor, or type conversion before ‘.’ token
part_render.cpp:17: error: expected unqualified-id before ‘<’ token
part_render.cpp:23: error: expected constructor, destructor, or type conversion before ‘=’ token
part_render.cpp:24: error: expected unqualified-id before ‘<’ token
part_render.cpp:28: error: ‘var’ does not name a type
part_render.cpp:29: error: ‘var’ does not name a type
part_render.cpp:30: error: expected unqualified-id before ‘<’ token
part_render.cpp:35: error: expected constructor, destructor, or type conversion before ‘.’ token
part_render.cpp:36: error: expected unqualified-id before ‘<’ token
part_render.cpp:66: error: expected unqualified-id before ‘<’ token
part_render.cpp:67: error: expected unqualified-id before ‘<’ token
part_render.cpp:68: error: ‘SCM’ does not name a type
part_render.cpp:74: error: expected constructor, destructor, or type conversion before ‘-’ token
part_render.cpp:87: error: expected constructor, destructor, or type conversion before ‘<’ token
part_render.cpp:94: error: expected unqualified-id before numeric constant
part_render.cpp:107: error: expected constructor, destructor, or type conversion before ‘<’ token
part_render.cpp:117: error: expected constructor, destructor, or type conversion before ‘<’ token
part_render.cpp:127: error: expected constructor, destructor, or type conversion before ‘<’ token
part_render.cpp:134: error: expected constructor, destructor, or type conversion before ‘.’ token
part_render.cpp:168: error: expected constructor, destructor, or type conversion before ‘++’ token
part_render.cpp:170: error: expected unqualified-id before ‘<’ token
part_render.cpp:238: error: expected constructor, destructor, or type conversion before ‘.’ token
part_render.cpp:238: error: expected unqualified-id before ‘<’ token
part_render.cpp:240: error: expected constructor, destructor, or type conversion before ‘.’ token
part_render.cpp:240: error: expected unqualified-id before ‘<’ token
part_render.cpp:241: error: expected constructor, destructor, or type conversion before ‘/’ token
part_render.cpp:241: error: expected unqualified-id before ‘<’ token
part_render.cpp:243: error: expected constructor, destructor, or type conversion before ‘.’ token
part_render.cpp:243: error: expected unqualified-id before ‘<’ token
part_render.cpp:263: error: expected unqualified-id before ‘<’ token
part_render.cpp:270: error: expected unqualified-id before ‘<’ token
make[1]: *** [part_render.o] Errore 1
I'm miss something?
PS: I'm trying to compile the sources downloaded from http://pd-gem.svn.sourceforge.net/viewvc/pd-gem/branches/
But I'm not able to start the compilation:
when I run ~/pd/source/gem-0.92-2-part_render/src$ ./autogen the console tell me "Nessun file o directory" (No file or directory)
No problem in the old 0.92-2 source.
Don't know what to do now, sorry
thanks, dario
sorry for the last comment...
solved the autogen problem with "sh autogen.sh"
I've compiled succesfully the source from http://pd-gem.svn.sourceforge.net/viewvc/pd-gem/branches/
After the first tests it's seems to be ok!!!
Thanks a lot!!! for the patch and GEM develop!!!
ciao, dario
cool that it works
when downloading svn-snapshot via viewvc, all the executable flags are stripped away (i guess that's for safety reasons)
ok, tested again and no more crashes.
for the flags stripped... ok, now I know what's the problem (sorry, sometimes I'm a noob). so thanks again.
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).