noreply at rubyforge.org
2011-Jan-21 09:36 UTC
[wxruby-development] [ wxruby-Bugs-28871 ] Segfault in GC_mark_wxFrame (ptr=0x2184ee0) at src/wx.cpp:2519
Bugs item #28871, was opened at 2011-01-21 09:36 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=218&aid=28871&group_id=35 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Florian Hars (fhars) Assigned to: Nobody (None) Summary: Segfault in GC_mark_wxFrame (ptr=0x2184ee0) at src/wx.cpp:2519 Initial Comment: I have an application that uses a lot of timers owned by short lived frames, and it occasionally dies with: /usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86_64-linux/lib/wx/classes/timer.rb:87: [BUG] Segmentation fault ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux] Stacktrace below. The value pointed to by ptr in line #6 is (gdb) x/g ptr 0x2184ee0: 0x00007f3b2f4970b0 (gdb) x/16g *(long *)ptr 0x7f3b2f4970b0 <_ZTV8wxWindow+16>: 0x00007f3b2f0c7640 0x00007f3b2f0cd220 0x7f3b2f4970c0 <_ZTV8wxWindow+32>: 0x00007f3b2f0cd070 0x00007f3b2e7fc540 0x7f3b2f4970d0 <_ZTV8wxWindow+48>: 0x00007f3b2e7fc550 0x00007f3b2e8442f0 0x7f3b2f4970e0 <_ZTV8wxWindow+64>: 0x00007f3b2e8433b0 0x00007f3b2f1bcbf0 0x7f3b2f4970f0 <_ZTV8wxWindow+80>: 0x00007f3b2f1bd200 0x00007f3b2f1bbac0 0x7f3b2f497100 <_ZTV8wxWindow+96>: 0x00007f3b2f1bbad0 0x00007f3b2e8434a0 0x7f3b2f497110 <_ZTV8wxWindow+112>: 0x00007f3b2e8434e0 0x00007f3b2e8434f0 0x7f3b2f497120 <_ZTV8wxWindow+128>: 0x00007f3b2e843500 0x00007f3b2f0ca2a0 (gdb) l 2514 GC_mark_wxWindow(ptr); 2515 2516 wxFrame* wx_frame = (wxFrame*)ptr; 2517 // Then mark the MenuBar, if one is associated with this Frame 2518 2519 wxMenuBar* menu_bar = wx_frame->GetMenuBar(); 2520 if ( menu_bar ) 2521 { GC_mark_MenuBarBelongingToFrame(menu_bar); } 2522 } 2523 #0 0x00007f3b325d1ba5 in raise () from /lib/libc.so.6 #1 0x00007f3b325d56b0 in abort () from /lib/libc.so.6 #2 0x00007f3b33433cd3 in rb_bug (fmt=0x7f3b334cbc4c "Segmentation fault") at error.c:213 #3 0x00007f3b3349babc in sigsegv (sig=11) at signal.c:634 #4 <signal handler called> #5 0x0000000000000000 in ?? () #6 0x00007f3b311eaf41 in GC_mark_wxFrame (ptr=0x2184ee0) at src/wx.cpp:2519 #7 0x00007f3b334563cf in mark_locations_array (x=0x1554390, n=17978) at gc.c:684 #8 0x00007f3b33435039 in thread_mark (th=0x258c3f0) at eval.c:10466 #9 0x00007f3b3345699e in mark_entry (key=<value optimized out>, value=35147488, lev=14578032) at gc.c:706 #10 0x00007f3b3349eedd in st_foreach (table=0x1167f40, func=0x7f3b33456990 <mark_entry>, arg=1) at st.c:487 #11 0x00007f3b3345699e in mark_entry (key=<value optimized out>, value=35147488, lev=14578032) at gc.c:706 #12 0x00007f3b3349eedd in st_foreach (table=0xdc88d0, func=0x7f3b33456990 <mark_entry>, arg=0) at st.c:487 #13 0x00007f3b334b062a in rb_mark_generic_ivar (obj=<value optimized out>) at variable.c:955 #14 0x00007f3b3345654c in gc_mark_children (ptr=139892208613280, lev=1) at gc.c:842 #15 0x00007f3b3345699e in mark_entry (key=<value optimized out>, value=35147488, lev=14578032) at gc.c:706 #16 0x00007f3b3349eedd in st_foreach (table=0x139ad40, func=0x7f3b33456990 <mark_entry>, arg=0) at st.c:487 #17 0x00007f3b334b062a in rb_mark_generic_ivar (obj=<value optimized out>) at variable.c:955 #18 0x00007f3b3345654c in gc_mark_children (ptr=139892021822200, lev=1) at gc.c:842 #19 0x00007f3b3345699e in mark_entry (key=<value optimized out>, value=35147488, lev=14578032) at gc.c:706 #20 0x00007f3b3349eedd in st_foreach (table=0x12a7e80, func=0x7f3b33456990 <mark_entry>, arg=0) at st.c:487 #21 0x00007f3b334b062a in rb_mark_generic_ivar (obj=<value optimized out>) at variable.c:955 #22 0x00007f3b3345654c in gc_mark_children (ptr=139892019615720, lev=20) at gc.c:842 #23 0x00007f3b3345699e in mark_entry (key=<value optimized out>, value=35147488, lev=14578032) at gc.c:706 #24 0x00007f3b3349eedd in st_foreach (table=0xac90c0, func=0x7f3b33456990 <mark_entry>, arg=19) at st.c:487 #25 0x00007f3b334565a8 in mark_tbl (ptr=139892208522920, lev=19) at gc.c:716 #26 gc_mark_children (ptr=139892208522920, lev=19) at gc.c:992 #27 0x00007f3b3345661e in gc_mark_children (ptr=139892022970320, lev=18) at gc.c:876 #28 0x00007f3b3345699e in mark_entry (key=<value optimized out>, value=35147488, lev=14578032) at gc.c:706 #29 0x00007f3b3349eedd in st_foreach (table=0xeb9a10, func=0x7f3b33456990 <mark_entry>, arg=17) at st.c:487 #30 0x00007f3b33456590 in mark_tbl (ptr=139892208352520, lev=17) at gc.c:716 #31 gc_mark_children (ptr=139892208352520, lev=17) at gc.c:991 #32 0x00007f3b33456451 in gc_mark_children (ptr=139892022557400, lev=16) at gc.c:986 #33 0x00007f3b3345699e in mark_entry (key=<value optimized out>, value=35147488, lev=14578032) at gc.c:706 #34 0x00007f3b3349eedd in st_foreach (table=0xa84710, func=0x7f3b33456990 <mark_entry>, arg=15) at st.c:487 #35 0x00007f3b334565a8 in mark_tbl (ptr=139892244859480, lev=15) at gc.c:716 #36 gc_mark_children (ptr=139892244859480, lev=15) at gc.c:992 #37 0x00007f3b3345661e in gc_mark_children (ptr=139892244713400, lev=14) at gc.c:876 #38 0x00007f3b3345699e in mark_entry (key=<value optimized out>, value=35147488, lev=14578032) at gc.c:706 #39 0x00007f3b3349eedd in st_foreach (table=0xa900e0, func=0x7f3b33456990 <mark_entry>, arg=13) at st.c:487 #40 0x00007f3b33456590 in mark_tbl (ptr=139892244838360, lev=13) at gc.c:716 #41 gc_mark_children (ptr=139892244838360, lev=13) at gc.c:991 #42 0x00007f3b33456451 in gc_mark_children (ptr=139892244838400, lev=12) at gc.c:986 #43 0x00007f3b33456451 in gc_mark_children (ptr=139892244357720, lev=11) at gc.c:986 #44 0x00007f3b3345661e in gc_mark_children (ptr=139892244357560, lev=10) at gc.c:876 #45 0x00007f3b3345661e in gc_mark_children (ptr=139892244357520, lev=9) at gc.c:876 #46 0x00007f3b3345661e in gc_mark_children (ptr=139892244357320, lev=8) at gc.c:876 #47 0x00007f3b334565fb in gc_mark_children (ptr=139892215371840, lev=7) at gc.c:941 #48 0x00007f3b3345699e in mark_entry (key=<value optimized out>, value=35147488, lev=14578032) at gc.c:706 #49 0x00007f3b3349eedd in st_foreach (table=0xa84a30, func=0x7f3b33456990 <mark_entry>, arg=6) at st.c:487 #50 0x00007f3b33456590 in mark_tbl (ptr=139892244859400, lev=6) at gc.c:716 #51 gc_mark_children (ptr=139892244859400, lev=6) at gc.c:991 #52 0x00007f3b3345699e in mark_entry (key=<value optimized out>, value=35147488, lev=14578032) at gc.c:706 #53 0x00007f3b3349eedd in st_foreach (table=0xa84fa0, func=0x7f3b33456990 <mark_entry>, arg=5) at st.c:487 #54 0x00007f3b334565a8 in mark_tbl (ptr=139892244859280, lev=5) at gc.c:716 #55 gc_mark_children (ptr=139892244859280, lev=5) at gc.c:992 #56 0x00007f3b33456451 in gc_mark_children (ptr=139892215237200, lev=4) at gc.c:986 #57 0x00007f3b33456451 in gc_mark_children (ptr=139892215237640, lev=3) at gc.c:986 #58 0x00007f3b3345661e in gc_mark_children (ptr=139892208731560, lev=2) at gc.c:876 #59 0x00007f3b3345683a in gc_mark_children (ptr=<value optimized out>, lev=1) at gc.c:1057 #60 0x00007f3b33456c07 in garbage_collect () at gc.c:1465 #61 0x00007f3b334576d7 in rb_newobj () at gc.c:436 #62 0x00007f3b33437fb1 in new_dvar (id=35147488, value=0, prev=0xde7170) at eval.c:867 #63 0x00007f3b3343806b in dvar_asgn_internal (id=35147488, value=0, curr=<value optimized out>) at eval.c:951 #64 0x00007f3b33442aad in dvar_asgn_curr (self=139892243803200, lhs=0x7f3b31689160, val=139892243801880, pcall=860553744) at eval.c:969 #65 assign (self=139892243803200, lhs=0x7f3b31689160, val=139892243801880, pcall=860553744) at eval.c:5335 #66 0x00007f3b33440e6d in rb_yield_0 (val=<value optimized out>, self=<value optimized out>, klass=<value optimized out>, flags=<value optimized out>, avalue=<value optimized out>) at eval.c:5049 #67 0x00007f3b3341f2f1 in rb_ary_each (ary=139892243800440) at array.c:1261 #68 0x00007f3b33442624 in rb_call0 (klass=<value optimized out>, recv=<value optimized out>, id=<value optimized out>, oid=<value optimized out>, argc=<value optimized out>, argv=<value optimized out>, body=0x7f3b338ec400, flags=0) at eval.c:5928 #69 0x00007f3b33442813 in rb_call (klass=139892244794440, recv=139892243800440, mid=4001, argc=0, argv=0x0, scope=0, self=139892243803200) at eval.c:6176 #70 0x00007f3b3343f58d in rb_eval (self=1, n=<value optimized out>) at eval.c:3506 #71 0x00007f3b33440003 in rb_eval (self=0, n=<value optimized out>) at eval.c:3236 #72 0x00007f3b33440de1 in rb_yield_0 (val=<value optimized out>, self=<value optimized out>, klass=<value optimized out>, flags=<value optimized out>, avalue=<value optimized out>) at eval.c:5095 #73 0x00007f3b334413e2 in proc_invoke (proc=<value optimized out>, args=<value optimized out>, self=<value optimized out>, klass=<value optimized out>) at eval.c:8895 #74 0x00007f3b33442624 in rb_call0 (klass=<value optimized out>, recv=<value optimized out>, id=<value optimized out>, oid=<value optimized out>, argc=<value optimized out>, argv=<value optimized out>, body=0x7f3b338dbdf8, flags=0) at eval.c:5928 #75 0x00007f3b33442813 in rb_call (klass=139892244725600, recv=139892243799640, mid=5521, argc=1, argv=0x7fff2bc14270, scope=1, self=6) at eval.c:6176 #76 0x00007f3b334434c8 in vafuncall (recv=<value optimized out>, mid=<value optimized out>, n=1, ar=<value optimized out>) at eval.c:6253 #77 0x00007f3b33443755 in rb_funcall (recv=35147488, mid=0, n=14578032) at eval.c:6270 #78 0x00007f3b2e843310 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/libwx_baseu-2.8.so.0 #79 0x00007f3b2e84347f in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () from /usr/lib/libwx_baseu-2.8.so.0 #80 0x00007f3b2e844382 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/libwx_baseu-2.8.so.0 #81 0x00007f3b2f1bf1cf in wxWindowBase::SendDestroyEvent() () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #82 0x00007f3b2f0cd3dc in wxWindow::~wxWindow() () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #83 0x00007f3b30ec5303 in SwigDirector_wxFrame::~SwigDirector_wxFrame (this=0x2184ee0, __in_chrg=<value optimized out>) at src/Frame.cpp:2330 #84 0x00007f3b2f13ec42 in wxAppBase::DeletePendingObjects() () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #85 0x00007f3b2f13ed0b in wxAppBase::ProcessIdle() () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #86 0x00007f3b2f0a25d0 in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #87 0x00007f3b2cb03342 in g_main_context_dispatch () from /lib/libglib-2.0.so.0 #88 0x00007f3b2cb072a8 in ?? () from /lib/libglib-2.0.so.0 #89 0x00007f3b2cb077b5 in g_main_loop_run () from /lib/libglib-2.0.so.0 #90 0x00007f3b2e2763e7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #91 0x00007f3b2f0b9578 in wxEventLoop::Run() () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #92 0x00007f3b2f13eb0b in wxAppBase::MainLoop() () from /usr/lib/libwx_gtk2u_core-2.8.so.0 #93 0x00007f3b30dc5d40 in _wrap_App_OnRun (argc=<value optimized out>, argv=<value optimized out>, self=139892019615720) at src/App.cpp:3014 #94 0x00007f3b33442624 in rb_call0 (klass=<value optimized out>, recv=<value optimized out>, id=<value optimized out>, oid=<value optimized out>, argc=<value optimized out>, argv=<value optimized out>, body=0x7f3b3164d228, flags=0) at eval.c:5928 #95 0x00007f3b33442813 in rb_call (klass=139892208490400, recv=139892019615720, mid=29401, argc=0, argv=0x0, scope=1, self=6) at eval.c:6176 #96 0x00007f3b334434c8 in vafuncall (recv=<value optimized out>, mid=<value optimized out>, n=19562336, ar=<value optimized out>) at eval.c:6253 #97 0x00007f3b33443755 in rb_funcall (recv=35147488, mid=0, n=14578032) at eval.c:6270 #98 0x00007f3b30dc7f27 in SwigDirector_App::OnRun (this=0x12a7f60) at src/App.cpp:2544 #99 0x00007f3b2e7e9695 in wxEntry(int&, wchar_t**) () from /usr/lib/libwx_baseu-2.8.so.0 #100 0x00007f3b30dc6270 in main_loop (argc=<value optimized out>, argv=<value optimized out>, self=139892019615720) at src/App.cpp:2303 #101 _wrap_App_main_loop (argc=<value optimized out>, argv=<value optimized out>, self=139892019615720) at src/App.cpp:3265 #102 0x00007f3b33442624 in rb_call0 (klass=<value optimized out>, recv=<value optimized out>, id=<value optimized out>, oid=<value optimized out>, argc=<value optimized out>, argv=<value optimized out>, body=0x7f3b3164cf58, flags=0) at eval.c:5928 #103 0x00007f3b33442813 in rb_call (klass=139892208490400, recv=139892019615720, mid=12593, argc=0, argv=0x0, scope=0, self=139892244849320) at eval.c:6176 #104 0x00007f3b3343f58d in rb_eval (self=140733927477128, n=<value optimized out>) at eval.c:3506 #105 0x00007f3b3344f455 in ruby_exec_internal () at eval.c:1654 #106 0x00007f3b3344f495 in ruby_exec () at eval.c:1674 #107 0x00007f3b3344f4c5 in ruby_run () at eval.c:1684 #108 0x0000000000400871 in main (argc=4, argv=0x7fff2bc158d8, envp=<value optimized out>) at main.c:48 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=218&aid=28871&group_id=35