[flext] segfault sending message from Threads

Spencer Russell spencer.f.russell at gmail.com
Mon Nov 21 07:02:55 CET 2011


I'm having some segfault issues that I think are related to messages
being queued up by threads, but then the object is destroyed before
the messages actually get sent out the outlets. When the message
finally gets to the front of the queue it tries to send it out of a
non-existent outlet and segfaults.

Should i be doing some thing in my object destructor to make sure that
the queue gets cleared out before the object goes out of scope?

Here's a backtrace. Thanks,
Spencer

pd_typedmess (x=0xc4da80, s=0xbe79e0, argc=2, argv=0xbf5690) at m_class.c:708
708	    for (i = c->c_nmethod, m = c->c_methods; i--; m++)
(gdb) bt
#0  pd_typedmess (x=0xc4da80, s=0xbe79e0, argc=2, argv=0xbf5690) at
m_class.c:708
#1  0x0000000000471c1a in outlet_anything (x=<value optimized out>,
s=0xbe79e0, argc=2, argv=0xbf5690) at m_obj.c:442
#2  0x00007fffe8e8df23 in flext_base_multi_d::ToSysAnything
(this=0xbfba00, n=0, s=0xbe79e0, argc=2, argv=0xbf5690)
    at source/flclass.h:865
#3  0x00007fffe8e924b3 in flext_multi_d::MsgBundle::Msg::Send
(this=0xbf5668) at source/flqueue.cpp:270
#4  0x00007fffe8e920a2 in flext_multi_d::MsgBundle::Send
(this=0xbf5660) at source/flqueue.cpp:190
#5  0x00007fffe8e9122e in QWork (syslock=true, flushobj=0x0) at
source/flqueue.cpp:398
#6  0x00007fffe8e913df in flext_base_multi_d::QWorker () at
source/flqueue.cpp:507
#7  0x00007fffe8e883da in LaunchHelper (e=0xbf4f80) at source/flthr.cpp:159
#8  0x00007ffff702bd8c in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#9  0x00007ffff6d7704d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000000000 in ?? ()


More information about the flext mailing list