User forums > Using Code::Blocks

SVN version 4475 crashes on exit

(1/2) > >>

ironhead:
I've compiled version 4475 from svn and it always crashes when exiting.  This did not occur with the previous version I compiled (4472).  I compiled using MinGW on a Windows XP Professional machine.

Ceniza:
Do you have the codeblocks.RPT file at hand? Now that you say you compiled it yourself... could you try it running from src/devel?

Biplab:
Here is a backtrace.


--- Quote ---Program received signal SIGSEGV, Segmentation fault.
0x7c918fea in ntdll!RtlpWaitForCriticalSection ()
   from C:\WINDOWS\system32\ntdll.dll
(gdb) bt full
#0  0x7c918fea in ntdll!RtlpWaitForCriticalSection ()
   from C:\WINDOWS\system32\ntdll.dll
No symbol table info available.
#1  0x0023ed94 in ?? ()
No symbol table info available.
#2  0x004c69e0 in MainFrame::sm_eventTableEntries ()
No symbol table info available.
#3  0x0150a038 in ?? ()
No symbol table info available.
#4  0x00030000 in ?? ()
No symbol table info available.
#5  0x0023e464 in ?? ()
No symbol table info available.
#6  0x0023e4a8 in ?? ()
No symbol table info available.
#7  0xffffffff in ?? ()
No symbol table info available.
#8  0x0023e3ac in ?? ()
No symbol table info available.
#9  0x6cd084be in wxEvtHandler::TryParent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#10 0x7c90104b in ntdll!RtlEnumerateGenericTableLikeADirectory ()
   from C:\WINDOWS\system32\ntdll.dll
No symbol table info available.
#11 0x0038fb28 in ?? ()
No symbol table info available.
#12 0x6ccfc671 in wxCriticalSection::Enter ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#13 0x6ccfe12e in wxThreadInternal::WaitForTerminate ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#14 0x6ccfe626 in wxThread::Delete () from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#15 0x65e9c3b1 in ClassBrowser::~ClassBrowser (this=0x2384168)
    at F:/cbsource/src/plugins/codecompletion/classbrowser.cpp:170
        pos = 96
