User forums > General (but related to Code::Blocks)
Code::Blocks crashes during project reload
alexchen:
I am using version 17.12 on CentOS 7.5 I encounter a crash when several project files, i.e. *.cbp, are modified externally via a editor and Code::Blocks offers to reload these projects.
This is the stack trace from the dump file:
===============
$ gdb /usr/bin/codeblocks /var/crash/codeblocks.crash
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-110.el7
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-redhat-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/bin/codeblocks...(no debugging symbols found)...done.
(no debugging symbols found)...done.
[New LWP 57762]
[New LWP 58025]
[New LWP 57778]
[New LWP 57813]
[New LWP 32592]
[New LWP 57930]
[New LWP 32591]
[New LWP 57822]
[New LWP 32590]
[New LWP 32593]
[New LWP 57812]
[New LWP 57811]
[New LWP 57780]
[New LWP 32589]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `codeblocks'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000000000 in ?? ()
Missing separate debuginfos, use: debuginfo-install codeblocks-17.12-1.el7.centos.x86_64
(gdb) where
#0 0x0000000000000000 in ()
#1 0x00007ff2b89f980c in ProjectManager::AddProjectDependency(cbProject*, cbProject*) () at /lib64/libcodeblocks.so.0
#2 0x00007ff2b89faf5e in ProjectManager::ReloadProject(cbProject*) () at /lib64/libcodeblocks.so.0
#3 0x00000000004cc745 in ProjectManagerUI::CheckForExternallyModifiedProjects() ()
#4 0x00000000004448e8 in CodeBlocksApp::OnAppActivate(wxActivateEvent&) ()
#5 0x00007ff2b6485746 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () at /lib64/libwx_baseu-2.8.so.0
#6 0x00007ff2b64857eb in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () at /lib64/libwx_baseu-2.8.so.0
#7 0x00007ff2b6485b57 in wxEvtHandler::ProcessEvent(wxEvent&) () at /lib64/libwx_baseu-2.8.so.0
#8 0x00007ff2b6d9d128 in wxAppBase::SetActive(bool, wxWindow*) () at /lib64/libwx_gtk2u_core-2.8.so.0
#9 0x00007ff2b6d78399 in wxFrame::OnInternalIdle() () at /lib64/libwx_gtk2u_core-2.8.so.0
#10 0x00007ff2b6d9d19f in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () at /lib64/libwx_gtk2u_core-2.8.so.0
#11 0x00007ff2b6d9d654 in wxAppBase::ProcessIdle() () at /lib64/libwx_gtk2u_core-2.8.so.0
#12 0x00007ff2b6d134b1 in wxapp_idle_callback () at /lib64/libwx_gtk2u_core-2.8.so.0
#13 0x00007ff2b4178557 in g_idle_dispatch () at /lib64/libglib-2.0.so.0
#14 0x00007ff2b417b969 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#15 0x00007ff2b417bcc8 in g_main_context_iterate.isra.22 () at /lib64/libglib-2.0.so.0
#16 0x00007ff2b417bf9a in g_main_loop_run () at /lib64/libglib-2.0.so.0
#17 0x00007ff2b5e57247 in gtk_main () at /lib64/libgtk-x11-2.0.so.0
#18 0x00007ff2b6d2718a in wxEventLoop::Run() () at /lib64/libwx_gtk2u_core-2.8.so.0
#19 0x00007ff2b6d9d3eb in wxAppBase::MainLoop() () at /lib64/libwx_gtk2u_core-2.8.so.0
#20 0x0000000000449fb0 in CodeBlocksApp::OnRun() ()
#21 0x00007ff2b642e75d in wxEntry(int&, wchar_t**) () at /lib64/libwx_baseu-2.8.so.0
#22 0x0000000000436ee2 in main ()
(gdb) info threads
Id Target Id Frame
14 Thread 0x7ff27d87e700 (LWP 32589) 0x00007ff2b3c7a995 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
13 Thread 0x7ff2a0e30700 (LWP 57780) 0x00007ff2b2f71f0d in poll () from /lib64/libc.so.6
12 Thread 0x7ff29affd700 (LWP 57811) 0x00007ff2b3c7a995 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
11 Thread 0x7ff29a7fc700 (LWP 57812) 0x00007ff2b3c7a995 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
10 Thread 0x7ff27dc80700 (LWP 32593) 0x00007ff2b3c7a995 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
9 Thread 0x7ff27d67d700 (LWP 32590) 0x00007ff2b3c7a995 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
8 Thread 0x7ff298a19700 (LWP 57822) 0x00007ff2b3c7a995 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
7 Thread 0x7ff29b7fe700 (LWP 32591) 0x00007ff2b3c7a995 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
6 Thread 0x7ff29bfff700 (LWP 57930) 0x00007ff2b3c7d51d in __lll_lock_wait () from /lib64/libpthread.so.0
5 Thread 0x7ff27ec82700 (LWP 32592) 0x00007ff2b3c7a995 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
4 Thread 0x7ff299ffb700 (LWP 57813) 0x00007ff2b3c7a995 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
3 Thread 0x7ff2a1631700 (LWP 57778) 0x00007ff2b2f71f0d in poll () from /lib64/libc.so.6
2 Thread 0x7ff27f483700 (LWP 58025) 0x00007ff2b2f73c73 in select () from /lib64/libc.so.6
* 1 Thread 0x7ff2b91a4a40 (LWP 57762) 0x0000000000000000 in ?? ()
==========
It seems to me that the ProjectManager object has been deleted when the call happens.
It would be nice to build Code::Blocks with '-g' flag in projection build so that the line numbers are included in the dump file to facilitate crash analysis. (It can co-exist with the optimization flag, e.g. -O3)
BlueHazzard:
You can build codeblocks quite easy by yourself, with the benefit to have the latest code, because 17.12 is quite old and there were tons of bugfixes...
oBFusCATed:
This particular one is fixed in trunk...
alexchen:
I downloaded the source code from trunk and the README file still still says "This is the Code::Blocks IDE version 17.12'. Is it the latest copy?
I encountered another crash today. It seems like a different issue.
I use Code::Blocks within my build script for multiple workspaces to build a RPM.
Do not know if the crash is a problem in libwx_baseu-2.8 or Code::Blocks.
=========
$ gdb /usr/bin/codeblocks /var/crash/codeblocks.crash
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-110.el7
....
[New LWP 56248]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/bin/codeblocks --no-splash-screen --no-ipc --debug-log --build --target=Release64'.
Program terminated with signal 6, Aborted.
#0 0x00007f8e3f505277 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install codeblocks-17.12-1.el7.centos.x86_64
(gdb) where
#0 0x00007f8e3f505277 in raise () at /lib64/libc.so.6
#1 0x00007f8e3f506968 in abort () at /lib64/libc.so.6
#2 0x00007f8e3f547d37 in __libc_message () at /lib64/libc.so.6
#3 0x00007f8e3f54fda7 in malloc_consolidate () at /lib64/libc.so.6
#4 0x00007f8e3f551275 in _int_malloc () at /lib64/libc.so.6
#5 0x00007f8e3f55484c in malloc () at /lib64/libc.so.6
#6 0x00007f8e42a9d6d7 in wxStringBase::AllocBuffer(unsigned long) () at /lib64/libwx_baseu-2.8.so.0
#7 0x00007f8e42a9d866 in wxStringBase::AllocBeforeWrite(unsigned long) () at /lib64/libwx_baseu-2.8.so.0
#8 0x00007f8e42a9f7f9 in wxString::GetWriteBuf(unsigned long) () at /lib64/libwx_baseu-2.8.so.0
#9 0x00007f8e42aa0e57 in wxString::PrintfV(wchar_t const*, __va_list_tag*) () at /lib64/libwx_baseu-2.8.so.0
#10 0x00007f8e42aa103b in wxString::FormatV(wchar_t const*, __va_list_tag*) () at /lib64/libwx_baseu-2.8.so.0
#11 0x000000000044afa2 in F(wchar_t const*, ...) ()
#12 0x00007f8e4504a287 in ProjectManager::RemoveProjectFromAllDependencies(cbProject*) () at /lib64/libcodeblocks.so.0
#13 0x00007f8e4504ab9c in ProjectManager::CloseProject(cbProject*, bool, bool) () at /lib64/libcodeblocks.so.0
#14 0x00007f8e4504ae96 in ProjectManager::CloseAllProjects(bool) () at /lib64/libcodeblocks.so.0
#15 0x00007f8e4504b021 in ProjectManager::CloseWorkspace() () at /lib64/libcodeblocks.so.0
#16 0x00000000004a7c1a in MainFrame::OnApplicationClose(wxCloseEvent&) ()
#17 0x00007f8e42ad6746 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () at lib64/libwx_baseu-2.8.so.0
#18 0x00007f8e42ad67eb in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () at /lib64/libwx_baseu-2.8.so.0
#19 0x00007f8e42ad6b57 in wxEvtHandler::ProcessEvent(wxEvent&) () at /lib64/libwx_baseu-2.8.so.0
#20 0x00007f8e42ad6ae0 in wxEvtHandler::ProcessEvent(wxEvent&) () at /lib64/libwx_baseu-2.8.so.0
#21 0x00007f8e42ad6ae0 in wxEvtHandler::ProcessEvent(wxEvent&) () at /lib64/libwx_baseu-2.8.so.0
#22 0x00007f8e42ad6ae0 in wxEvtHandler::ProcessEvent(wxEvent&) () at /lib64/libwx_baseu-2.8.so.0
#23 0x00007f8e42ad6ae0 in wxEvtHandler::ProcessEvent(wxEvent&) () at /lib64/libwx_baseu-2.8.so.0
#24 0x00007f8e42ad6ae0 in wxEvtHandler::ProcessEvent(wxEvent&) () at /lib64/libwx_baseu-2.8.so.0
#25 0x00007f8e42ad6ae0 in wxEvtHandler::ProcessEvent(wxEvent&) () at /lib64/libwx_baseu-2.8.so.0
#26 0x00007f8e42ad6ae0 in wxEvtHandler::ProcessEvent(wxEvent&) () at /lib64/libwx_baseu-2.8.so.0
#27 0x00007f8e42ad6ae0 in wxEvtHandler::ProcessEvent(wxEvent&) () at /lib64/libwx_baseu-2.8.so.0
#28 0x00007f8e434606fc in wxWindowBase::Close(bool) () at /lib64/libwx_gtk2u_core-2.8.so.0
#29 0x000000000044948e in CodeBlocksApp::OnInit() ()
#30 0x00007f8e42a7f74c in wxEntry(int&, wchar_t**) () at /lib64/libwx_baseu-2.8.so.0
#31 0x0000000000436ee2 in main ()
(gdb) info threads
Id Target Id Frame
7 Thread 0x7f8e26ffd700 (LWP 56248) 0x00007f8e402cb995 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
6 Thread 0x7f8e267fc700 (LWP 56249) 0x00007f8e402cb995 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
5 Thread 0x7f8e277fe700 (LWP 56247) 0x00007f8e402cb995 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
4 Thread 0x7f8e2de95700 (LWP 56165) 0x00007f8e3f5c2f0d in poll () from /lib64/libc.so.6
3 Thread 0x7f8e2d694700 (LWP 56166) 0x00007f8e3f5c2f0d in poll () from /lib64/libc.so.6
2 Thread 0x7f8e2ce93700 (LWP 56167) 0x00007f8e3f5c7ec9 in syscall () from /lib64/libc.so.6
* 1 Thread 0x7f8e457f5a40 (LWP 56163) 0x00007f8e3f505277 in raise () from /lib64/libc.so.6
(gdb) thread 2
[Switching to thread 2 (Thread 0x7f8e2ce93700 (LWP 56167))]
#0 0x00007f8e3f5c7ec9 in syscall () from /lib64/libc.so.6
(gdb) where
#0 0x00007f8e3f5c7ec9 in syscall () at /lib64/libc.so.6
#1 0x00007f8e4081164e in g_cond_wait_until () at /lib64/libglib-2.0.so.0
#2 0x00007f8e407a1a21 in g_async_queue_pop_intern_unlocked () at /lib64/libglib-2.0.so.0
#3 0x00007f8e407a1fdb in g_async_queue_timeout_pop () at /lib64/libglib-2.0.so.0
#4 0x00007f8e407f43cc in g_thread_pool_thread_proxy () at /lib64/libglib-2.0.so.0
#5 0x00007f8e407f3970 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#6 0x00007f8e402c7e25 in start_thread () at /lib64/libpthread.so.0
#7 0x00007f8e3f5cdbad in clone () at /lib64/libc.so.6
(gdb) thread 3
[Switching to thread 3 (Thread 0x7f8e2d694700 (LWP 56166))]
#0 0x00007f8e3f5c2f0d in poll () from /lib64/libc.so.6
(gdb) where
#0 0x00007f8e3f5c2f0d in poll () at /lib64/libc.so.6
#1 0x00007f8e407ccc4c in g_main_context_iterate.isra.22 () at /lib64/libglib-2.0.so.0
#2 0x00007f8e407ccf9a in g_main_loop_run () at /lib64/libglib-2.0.so.0
#3 0x00007f8e41bafbe6 in gdbus_shared_thread_func () at /lib64/libgio-2.0.so.0
#4 0x00007f8e407f3970 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#5 0x00007f8e402c7e25 in start_thread () at /lib64/libpthread.so.0
#6 0x00007f8e3f5cdbad in clone () at /lib64/libc.so.6
(gdb) thread 4
[Switching to thread 4 (Thread 0x7f8e2de95700 (LWP 56165))]
#0 0x00007f8e3f5c2f0d in poll () from /lib64/libc.so.6
(gdb) where
#0 0x00007f8e3f5c2f0d in poll () at /lib64/libc.so.6
#1 0x00007f8e407ccc4c in g_main_context_iterate.isra.22 () at /lib64/libglib-2.0.so.0
#2 0x00007f8e407ccd7c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3 0x00007f8e407ccdb9 in glib_worker_main () at /lib64/libglib-2.0.so.0
#4 0x00007f8e407f3970 in g_thread_proxy () at /lib64/libglib-2.0.so.0
#5 0x00007f8e402c7e25 in start_thread () at /lib64/libpthread.so.0
#6 0x00007f8e3f5cdbad in clone () at /lib64/libc.so.6
oBFusCATed:
--- Quote from: alexchen on January 29, 2019, 03:05:33 am ---I downloaded the source code from trunk and the README file still still says "This is the Code::Blocks IDE version 17.12'. Is it the latest copy?
--- End quote ---
Yes, it is the latest version. We've not made a release, so we've not changed the version number.
--- Quote from: alexchen on January 29, 2019, 03:05:33 am ---I encountered another crash today. It seems like a different issue.
--- End quote ---
Is this with the new version? How have you built/installed it?
--- Quote from: alexchen on January 29, 2019, 03:05:33 am ---I use Code::Blocks within my build script for multiple workspaces to build a RPM.
--- End quote ---
What do you mean by this?
p.s. Please use code or quote tags when pasting long texts!
Navigation
[0] Message Index
[#] Next page
Go to full version