I see the thread search plugin cause crash when initilized, here is the line it crashed:
void DirectoryParamsPanel::OnSearchDirTextEvent(wxCommandEvent &event)
{
//m_pFindData->SetSearchPath(event.GetString());
event.GetString(); // ****************Crash on this function call*************
event.Skip();
}
Here is the call stack:
[debug]Thread 1 received signal SIGSEGV, Segmentation fault.
[debug]0x6885d39d in wxCommandEvent::GetString() const () from D:\code\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll
[debug]>>>>>>cb_gdb:
In wxCommandEvent::GetString() const () (D:\code\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll)
[debug]> bt 30
[debug]#0 0x6885d39d in wxCommandEvent::GetString() const () from D:\code\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll
[debug]#1 0x0d221da7 in DirectoryParamsPanel::OnSearchDirTextEvent (this=0xa41f070, event=...) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\ThreadSearch\DirectoryParamsPanel.cpp:98
[debug]#2 0x68702eb2 in wxAppConsoleBase::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const () from D:\code\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll
[debug]#3 0x68703217 in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from D:\code\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll
[debug]#4 0x6885bc80 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from D:\code\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll
[debug]#5 0x6885bd6a in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from D:\code\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll
[debug]#6 0x6885c549 in wxEvtHandler::TryHereOnly(wxEvent&) () from D:\code\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll
[debug]#7 0x6885c5ba in wxEvtHandler::ProcessEventLocally(wxEvent&) () from D:\code\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll
[debug]#8 0x6885c615 in wxEvtHandler::ProcessEvent(wxEvent&) () from D:\code\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll
[debug]#9 0x68b24c8a in wxWindowBase::TryAfter(wxEvent&) () from D:\code\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll
[debug]#10 0x6885dff2 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from D:\code\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll
[debug]#11 0x68b0cd18 in wxTextEntryBase::SendTextUpdatedEvent(wxWindow*) () from D:\code\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll
[debug]#12 0x68b0cf57 in wxTextEntryBase::DoSetValue(wxString const&, int) () from D:\code\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll
[debug]#13 0x68975ce1 in wxComboBox::SetValue(wxString const&) () from D:\code\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll
[debug]#14 0x0d222839 in DirectoryParamsPanel::SetSearchDirPath (this=0xa41f070, sDirPath=L"") at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\ThreadSearch\DirectoryParamsPanel.cpp:182
[debug]#15 0x0d23b534 in ThreadSearchView::set_properties (this=0xa462588) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\ThreadSearch\ThreadSearchView.cpp:376
[debug]#16 0x0d2394c5 in ThreadSearchView::ThreadSearchView (this=0xa462588, threadSearchPlugin=...) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\ThreadSearch\ThreadSearchView.cpp:95
[debug]#17 0x0d226249 in ThreadSearch::OnAttach (this=0xa452778) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\ThreadSearch\ThreadSearch.cpp:183
[debug]#18 0x01700408 in cbPlugin::Attach (this=0xa452778) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\sdk\cbplugin.cpp:73
[debug]#19 0x0179c7e3 in PluginManager::AttachPlugin (this=0xa20ea38, plugin=0xa452778, ignoreSafeMode=false) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\sdk\pluginmanager.cpp:195
[debug]#20 0x017a28d2 in PluginManager::LoadAllPlugins (this=0xa20ea38) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\sdk\pluginmanager.cpp:1104
[debug]#21 0x0045370c in MainFrame::ScanForPlugins (this=0x6a00648) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\src\main.cpp:1209
[debug]#22 0x0044e9b7 in MainFrame::MainFrame (this=0x6a00648, parent=0x0) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\src\main.cpp:633
[debug]#23 0x004029b3 in CodeBlocksApp::InitFrame (this=0x6778248) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\src\app.cpp:489
[debug]#24 0x00403f47 in CodeBlocksApp::OnInit (this=0x6778248) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\src\app.cpp:697
[debug]#25 0x004c93a6 in wxAppConsoleBase::CallOnInit (this=0x6778248) at D:\code\wxWidgets-3.1.0\include\wx\app.h:93
[debug]#26 0x687847d2 in wxEntryReal(int&, wchar_t**) () from D:\code\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll
[debug]#27 0x004021af in WinMain@16 (hInstance=0x400000, hPrevInstance=0x0, nCmdShow=10) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\src\app.cpp:322
[debug]#28 0x004f73ad in main ()
[debug]>>>>>>cb_gdb:
[debug]> frame 1
[debug]#1 0x0d221da7 in DirectoryParamsPanel::OnSearchDirTextEvent (this=0xa41f070, event=...) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\ThreadSearch\DirectoryParamsPanel.cpp:98
[debug]D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\ThreadSearch\DirectoryParamsPanel.cpp:98:4038:beg:0xd221da7
[debug]>>>>>>cb_gdb:
It sounds like the passed wxCommandEvent object has some problems, it just crashed when the event.GetString() function is called.
You can see it is in the initialization stage, because it crashed in the ThreadSearchView::ThreadSearchView() function call.
...
[debug]#14 0x0d222839 in DirectoryParamsPanel::SetSearchDirPath (this=0xa41f070, sDirPath=L"") at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\ThreadSearch\DirectoryParamsPanel.cpp:182
[debug]#15 0x0d23b534 in ThreadSearchView::set_properties (this=0xa462588) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\ThreadSearch\ThreadSearchView.cpp:376
[debug]#16 0x0d2394c5 in ThreadSearchView::ThreadSearchView (this=0xa462588, threadSearchPlugin=...) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\ThreadSearch\ThreadSearchView.cpp:95
[debug]#17 0x0d226249 in ThreadSearch::OnAttach (this=0xa452778) at D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\ThreadSearch\ThreadSearch.cpp:183
...
The bad thing is I can not see the event under gdb
[debug]> p event
[debug]$1 = (wxCommandEvent &) @0x28e3e4: <incomplete type>
[debug]>>>>>>cb_gdb:
$1 = (wxCommandEvent &) @0x28e3e4: <incomplete type>
I'm using Win7 64bit, mingw-build gcc 5.4 32bit compiler, wx3.1.
Thanks.