Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Crash on startup linux

<< < (2/2)

oBFusCATed:
Hm, but then why would gdb interfere with the output?
Does running C::B from terminal cause the same crash?

oBFusCATed:
Hm, I've just tried it and I'm able to reproduce it... let's see if I can find what is causing it...

oBFusCATed:
I guess this is the reason  ::)


--- Code: ---==25420== Invalid read of size 8
==25420==    at 0x81AFDE1: wxFrame::OnInternalIdle() (frame.cpp:562)
==25420==    by 0x81CD828: wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) (appcmn.cpp:471)
==25420==    by 0x81CDD54: wxAppBase::ProcessIdle() (appcmn.cpp:443)
==25420==    by 0x814C501: wxapp_idle_callback (app.cpp:213)
==25420==    by 0x6AEC317: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3800.2)
==25420==    by 0x6AEC687: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
==25420==    by 0x6AECAE9: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3800.2)
==25420==    by 0x4F6F2E0: gtk_main (gtkmain.c:1257)
==25420==    by 0x81606C7: wxEventLoop::Run() (evtloop.cpp:76)
==25420==    by 0x81CDAFD: wxAppBase::MainLoop() (appcmn.cpp:312)
==25420==    by 0x451091: CodeBlocksApp::OnRun() (app.cpp:818)
==25420==    by 0x8836C84: wxEntry(int&, wchar_t**) (init.cpp:448)
==25420==  Address 0x1491d438 is 712 bytes inside a block of size 888 free'd
==25420==    at 0x4C2B0AC: operator delete(void*) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==25420==    by 0x508927: cbSplashScreen::~cbSplashScreen() (splashscreen.cpp:184)
==25420==    by 0x81CDBEA: wxAppBase::DeletePendingObjects() (appcmn.cpp:423)
==25420==    by 0x81CDD8B: wxAppBase::ProcessIdle() (appcmn.cpp:454)
==25420==    by 0x814C501: wxapp_idle_callback (app.cpp:213)
==25420==    by 0x6AEC317: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3800.2)
==25420==    by 0x6AEC687: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
==25420==    by 0x6AEC743: g_main_context_iteration (in /usr/lib64/libglib-2.0.so.0.3800.2)
==25420==    by 0x4F6F4E0: gtk_main_iteration (gtkmain.c:1345)
==25420==    by 0x8151BE4: wxClipboard::GetData(wxDataObject&) (clipbrd.cpp:599)
==25420==    by 0x8E83435: EditorManager::OnAppActivated(CodeBlocksEvent&) (editormanager.cpp:1762)
==25420==    by 0x8E84A5B: cbEventFunctor<EditorManager, CodeBlocksEvent>::Call(CodeBlocksEvent&) (in /home/obfuscated/projects/codeblocks/git/src/devel/libcodeblocks.so)

--- End code ---

oBFusCATed:
This patch seems to fix it, but I'm not really sure why.
Also I'm not sure what would be the problems caused by the removal of this code.

Can someone test this on windows, plus all the affected linux users test it, so they can verify the problem is gone?


--- Code: ---Index: src/src/splashscreen.cpp
===================================================================
--- src/src/splashscreen.cpp    (revision 9742)
+++ src/src/splashscreen.cpp    (working copy)
@@ -103,9 +103,9 @@ void cbSplashScreen::OnTimer(wxTimerEvent &)

 void cbSplashScreen::OnCloseWindow(wxCloseEvent &)
 {
-    m_timer.Stop();
-    // Don't destroy it here. It creates a dangling pointer in app.cpp and crashes C::B
-    Hide();
+//    m_timer.Stop();
+//    // Don't destroy it here. It creates a dangling pointer in app.cpp and crashes C::B
+//    Hide();
 }

 void cbSplashScreen::OnChar(wxKeyEvent &)

--- End code ---

BlueHazzard:
I can now reproduce the bug with gdb. With your patch it doesn't crash within gdb any more, but if i start it from the terminal the crash still happen...
Linux Mint 15

What is this output? valgrind?

greetings

Navigation

[0] Message Index

[*] Previous page

Go to full version