#16 0x6ce8fee5 in wxWindowBase::Destroy ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#17 0x65eb545a in NativeParser::RemoveClassBrowser (this=0x222cca0,
    appShutDown=true)
    at F:/cbsource/src/plugins/codecompletion/nativeparser.cpp:184
        appShutDown = true
        idx = 1
        evt = {<> = {<No data fields>}, <BlockAllocated<CodeBlocksDockEvent,75u,
 false>> = {static allocator = {
      allocBlocks = {<_Vector_base<BlockAllocator<CodeBlocksDockEvent, 75u,  fal
se>::LinkedBlock<CodeBlocksDockEvent>*,std::allocator<BlockAllocator<CodeBlocksD
ockEvent, 75u,  false>::LinkedBlock<CodeBlocksDockEvent>*> >> = {
          _M_impl = {<allocator<BlockAllocator<CodeBlocksDockEvent, 75u,  false>
::LinkedBlock<CodeBlocksDockEvent>*>> = {<new_allocator<BlockAllocator<CodeBlock
sDockEvent, 75u,  false>::LinkedBlock<CodeBlocksDockEvent>*>> = {<No data fields
>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0,
            _M_end_of_storage = 0x0}}, <No data fields>}, first = 0x0,
      ref_count = 0, max_refs = 0, total_refs = 0}},
  name = {<wxStringBase> = {static npos = 4294967295,
      m_pchData = 0x7c90ee18}, <No data fields>}, title = {<wxStringBase> = {
      static npos = 4294967295, m_pchData = 0x7c910570}, <No data fields>},
  pWindow = 0xffffffff, desiredSize = {x = 2089878893, y = 2009252574},
  floatingSize = {x = 196608, y = 0}, minimumSize = {x = 2009252579,
    y = 2354580}, dockSide = 5007840, row = 22061112, column = 1638571664,
  shown = 140, stretch = 158, hideable = 170, asTab = 97,
  bitmap = {<wxStringBase> = {static npos = 4294967295,
      m_pchData = 0x23e69c}, <No data fields>},
  unused = ">»Ñaxµ#\000α\2143\002αε#\000\224\\├wp ┴w    π┬┬wσnεe╕\2143\002α\2143
\002╠µ#\000±\202∩e╕\2143\002α\2143\002ⁿµ#", static ms_classInfo = {
    m_className = 0x61a8ff84, m_objectSize = 156,
    m_objectConstructor = 0x6190ffb2 <CodeBlocksDockEvent::wxCreateObject()>,
    m_baseInfo1 = 0x6d2f59a8, m_baseInfo2 = 0x0,
    static sm_first = 0x61aad7b8, m_next = 0x61aad7a0,
    static sm_classTable = 0x32e50}}
#18 0x65ea7e24 in CodeCompletion::OnRelease (this=0x222cc50, appShutDown=true)
    at F:/cbsource/src/plugins/codecompletion/codecompletion.cpp:449
        appShutDown = true
#19 0x617df170 in cbPlugin::Release (this=0x222cc50, appShutDown=true)
    at F:/cbsource/src/sdk/cbplugin.cpp:81
        appShutDown = true
        event = {<> = {<No data fields>}, <BlockAllocated<CodeBlocksEvent,75u, f
alse>> = {static allocator = {
      allocBlocks = {<_Vector_base<BlockAllocator<CodeBlocksEvent, 75u,  false>:
:LinkedBlock<CodeBlocksEvent>*,std::allocator<BlockAllocator<CodeBlocksEvent, 75
u,  false>::LinkedBlock<CodeBlocksEvent>*> >> = {
          _M_impl = {<allocator<BlockAllocator<CodeBlocksEvent, 75u,  false>::Li
nkedBlock<CodeBlocksEvent>*>> = {<new_allocator<BlockAllocator<CodeBlocksEvent,
75u,  false>::LinkedBlock<CodeBlocksEvent>*>> = {<No data fields>}, <No data fie
lds>}, _M_start = 0x0, _M_finish = 0x0,
            _M_end_of_storage = 0x0}}, <No data fields>}, first = 0x0,
      ref_count = 0, max_refs = 0, total_refs = 0}}, m_pProject = 0x23e718,
  m_pEditor = 0x150a038, m_pPlugin = 0x23e80c, m_X = 2089872920,
  m_Y = 2089878896, m_TargetName = {<wxStringBase> = {
      static npos = 4294967295, m_pchData = 0xffffffff}, <No data fields>},
  m_OldTargetName = {<wxStringBase> = {static npos = 4294967295,
      m_pchData = 0x7c91056d}, <No data fields>}, static ms_classInfo = {
    m_className = 0x61a8ff64, m_objectSize = 84,
    m_objectConstructor = 0x6190fec8 <CodeBlocksEvent::wxCreateObject()>,
    m_baseInfo1 = 0x6d2f59a8, m_baseInfo2 = 0x0,
    static sm_first = 0x61aad7b8, m_next = 0x61aaddc0,
    static sm_classTable = 0x32e50}}
        window = (struct wxWindow *) 0x61994b95
#20 0x6189d50c in PluginManager::DetachPlugin (this=0x20f2008,
    plugin=0x222cc50) at F:/cbsource/src/sdk/pluginmanager.cpp:220
No locals.
#21 0x618a632f in PluginManager::UnloadPlugin (this=0x20f2008,
    plugin=0x222cc50) at F:/cbsource/src/sdk/pluginmanager.cpp:1153
        i = 0
#22 0x618a62f2 in PluginManager::UnloadAllPlugins (this=0x20f2008)
    at F:/cbsource/src/sdk/pluginmanager.cpp:1141
No locals.
#23 0x6189d2ea in PluginManager::~PluginManager (this=0x20f2008)
    at F:/cbsource/src/sdk/pluginmanager.cpp:190
No locals.
#24 0x619ca3b0 in Mgr<PluginManager>::Free ()
    at F:/cbsource/src/include/manager.h:189
