Crash ;) on Win 7 x32:
codeblocks.exe caused an Access Violation at location 006ccc1f Reading from location 006ccc1f.
Registers:
eax=006ccc1f ebx=0000001c ecx=0747e2d8 edx=00000000 esi=004dd828 edi=00000000
eip=006ccc1f esp=0022f7d8 ebp=0022f9a4 iopl=0 nv up ei pl nz ac pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010212
Call stack:
006CCC1F
6CD111EE wxmsw28u_gcc_cb.dll:6CD111EE _ZN8wxWindow13MSWWindowProcEjjl
6CD0ADAE wxmsw28u_gcc_cb.dll:6CD0ADAE _Z9wxWndProcP6HWND__jjl@16
7758C4E7 USER32.dll:7758C4E7 gapfnScSendMessage
7758C5E7 USER32.dll:7758C5E7 gapfnScSendMessage
77584F0E USER32.dll:77584F0E GetScrollBarInfo
77584F7D USER32.dll:77584F7D GetScrollBarInfo
7773702E ntdll.dll:7773702E KiUserCallbackDispatcher
6CCEFA40 wxmsw28u_gcc_cb.dll:6CCEFA40 _ZN11wxEventLoop8DispatchEv
Latest working copy for me was svn9677.
Any steps to reproduce this crash?
1) Open Notepad
2) Open Codeblocks with a test project and check "Display info when hovering mouse over a token in the editor" from Settings->Editor->Code completion->Code completion
3) Put the mouse cursor over a token in editor and let to apear the little pop-up with description.
4) Now click on Notepad window...
BOOM!!! :D
codeblocks.exe caused an Access Violation at location bc68551c Reading from location bc68551c.
Registers:
eax=bc68551c ebx=00000d88 ecx=071398a8 edx=00000000 esi=071398a8 edi=00000d88
eip=bc68551c esp=0022f548 ebp=0022f9c4 iopl=0 nv up ei pl nz ac po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010216
Call stack:
BC68551C
6852EC49 wxmsw28u.dll:6852EC49 _ZN8wxWindow13MSWWindowProcEjjl
68527BA0 wxmsw28u.dll:68527BA0 _Z9wxWndProcP6HWND__jjl@16
775EC4E7 USER32.dll:775EC4E7 gapfnScSendMessage
775EC5E7 USER32.dll:775EC5E7 gapfnScSendMessage
775E4F0E USER32.dll:775E4F0E GetScrollBarInfo
775E4F7D USER32.dll:775E4F7D GetScrollBarInfo
77B8702E ntdll.dll:77B8702E KiUserCallbackDispatcher
68511E35 wxmsw28u.dll:68511E35 _ZN11wxEventLoop8DispatchEv
6858B3B2 wxmsw28u.dll:6858B3B2 _ZN17wxEventLoopManual3RunEv
685724D0 wxmsw28u.dll:685724D0 _ZN9wxAppBase8MainLoopEv
00402922 codeblocks.exe:00402922
684F1D1C wxmsw28u.dll:684F1D1C _Z7wxEntryP11HINSTANCE__S0_Pci
00401D00 codeblocks.exe:00401D00
004010FD codeblocks.exe:004010FD
77BA37EB ntdll.dll:77BA37EB RtlInitializeExceptionChain
77BA37BE ntdll.dll:77BA37BE RtlInitializeExceptionChain
I think that the error was introduced in latest commits with new CC plugin.
Do you know how to catch a more complex debug message from CodeBlocks?
Can you start the C::B from debugger(I mean debug C::B under C::B), and if it crashed, you can see a full call stack about every thread.
From what I see in your call-stack
codeblocks.exe caused an Access Violation at location bc68551c Reading from location bc68551c.
Registers:
eax=bc68551c ebx=00000d88 ecx=071398a8 edx=00000000 esi=071398a8 edi=00000d88
eip=bc68551c esp=0022f548 ebp=0022f9c4 iopl=0 nv up ei pl nz ac po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010216
....
I can not guess any thing related to CC. :)
I think it is better you can share us a test project, so we can test it on our system.
BTW: you say "Notepad" means Editor window of C::B?
:)
Recompiled with -g -O0 for cb_release_type and no break or detailed threads in Call stack.
Running standalone and intercepted with Dr. MinGW:
codeblocks.exe caused an Access Violation at location 4cb22a68 Reading from location 4cb22a68.
Registers:
eax=4cb22a68 ebx=00000ad4 ecx=11a5ba18 edx=00000000 esi=11a5ba18 edi=00000ad4
eip=4cb22a68 esp=0022f518 ebp=0022f994 iopl=0 nv up ei pl nz ac po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00210216
Call stack:
4CB22A68
6852EC49 wxmsw28u.dll:6852EC49 _ZN8wxWindow13MSWWindowProcEjjl
68527BA0 wxmsw28u.dll:68527BA0 _Z9wxWndProcP6HWND__jjl@16
775EC4E7 USER32.dll:775EC4E7 gapfnScSendMessage
775EC5E7 USER32.dll:775EC5E7 gapfnScSendMessage
775E4F0E USER32.dll:775E4F0E GetScrollBarInfo
775E4F7D USER32.dll:775E4F7D GetScrollBarInfo
77B8702E ntdll.dll:77B8702E KiUserCallbackDispatcher
68511E35 wxmsw28u.dll:68511E35 _ZN11wxEventLoop8DispatchEv
6858B3B2 wxmsw28u.dll:6858B3B2 _ZN17wxEventLoopManual3RunEv
685724D0 wxmsw28u.dll:685724D0 _ZN9wxAppBase8MainLoopEv
00405B8E codeblocks.exe:00405B8E CodeBlocksApp::OnRun app.cpp:818
...
try
{
> int retval = wxApp::OnRun();
// wx 2.6.3 docs says that OnRun() function's return value is used as exit code
return m_Batch ? m_BatchExitCode : retval;
...
684A9954 wxmsw28u.dll:684A9954 _Z14wxUninitializev
684F1D1C wxmsw28u.dll:684F1D1C _Z7wxEntryP11HINSTANCE__S0_Pci
00401DD6 codeblocks.exe:00401DD6 WinMain@16 app.cpp:278
...
} // namespace
> IMPLEMENT_APP(CodeBlocksApp) // TODO: This gives a "redundant declaration" warning, though I think it's false. Dig through macro and check.
BEGIN_EVENT_TABLE(CodeBlocksApp, wxApp)
...
0050074B codeblocks.exe:0050074B _ZNK8cbPlugin9CanDetachEv
004010FD codeblocks.exe:004010FD
77BA37EB ntdll.dll:77BA37EB RtlInitializeExceptionChain
77BA37BE ntdll.dll:77BA37BE RtlInitializeExceptionChain
I've the same problem than Vali29. I'm using SVN9744 (self compiled) over Windows XP SP3, and if you remove focus from Codeblocks when CC is showing the tip you always get a segmentation fault.
Debuging within Codeblocks or within gdb alone shows the same results: the backtrace is truncated to two (sometimes three) lines. Using gdb:
Program received signal SIGSEGV, Segmentation fault.
0x00002265 in ?? ()
(gdb) bt
#0 0x00002265 in ?? ()
#1 0x627a190d in ?? ()
#2 0x003f0450 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
Compiled with gcc 4.7.0 (MinGW) and wxWidgets 2.8.12
HTH
OK, I found some clue.
When a tooltip window is destroyed, a function will be called
In sdk\wxscintilla\src\PlatWX.cpp line 749
void Window::Destroy()
{
if (wid) {
Show(false);
GETWIN(wid)->Destroy();
}
wid = 0;
}
This will internally call a "delete this" statement, so the whole Window object is deleted.
But later, I see that this deleted Window is still used, so some function like:
// Main window proc
LRESULT WXDLLEXPORT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
// trace all messages - useful for the debugging
#ifdef __WXDEBUG__
wxLogTrace(wxTraceMessages,
wxT("Processing %s(hWnd=%08lx, wParam=%8lx, lParam=%8lx)"),
wxGetMessageName(message), (long)hWnd, (long)wParam, lParam);
#endif // __WXDEBUG__
wxWindowMSW *wnd = wxFindWinFromHandle((WXHWND) hWnd);
// when we get the first message for the HWND we just created, we associate
// it with wxWindow stored in gs_winBeingCreated
if ( !wnd && gs_winBeingCreated )
{
wxAssociateWinWithHandle(hWnd, gs_winBeingCreated);
wnd = gs_winBeingCreated;
gs_winBeingCreated = NULL;
wnd->SetHWND((WXHWND)hWnd);
}
LRESULT rc;
if ( wnd && wxEventLoop::AllowProcessing(wnd) )
rc = wnd->MSWWindowProc(message, wParam, lParam);
else
rc = ::DefWindowProc(hWnd, message, wParam, lParam);
return rc;
}
Will still be called. Note that in this case, "wnd" (in the statement of rc = wnd->MSWWindowProc(message, wParam, lParam);) is an already destroyed pointer in In sdk\wxscintilla\src\PlatWX.cpp line 749.
If I remember correctly, I have see such crash issue when I debug CC. Some one has a fix patch, let's see I can find it on the forum. :)
src/sdk/wxscintilla/src/scintilla/src/CallTip.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/sdk/wxscintilla/src/scintilla/src/CallTip.cxx b/src/sdk/wxscintilla/src/scintilla/src/CallTip.cxx
index 7dc23a4..64c9f0d 100644
--- a/src/sdk/wxscintilla/src/scintilla/src/CallTip.cxx
+++ b/src/sdk/wxscintilla/src/scintilla/src/CallTip.cxx
@@ -297,7 +297,11 @@ PRectangle CallTip::CallTipStart(int pos, Point pt, int textHeight, const char *
void CallTip::CallTipCancel() {
inCallTipMode = false;
if (wCallTip.Created()) {
- wCallTip.Destroy();
+/* C::B begin */
+// wCallTip.Destroy();
+ wCallTip.Show(false);
+/* C::B end */
+
}
}
this fix the crash issue. but not sure it cause other issue, since I'm not quite familiar with the scintilla control, I just follow the way p2rkw did.
I debug for a while, and I found that:
1, if another APP was activate, the C::B will receive a "de-active" event. If currently the Tooltip is the active window, it is the window to receive such event.
2, to handle the event, CCManager try to do these
// cbEVT_APP_DEACTIVATED
void CCManager::OnDeactivateApp(CodeBlocksEvent& event)
{
DoHidePopup();
cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
if (ed)
{
cbStyledTextCtrl* stc = ed->GetControl();
if (stc->CallTipActive())
stc->CallTipCancel();
m_CallTipActive = wxSCI_INVALID_POSITION;
}
event.Skip();
}
Here, in the stc->CallTipCancel();, the window who receive the "de-active" event was destroyed. By internally run a "delete this" of the wxWindow, the wxWindow is totally destroyed.
3, But note the destroy happens in a member function of the wxWindow, which is:
WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{
// did we process the message?
bool processed = false;
.....
.....
case WM_KILLFOCUS:
processed = HandleKillFocus((WXHWND)(HWND)wParam);
break;
.....
.....
if ( !processed )
{
#ifdef __WXDEBUG__
wxLogTrace(wxTraceMessages, wxT("Forwarding %s to DefWindowProc."),
wxGetMessageName(message));
#endif // __WXDEBUG__
rc.result = MSWDefWindowProc(message, wParam, lParam);
}
return rc.result;
}
Here, HandleKillFocus() function call return false, so we have a chance to call
rc.result = MSWDefWindowProc(message, wParam, lParam);
Which is actually
rc.result = this->MSWDefWindowProc(message, wParam, lParam);
But "this" is already deleted, so we get a crash here.
With the analysis of my previous post, I find a better way to solve this crash issue. I mean "Do not destroy the tip window in CCManager::OnDeactivateApp"
Just see the patch below, tested and works fine.
src/sdk/ccmanager.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sdk/ccmanager.cpp b/src/sdk/ccmanager.cpp
index 58c25cc..9d5fb39 100644
--- a/src/sdk/ccmanager.cpp
+++ b/src/sdk/ccmanager.cpp
@@ -463,7 +463,7 @@ void CCManager::OnDeactivateApp(CodeBlocksEvent& event)
{
cbStyledTextCtrl* stc = ed->GetControl();
if (stc->CallTipActive())
- stc->CallTipCancel();
+ ;//stc->CallTipCancel();
m_CallTipActive = wxSCI_INVALID_POSITION;
}
event.Skip();
With the analysis of my previous post, I find a better way to solve this crash issue. I mean "Do not destroy the tip window in CCManager::OnDeactivateApp" [...]
Unfortunately, if we do not cancel the tip window, it can become "stuck" on top of everything until Code::Blocks is reactivated.
@all: If you are experiencing this crash, please test the following patch.
Index: src/sdk/ccmanager.cpp
===================================================================
--- src/sdk/ccmanager.cpp (revision 9745)
+++ src/sdk/ccmanager.cpp (working copy)
@@ -114,6 +114,8 @@
const int idCallTipNext = wxNewId();
const int idCallTipPrevious = wxNewId();
+DEFINE_EVENT_TYPE(cbDEFERRED_CALLTIP_CANCEL_EVENT)
+
// milliseconds
#define CALLTIP_REFRESH_DELAY 90
#define AUTOCOMP_SELECT_DELAY 35
@@ -292,6 +294,7 @@
Connect(idCallTipTimer, wxEVT_TIMER, wxTimerEventHandler(CCManager::OnTimer));
Connect(idAutoLaunchTimer, wxEVT_TIMER, wxTimerEventHandler(CCManager::OnTimer));
Connect(idAutocompSelectTimer, wxEVT_TIMER, wxTimerEventHandler(CCManager::OnTimer));
+ Connect(cbDEFERRED_CALLTIP_CANCEL_EVENT, wxCommandEventHandler(CCManager::OnDeferredCallTipCancel));
}
// class destructor
@@ -309,6 +312,7 @@
Disconnect(idCallTipTimer);
Disconnect(idAutoLaunchTimer);
Disconnect(idAutocompSelectTimer);
+ Disconnect(cbDEFERRED_CALLTIP_CANCEL_EVENT);
}
cbCodeCompletionPlugin* CCManager::GetProviderFor(cbEditor* ed)
@@ -463,7 +467,10 @@
{
cbStyledTextCtrl* stc = ed->GetControl();
if (stc->CallTipActive())
- stc->CallTipCancel();
+ {
+ wxCommandEvent pendingCancel(cbDEFERRED_CALLTIP_CANCEL_EVENT);
+ AddPendingEvent(pendingCancel);
+ }
m_CallTipActive = wxSCI_INVALID_POSITION;
}
event.Skip();
@@ -880,6 +887,13 @@
m_CallTipTimer.Start(CALLTIP_REFRESH_DELAY, wxTIMER_ONE_SHOT);
}
+void CCManager::OnDeferredCallTipCancel(wxCommandEvent& WXUNUSED(event))
+{
+ cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
+ if (ed)
+ ed->GetControl()->CallTipCancel();
+}
+
#ifdef __WXMSW__
void CCManager::OnPopupScroll(wxMouseEvent& event)
{
Index: src/include/ccmanager.h
===================================================================
--- src/include/ccmanager.h (revision 9745)
+++ src/include/ccmanager.h (working copy)
@@ -57,6 +57,7 @@
/** event handler to show documentation, when user changes autocomplete selection */
void OnAutocompleteSelect(wxListEvent& event);
void OnAutocompleteHide(wxShowEvent& event);
+ void OnDeferredCallTipCancel(wxCommandEvent& event);
#ifdef __WXMSW__
/** intercept cbStyledTextCtrl scroll events and forward to autocomplete/documentation popups */
void OnPopupScroll(wxMouseEvent& event);
Abbreviations have stopped working correctly (at least under Windows) if trying to replace them when partially written. [...]
Oops, my fault. I forgot to commit some local changes. ... Unfortunately, the introduction of CCManager has further destabilized this feature of Abbreviations (which was already bugged, because it required event handling to be in a specific order, which it could not control).
This code will half-fix the problem (the easy part, which was sitting on my computer and hiding the problem from me). I will try to deal with the event handling this weekend.
Index: src/plugins/abbreviations/abbreviations.cpp
===================================================================
--- src/plugins/abbreviations/abbreviations.cpp (revision 9755)
+++ src/plugins/abbreviations/abbreviations.cpp (working copy)
@@ -169,6 +169,8 @@
void Abbreviations::OnEditAutoComplete(cb_unused wxCommandEvent& event)
{
cbEditor* editor = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
+ if (!editor)
+ return;
cbStyledTextCtrl* control = editor->GetControl();
const AutoCompleteMap& acm = *GetCurrentACMap(editor);
@@ -200,6 +202,7 @@
items.Sort();
wxString itemsStr = GetStringFromArray(items, _T(" "));
control->AutoCompSetSeparator(_T(' '));
+ control->AutoCompSetTypeSeparator(_T('?'));
control->AutoCompShow(endPos-startPos, itemsStr);
}
m_IsAutoCompVisible = control->AutoCompActive();
Good to know. Is it possible to provide a binary for Clang plugin somehow for volunteers like me to beta test? I couldn't manage to compile the plugin myself as I'm not using TDM compiler and being a 'using xxx::xxx;' guy current implementation doesn't really help me much with that.
I have successfully compiled the ClangLib plugin but always crash at clang_getInclusions when they start to parse the project.
codeblocks.exe caused an Access Violation at location 66261318 in module libclang.dll Reading from location 00000010.
Registers:
eax=00000000 ebx=01d9f078 ecx=01d52158 edx=00000512 esi=00000010 edi=00000000
eip=66261318 esp=0022f528 ebp=0022f870 iopl=0 nv up ei pl zr na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010246
Call stack:
66261318 libclang.dll:66261318 clang_getInclusions
68481249 wxmsw28u.dll:68481249 _ZNK12wxAppConsole11HandleEventEP12wxEvtHandlerMS0_FvR7wxEventES3_
684ED9EC wxmsw28u.dll:684ED9EC _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
684EDDC6 wxmsw28u.dll:684EDDC6 _ZN12wxEvtHandler23SearchDynamicEventTableER7wxEvent
684EDE44 wxmsw28u.dll:684EDE44 _ZN12wxEvtHandler12ProcessEventER7wxEvent
685C4ED9 wxmsw28u.dll:685C4ED9 _ZN11wxTimerBase6NotifyEv
68520858 wxmsw28u.dll:68520858 _ZN7wxTimer4InitEv
7613C4E7 USER32.dll:7613C4E7 gapfnScSendMessage
7613C5E7 USER32.dll:7613C5E7 gapfnScSendMessage
7613CC19 USER32.dll:7613CC19 gapfnScSendMessage
7613CC70 USER32.dll:7613CC70 DispatchMessageW
761341EB USER32.dll:761341EB IsDialogMessageW
6851214D wxmsw28u.dll:6851214D _ZN11wxEventLoop17PreProcessMessageEP6tagMSG
68511D8A wxmsw28u.dll:68511D8A _ZN11wxEventLoop14ProcessMessageEP6tagMSG
68511EEC wxmsw28u.dll:68511EEC _ZN11wxEventLoop8DispatchEv
6858B3B2 wxmsw28u.dll:6858B3B2 _ZN17wxEventLoopManual3RunEv
685724D0 wxmsw28u.dll:685724D0 _ZN9wxAppBase8MainLoopEv
00402922 codeblocks.exe:00402922
684F1D1C wxmsw28u.dll:684F1D1C _Z7wxEntryP11HINSTANCE__S0_Pci
00401D00 codeblocks.exe:00401D00
004010FD codeblocks.exe:004010FD
776237EB ntdll.dll:776237EB RtlInitializeExceptionChain
776237BE ntdll.dll:776237BE RtlInitializeExceptionChain
@jens: the latest nightly build from your repository on my Debian jessie 64-bit crashed a few seconds after i closed it and upon reopen the crash got reproduced.
user@debian:~$ gdb codeblocks
GNU gdb (GDB) 7.6.2 (Debian 7.6.2-1)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
(gdb) bt
#0 0x00007ffff27589f8 in main_arena () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff61fea44 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) ()
from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#2 0x00007ffff61fee74 in wxAppBase::ProcessIdle() ()
from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#3 0x00007ffff6179e91 in ?? ()
from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#4 0x00007ffff33e4ce5 in g_main_context_dispatch ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007ffff33e5048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007ffff33e530a in g_main_loop_run ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7 0x00007ffff52f9147 in gtk_main ()
from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#8 0x00007ffff618d36a in wxEventLoop::Run() ()
from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#9 0x00007ffff61fec1c in wxAppBase::MainLoop() ()
from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#10 0x00000000004484fb in CodeBlocksApp::OnRun (this=0x7d3bb0) at app.cpp:818
#11 0x00007ffff589df7d in wxEntry(int&, wchar_t**) ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#12 0x000000000043b962 in main (argc=3, argv=<optimized out>) at app.cpp:278
(gdb) continue
Continuing.
Program received signal SIGABRT, Aborted.
0x00007ffff23ea3a9 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) continue
Continuing.
[Thread 0x7fffd7dc1700 (LWP 12975) exited]
[Thread 0x7fffd85c2700 (LWP 12946) exited]
[Thread 0x7fffe7309700 (LWP 12939) exited]
[Thread 0x7fffe7b0a700 (LWP 12938) exited]
[Thread 0x7fffe830b700 (LWP 12937) exited]
Program terminated with signal SIGABRT, Aborted.
The program no longer exists.
(gdb) continue
The program is not being run.
(gdb) q
user@debian:~$
try executing: "thread apply all bt" gdb command. The bt from the main trace doesn't look interesting or revealing...
I hope I have done it properly @oBFusCATed. If I missed anything, please let me know.
$ gdb codeblocks
GNU gdb (GDB) 7.6.2 (Debian 7.6.2-1)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/codeblocks...Reading symbols from /usr/lib/debug/usr/bin/codeblocks...done.
done.
(gdb) run -d -v
Starting program: /usr/bin/codeblocks -d -v
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe830b700 (LWP 9153)]
[New Thread 0x7fffe7b0a700 (LWP 9154)]
[New Thread 0x7fffe7309700 (LWP 9155)]
[New Thread 0x7fffd85c2700 (LWP 9163)]
[New Thread 0x7fffd7dc1700 (LWP 9167)]
[Thread 0x7fffd7dc1700 (LWP 9167) exited]
[New Thread 0x7fffd7dc1700 (LWP 9192)]
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) thread apply all bt
Thread 7 (Thread 0x7fffd7dc1700 (LWP 9192)):
#0 pthread_cond_wait@@GLIBC_2.3.2 ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007ffff58ee653 in wxConditionInternal::Wait() ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#2 0x00007ffff58ef1a8 in wxSemaphoreInternal::Wait() ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#3 0x00007fffdcfb4a62 in ClassBrowserBuilderThread::Entry (this=0x4474360)
at classbrowserbuilderthread.cpp:193
#4 0x00007ffff58ef983 in wxThreadInternal::PthreadStart(wxThread*) ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#5 0x00007ffff3187062 in start_thread (arg=0x7fffd7dc1700)
at pthread_create.c:312
#6 0x00007ffff249aa3d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 5 (Thread 0x7fffd85c2700 (LWP 9163)):
#0 0x00007ffff2493c33 in select () at ../sysdeps/unix/syscall-template.S:81
#1 0x00007fffe66924a3 in do_select (this=0x7fffd85c0b20)
at directorymonitor.cpp:70
#2 DirMonitorThread::Entry (this=0x1a734f0) at directorymonitor.cpp:164
#3 0x00007ffff58ef983 in wxThreadInternal::PthreadStart(wxThread*) ()
---Type <return> to continue, or q <return> to quit---
from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#4 0x00007ffff3187062 in start_thread (arg=0x7fffd85c2700)
at pthread_create.c:312
#5 0x00007ffff249aa3d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 4 (Thread 0x7fffe7309700 (LWP 9155)):
#0 pthread_cond_wait@@GLIBC_2.3.2 ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007ffff58ee653 in wxConditionInternal::Wait() ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#2 0x00007ffff58ef1a8 in wxSemaphoreInternal::Wait() ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#3 0x00007ffff779984a in BackgroundThread::Entry (this=0xefc0e8)
at ./backgroundthread.h:152
#4 0x00007ffff58ef983 in wxThreadInternal::PthreadStart(wxThread*) ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#5 0x00007ffff3187062 in start_thread (arg=0x7fffe7309700)
at pthread_create.c:312
#6 0x00007ffff249aa3d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 3 (Thread 0x7fffe7b0a700 (LWP 9154)):
---Type <return> to continue, or q <return> to quit---
#0 pthread_cond_wait@@GLIBC_2.3.2 ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007ffff58ee653 in wxConditionInternal::Wait() ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#2 0x00007ffff58ef1a8 in wxSemaphoreInternal::Wait() ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#3 0x00007ffff779984a in BackgroundThread::Entry (this=0xefc0b0)
at ./backgroundthread.h:152
#4 0x00007ffff58ef983 in wxThreadInternal::PthreadStart(wxThread*) ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#5 0x00007ffff3187062 in start_thread (arg=0x7fffe7b0a700)
at pthread_create.c:312
#6 0x00007ffff249aa3d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 2 (Thread 0x7fffe830b700 (LWP 9153)):
#0 pthread_cond_wait@@GLIBC_2.3.2 ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007ffff58ee653 in wxConditionInternal::Wait() ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#2 0x00007ffff58ef1a8 in wxSemaphoreInternal::Wait() ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#3 0x00007ffff779984a in BackgroundThread::Entry (this=0xefc078)
---Type <return> to continue, or q <return> to quit---
at ./backgroundthread.h:152
#4 0x00007ffff58ef983 in wxThreadInternal::PthreadStart(wxThread*) ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#5 0x00007ffff3187062 in start_thread (arg=0x7fffe830b700)
at pthread_create.c:312
#6 0x00007ffff249aa3d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 1 (Thread 0x7ffff7fb0a00 (LWP 8647)):
#0 0x0000000000000000 in ?? ()
#1 0x00007ffff61fea44 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) ()
from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#2 0x00007ffff61fee74 in wxAppBase::ProcessIdle() ()
from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#3 0x00007ffff6179e91 in ?? ()
from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#4 0x00007ffff33e4ce5 in g_main_context_dispatch ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007ffff33e5048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007ffff33e530a in g_main_loop_run ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7 0x00007ffff52f9147 in gtk_main ()
from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#8 0x00007ffff618d36a in wxEventLoop::Run() ()
from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#9 0x00007ffff61fec1c in wxAppBase::MainLoop() ()
from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#10 0x00000000004484fb in CodeBlocksApp::OnRun (this=0x7d3bb0) at app.cpp:818
#11 0x00007ffff589df7d in wxEntry(int&, wchar_t**) ()
from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#12 0x000000000043b962 in main (argc=3, argv=<optimized out>) at app.cpp:278
(gdb) continue
Continuing.
Program received signal SIGABRT, Aborted.
0x00007ffff23ea3a9 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory
(gdb) continue
Continuing.
[Thread 0x7fffe7b0a700 (LWP 9154) exited]
[Thread 0x7fffe7309700 (LWP 9155) exited]
[Thread 0x7fffd7dc1700 (LWP 9192) exited]
[Thread 0x7fffe830b700 (LWP 9153) exited]
[Thread 0x7ffff7fb0a00 (LWP 8647) exited]
Program terminated with signal SIGABRT, Aborted.
The program no longer exists.
@jens: Update about the crashing issue; it remains the same, but I think I got an idea of why it would crash (I hope i'm wrong with this):
(gdb) run -d -v
Starting program: /usr/bin/codeblocks -d -v
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe8303700 (LWP 16872)]
[New Thread 0x7fffe7b02700 (LWP 16873)]
[New Thread 0x7fffe7301700 (LWP 16874)]
[New Thread 0x7fffd8533700 (LWP 16907)]
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) thread apply all bt
Thread 5 (Thread 0x7fffd8533700 (LWP 16907)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007ffff58ee653 in wxConditionInternal::Wait() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#2 0x00007ffff58ef1a8 in wxSemaphoreInternal::Wait() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#3 0x00007fffdcfb4a62 in ClassBrowserBuilderThread::Entry (this=0x446d000) at classbrowserbuilderthread.cpp:193
#4 0x00007ffff58ef983 in wxThreadInternal::PthreadStart(wxThread*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#5 0x00007ffff3187062 in start_thread (arg=0x7fffd8533700) at pthread_create.c:312
#6 0x00007ffff2492bfd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 4 (Thread 0x7fffe7301700 (LWP 16874)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007ffff58ee653 in wxConditionInternal::Wait() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#2 0x00007ffff58ef1a8 in wxSemaphoreInternal::Wait() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#3 0x00007ffff779984a in BackgroundThread::Entry (this=0xefbb48) at ./backgroundthread.h:152
#4 0x00007ffff58ef983 in wxThreadInternal::PthreadStart(wxThread*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#5 0x00007ffff3187062 in start_thread (arg=0x7fffe7301700) at pthread_create.c:312
#6 0x00007ffff2492bfd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 3 (Thread 0x7fffe7b02700 (LWP 16873)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007ffff58ee653 in wxConditionInternal::Wait() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#2 0x00007ffff58ef1a8 in wxSemaphoreInternal::Wait() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#3 0x00007ffff779984a in BackgroundThread::Entry (this=0xefbb10) at ./backgroundthread.h:152
#4 0x00007ffff58ef983 in wxThreadInternal::PthreadStart(wxThread*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#5 0x00007ffff3187062 in start_thread (arg=0x7fffe7b02700) at pthread_create.c:312
#6 0x00007ffff2492bfd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 2 (Thread 0x7fffe8303700 (LWP 16872)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007ffff58ee653 in wxConditionInternal::Wait() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#2 0x00007ffff58ef1a8 in wxSemaphoreInternal::Wait() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#3 0x00007ffff779984a in BackgroundThread::Entry (this=0xefbad8) at ./backgroundthread.h:152
#4 0x00007ffff58ef983 in wxThreadInternal::PthreadStart(wxThread*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#5 0x00007ffff3187062 in start_thread (arg=0x7fffe8303700) at pthread_create.c:312
#6 0x00007ffff2492bfd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 1 (Thread 0x7ffff7fb0a00 (LWP 16370)):
#0 0x0000000000000000 in ?? ()
#1 0x00007ffff61fea44 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#2 0x00007ffff61fee74 in wxAppBase::ProcessIdle() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#3 0x00007ffff6179e91 in ?? () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#4 0x00007ffff33e4ce5 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007ffff33e5048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007ffff33e530a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7 0x00007ffff52f9147 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#8 0x00007ffff618d36a in wxEventLoop::Run() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#9 0x00007ffff61fec1c in wxAppBase::MainLoop() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-2.8.so.0
#10 0x00000000004484fb in CodeBlocksApp::OnRun (this=0x7d3bb0) at app.cpp:818
#11 0x00007ffff589df7d in wxEntry(int&, wchar_t**) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-2.8.so.0
#12 0x000000000043b962 in main (argc=3, argv=<optimized out>) at app.cpp:278
(gdb) continue
Continuing.
Program received signal SIGABRT, Aborted.
0x00007ffff23e23a9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) continue
Continuing.
[Thread 0x7fffd8533700 (LWP 16907) exited]
[Thread 0x7fffe8303700 (LWP 16872) exited]
[Thread 0x7ffff7fb0a00 (LWP 16370) exited]
[Thread 0x7fffe7b02700 (LWP 16873) exited]
Program terminated with signal SIGABRT, Aborted.
The program no longer exists.
(gdb)
While I am in xterm or whatever terminal that might be, and call Code::Blocks via GDB and keep event's attention to terminal, it works fine. If I run Code::Blocks inside GDB and use alt-TAB to switch to Code::Blocks' splash screen, it would work until the final GUI frame drawing on the right sidebar; that is where it breaks for some reason.
Is there a (painfully, thorough) way to debug UI layer on top of layer? I really am curious to see whether this issue is
- a Code::Blocks bug
- a wxGTK bug or
- a lib64 issue for some reason.
Cheers