Thu 17 Apr 2008 01:16:17 AM UTC, comment #2:
Sorry for the delay. I found out that I had sytax error in the build script and I didn't had maximum debug info.
Here is new backtrace and some debug session as requested.
I hope this helps.
(gdb) bt
#0 0xb7212c66 in raise () from /lib/libc.so.6
#1 0xb7214571 in abort () from /lib/libc.so.6
#2 0xb720be60 in __assert_fail () from /lib/libc.so.6
#3 0xb7db9e2f in gnash::movie_def_impl::read_all_swf (this=0x82809c0) at movie_def_impl.cpp:701
#4 0xb7dba3f0 in gnash::MovieLoader::execute (md=0x82809c0) at movie_def_impl.cpp:119
#5 0xb7dc2085 in boost::_bi::list1<boost::_bi::value<gnash::movie_def_impl> >::operator()<void ()(gnash::movie_def_impl*), boost::_bi::list0> (this=0x82ab0a0, f=@0x82ab09c, a=@0xb5ede367)
at /usr/X11R6/include/boost-1_35/boost/bind.hpp:232
#6 0xb7dc20bd in boost::_bi::bind_t<void, void ()(gnash::movie_def_impl), boost::_bi::list1<boost::_bi::value<gnash::movie_def_impl*> > >::operator() (this=0x82ab09c)
at /usr/X11R6/include/boost-1_35/boost/bind/bind_template.hpp:20
#7 0xb7dc20d9 in boost::thread::thread_data<boost::_bi::bind_t<void, void ()(gnash::movie_def_impl), boost::_bi::list1<boost::_bi::value<gnash::movie_def_impl*> > > >::run (this=0x82aafe0)
at /usr/X11R6/include/boost-1_35/boost/thread/pthread/thread.hpp:130
#8 0xb717eb1e in thread_proxy () from /usr/lib/libboost_thread-gcc42-mt-1_35.so.1.35.0
#9 0xb7a65383 in start_thread () from /lib/libpthread.so.0
#10 0xb72be05e in clone () from /lib/libc.so.6
(gdb) break movie_def_impl.cpp:105
Breakpoint 3 at 0xb7db9a3c: file movie_def_impl.cpp, line 105.
(gdb) r
[New Thread 0xb62446d0 (LWP 22919)]
[New Thread 0xb5ec7b90 (LWP 22920)]
[Switching to Thread 0xb5ec7b90 (LWP 22920)]
Breakpoint 3, gnash::MovieLoader::isSelfThread (this=0x8280ba4) at movie_def_impl.cpp:105
105 MovieLoader::isSelfThread() const
(gdb) print _thread
$1 = {_M_ptr = 0x82aafb8}
(gdb) print *_thread
$2 = (boost::thread &) @0x82aafb8: {
thread_info_mutex = {<boost::noncopyable_::noncopyable> = {<No data fields>}, m = {__data = {__lock = 0, _count = 0, __owner = 0, __kind = 0, __nusers = 0, {__spins = 0, __list = {__next = 0x0}}}, __size = '\0' <repeats 23 times>, __align = 0}}, thread_info = {px = 0x82aafe0, pn = {pi = 0x82ab0a8}}}
(gdb) n
107 boost::mutex::scoped_lock lock(_mutex);
109 if (!_thread.get()) {
112 boost::thread this_thread;
113 return this_thread == *_thread;
(gdb) print this_thread
$3 = {thread_info_mutex = {<boost::noncopyable_::noncopyable> = {<No data fields>}, m = {__data = {__lock = 0, _count = 0, __owner = 0, __kind = 0, __nusers = 0, {__spins = 0, __list = {__next = 0x0}}}, __size = '\0' <repeats 23 times>, __align = 0}}, thread_info = {px = 0x0, pn = {pi = 0x0}}}
(gdb) print *_thread
$4 = (boost::thread &) @0x82aafb8: { thread_info_mutex = {<boost::noncopyable_::noncopyable> = {<No data fields>}, m = {__data = {__lock = 0, _count = 0, __owner = 0, __kind = 0, __nusers = 0, {__spins = 0, __list = {__next = 0x0}}}, __size = '\0' <repeats 23 times>, __align = 0}}, thread_info = {px = 0x82aafe0, pn = {pi = 0x82ab0a8}}}
(gdb) print &this_thread
$5 = (boost::thread *) 0xb5ec7198
Program received signal SIGTRAP, Trace/breakpoint trap.
0xb7c98c39 in std::auto_ptr<boost::thread>::get (this=0x8280bc0)
at /usr/lib/gcc/i486-slackware-linux/4.2.3/../../../../include/c++/4.2.3/memory:300
300 get() const throw() { return _M_ptr; }
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on"
Evaluation of the expression containing the function (std::auto_ptr<boost::thread>::get() const) will be abandoned.
(gdb) print this->_M_ptr
$6 = (boost::thread *) 0x82aafb8
|
Tue 15 Apr 2008 07:56:32 AM UTC, comment #1:
mmm, this is weird.
isSelfThread() checks MovieLoader::_thread to be the same
as the current thread (default constructed boost::thread).
The assertion is there to ensure read_all_swf is called
by the spawned thread.
Maybe this construct is unsafe:
_thread.reset(
new boost::thread(boost::bind(execute, &_movie_def))
);
IFF MovieLoader::execute gets executed before _thread.reset
(which actually makes sense), then isSelfThread would see
_thread as NULL still, and thus return false..
Could you research on that ? print value of _loader._thread.get()
from gdb ?
|
Mon 14 Apr 2008 04:37:58 PM UTC, original submission:
gtk-gnash: movie_def_impl.cpp:701: void gnash::movie_def_impl::read_all_swf(): Assertion `_loader.isSelfThread()' failed.
Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb60a6b90 (LWP 25195)]
0xb73bfc66 in raise () from /lib/libc.so.6
(gdb) bt
#0 0xb73bfc66 in raise () from /lib/libc.so.6
#1 0xb73c1571 in abort () from /lib/libc.so.6
#2 0xb73b8e60 in __assert_fail () from /lib/libc.so.6
#3 0xb7e51b64 in gnash::movie_def_impl::read_all_swf () from /usr/lib/gnash/libgnashserver-0.8.2.so
#4 0xb7e51e1d in gnash::MovieLoader::execute () from /usr/lib/gnash/libgnashserver-0.8.2.so
#5 0xb7e52528 in boost::thread::thread_data<boost::_bi::bind_t<void, void ()(gnash::movie_def_impl), boost::_bi::list1<boost::_bi::value<gnash::movie_def_impl*> > > >::run () from /usr/lib/gnash/libgnashserver-0.8.2.so
#6 0xb732bb1e in thread_proxy () from /usr/lib/libboost_thread-gcc42-mt-1_35.so.1.35.0
#7 0xb7c12383 in start_thread () from /lib/libpthread.so.0
#8 0xb746b05e in clone () from /lib/libc.so.6
This happens with any file (including the ones from gnash/testsuite/samples/).
My system is Slackware current - glibc-2.7, gcc-4.2.3, gtk+2-2.12.9
I've compiled boost-1.35.0 and agg-2.5 myself.
I have used the gnash-0.8.2 release for debugging, but the release is quite recent and I don't see any relevant to this bug changes in the CVS. I will try the CVS too if requested.
|