No locals.
#25 0x61888f4e in Manager::Shutdown () at F:/cbsource/src/sdk/manager.cpp:167
No locals.
#26 0x0043d35a in MainFrame::OnApplicationClose (this=0x18daaf0,
    event=@0x23ed94) at F:/cbsource/src/src/main.cpp:2611
        evt = {<> = {<No data fields>}, <BlockAllocated<CodeBlocksEvent,75u, fal
se>> = {static allocator = {
      allocBlocks = {<_Vector_base<BlockAllocator<CodeBlocksEvent, 75u,  false>:
:LinkedBlock<CodeBlocksEvent>*,std::allocator<BlockAllocator<CodeBlocksEvent, 75
u,  false>::LinkedBlock<CodeBlocksEvent>*> >> = {
          _M_impl = {<allocator<BlockAllocator<CodeBlocksEvent, 75u,  false>::Li
nkedBlock<CodeBlocksEvent>*>> = {<new_allocator<BlockAllocator<CodeBlocksEvent,
75u,  false>::LinkedBlock<CodeBlocksEvent>*>> = {<No data fields>}, <No data fie
lds>}, _M_start = 0x0, _M_finish = 0x0,
            _M_end_of_storage = 0x0}}, <No data fields>}, first = 0x0,
      ref_count = 0, max_refs = 0, total_refs = 0}}, m_pProject = 0x0,
  m_pEditor = 0x0, m_pPlugin = 0x0, m_X = 0, m_Y = 0,
  m_TargetName = {<wxStringBase> = {static npos = 4294967295,
      m_pchData = 0x6d25425c}, <No data fields>},
  m_OldTargetName = {<wxStringBase> = {static npos = 4294967295,
      m_pchData = 0x6d25425c}, <No data fields>}, static ms_classInfo = {
    m_className = 0x61a8ff64, m_objectSize = 84,
    m_objectConstructor = 0x6190fec8 <CodeBlocksEvent::wxCreateObject()>,
    m_baseInfo1 = 0x6d2f59a8, m_baseInfo2 = 0x0,
    static sm_first = 0x61aad7b8, m_next = 0x61aaddc0,
    static sm_classTable = 0x32e50}}
        prjman = (class ProjectManager *) 0x2059f78
        evtShutdown = {<> = {<No data fields>}, <BlockAllocated<CodeBlocksEvent,
75u, false>> = {static allocator = {
      allocBlocks = {<_Vector_base<BlockAllocator<CodeBlocksEvent, 75u,  false>:
:LinkedBlock<CodeBlocksEvent>*,std::allocator<BlockAllocator<CodeBlocksEvent, 75
u,  false>::LinkedBlock<CodeBlocksEvent>*> >> = {
          _M_impl = {<allocator<BlockAllocator<CodeBlocksEvent, 75u,  false>::Li
nkedBlock<CodeBlocksEvent>*>> = {<new_allocator<BlockAllocator<CodeBlocksEvent,
75u,  false>::LinkedBlock<CodeBlocksEvent>*>> = {<No data fields>}, <No data fie
lds>}, _M_start = 0x0, _M_finish = 0x0,
            _M_end_of_storage = 0x0}}, <No data fields>}, first = 0x0,
      ref_count = 0, max_refs = 0, total_refs = 0}}, m_pProject = 0x0,
  m_pEditor = 0x0, m_pPlugin = 0x0, m_X = 0, m_Y = 0,
  m_TargetName = {<wxStringBase> = {static npos = 4294967295,
      m_pchData = 0x6d25425c}, <No data fields>},
  m_OldTargetName = {<wxStringBase> = {static npos = 4294967295,
      m_pchData = 0x6d25425c}, <No data fields>}, static ms_classInfo = {
    m_className = 0x61a8ff64, m_objectSize = 84,
    m_objectConstructor = 0x6190fec8 <CodeBlocksEvent::wxCreateObject()>,
    m_baseInfo1 = 0x6d2f59a8, m_baseInfo2 = 0x0,
    static sm_first = 0x61aad7b8, m_next = 0x61aaddc0,
    static sm_classTable = 0x32e50}}
#27 0x6cd07305 in wxEvtHandler::ProcessEventIfMatches ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#28 0x6cd0765c in wxEventHashTable::HandleEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#29 0x6cd08629 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#30 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#31 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#32 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#33 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#34 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#35 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#36 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#37 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#38 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#39 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#40 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#41 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#42 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#43 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#44 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#45 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#46 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#47 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#48 0x6cd085c9 in wxEvtHandler::ProcessEvent ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#49 0x6ce8ffa3 in wxWindowBase::Close () from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#50 0x6cda3007 in wxFrame::MSWWindowProc ()
   from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#51 0x6cd72220 in wxWndProc () from C:\MinGW\Bin\wxmsw28u_gcc_cb.dll
No symbol table info available.
#52 0x7e418734 in USER32!GetDC () from C:\WINDOWS\system32\user32.dll
No symbol table info available.
#53 0x0026049e in ?? ()
No symbol table info available.
#54 0x00000010 in ?? ()
No symbol table info available.
#55 0x00000000 in ?? ()
No symbol table info available.
(gdb)
--- End quote ---

Biplab:
@Ceniza,

I've reverted the modification made to CC in revision 4473. That seems to fix this. Please feel free to re-revert it, in case a better solution is found. :)

Best Regards,

Biplab

Ceniza:
My fault then, but I would call that a race condition. The fact that the semaphore is posted before Delete in Windows and after Delete in other platforms is also a sign of a problem. In Windows it seems the thread is able to set the pointer to NULL before that code checks for NULL, so Delete won't be called (either that or calling Delete doesn't cause a problem there (perhaps it's calling it while the thread is still running, but just before it dies)), but in *nix it'll try to overwrite a variable that may be no longer valid.

I'll try to reproduce it in Windows again (I tried already, but it didn't crash).

Navigation

[0] Message Index

[#] Next page

Go to full version