Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
LINUX: Tools Run Crash and Company...
mandrav:
--- Quote from: moloh on May 16, 2006, 07:47:43 pm ---I manage to test same configuration (or similar one) on Windows machine. And what? It works... how suprising.
But i use LINUX, may someone help me to debug this problem? Maybe some instructions how this can be made. I want it fixed, i may even try to hack Code::Blocks sources.
--- End quote ---
Surprise: I mainly use linux and everything works here too (3 installations, all debian based).
Try the following please:
--- Code: ---make clean-zipfiles
make clean-bin
make
make install
--- End code ---
moloh:
--- Quote from: thomas on May 16, 2006, 08:34:38 pm ---
--- Quote from: moloh on May 16, 2006, 07:47:43 pm ---I manage to test same configuration (or similar one) on Windows machine. And what? It works... how suprising.
--- End quote ---
That confirms the suspicion that I was getting after reading your other thread. Possibly the problem is not to be found in Code::Blocks at all, but in some weird configuration (or buggy library versions) of your gentoo system.
It just seems strange that nothing works for you whereas it mostly works quite OK for everybody.
--- End quote ---
Maybe, but this would be the first application that works weird. As for wxWidgets i use onlt aMule - it works stable. But hey i use gcc-4.1, who knows implications.
At weekend i will install some binary distribution, probably debian and see results. When i will heve some new info i will post it here.
moloh:
New informations...
I managed to install debian unstable, get newest svn build (i use a ubuntu deb package http://forums.codeblocks.org/index.php?topic=3172.0) and get crash with tools.
What i have done?
Added tool named: ln
Executable: ln
Parameters: --help
Run this and crash. Valgrind output, i have to say it is slighty different, it has slighty different trace, why? i don't have any idea, but problem is with the same element.
--- Code: ---==4175== Invalid read of size 4
==4175== at 0x465A8CA: wxTimer::Stop() (in /usr/lib/libwx_gtk2u_core-2.6.so.0.3.1)
==4175== by 0x420068F: ToolsManager::OnToolTerminated(CodeBlocksEvent&) (in /usr/lib/libcodeblocks.so.0.0.1)
==4175== by 0x48AE814: wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x49403F2: wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x49405FE: wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x49407DE: wxEvtHandler::ProcessEvent(wxEvent&) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x4940E45: wxEvtHandler::ProcessPendingEvents() (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x48AEB7B: wxAppConsole::ProcessPendingEvents() (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x4634F9B: (within /usr/lib/libwx_gtk2u_core-2.6.so.0.3.1)
==4175== by 0x527A7C0: (within /usr/lib/libglib-2.0.so.0.1000.2)
==4175== by 0x52781AB: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.1000.2)
==4175== by 0x527B63A: (within /usr/lib/libglib-2.0.so.0.1000.2)
==4175== Address 0x698647C is 0 bytes after a block of size 164 alloc'd
==4175== at 0x401C825: operator new(unsigned) (vg_replace_malloc.c:164)
==4175== by 0x4180617: Manager::GetToolsManager() const (in /usr/lib/libcodeblocks.so.0.0.1)
==4175== by 0x808D546: (within /usr/bin/codeblocks)
==4175== by 0x808E3F7: (within /usr/bin/codeblocks)
==4175== by 0x808F198: (within /usr/bin/codeblocks)
==4175== by 0x806609D: (within /usr/bin/codeblocks)
==4175== by 0x8066E40: (within /usr/bin/codeblocks)
==4175== by 0x80680FE: wxAppConsole::CallOnInit() (in /usr/bin/codeblocks)
==4175== by 0x48E56BF: wxEntry(int&, wchar_t**) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x48E57A5: wxEntry(int&, char**) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x8062A43: (within /usr/bin/codeblocks)
==4175== by 0x4AC8EAF: (below main) (in /lib/tls/libc-2.3.6.so)
==4175==
==4175== Invalid write of size 4
==4175== at 0x465A8DA: wxTimer::Stop() (in /usr/lib/libwx_gtk2u_core-2.6.so.0.3.1)
==4175== by 0x420068F: ToolsManager::OnToolTerminated(CodeBlocksEvent&) (in /usr/lib/libcodeblocks.so.0.0.1)
==4175== by 0x48AE814: wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) const (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x49403F2: wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x49405FE: wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x49407DE: wxEvtHandler::ProcessEvent(wxEvent&) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x4940E45: wxEvtHandler::ProcessPendingEvents() (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x48AEB7B: wxAppConsole::ProcessPendingEvents() (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x4634F9B: (within /usr/lib/libwx_gtk2u_core-2.6.so.0.3.1)
==4175== by 0x527A7C0: (within /usr/lib/libglib-2.0.so.0.1000.2)
==4175== by 0x52781AB: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.1000.2)
==4175== by 0x527B63A: (within /usr/lib/libglib-2.0.so.0.1000.2)
==4175== Address 0x698647C is 0 bytes after a block of size 164 alloc'd
==4175== at 0x401C825: operator new(unsigned) (vg_replace_malloc.c:164)
==4175== by 0x4180617: Manager::GetToolsManager() const (in /usr/lib/libcodeblocks.so.0.0.1)
==4175== by 0x808D546: (within /usr/bin/codeblocks)
==4175== by 0x808E3F7: (within /usr/bin/codeblocks)
==4175== by 0x808F198: (within /usr/bin/codeblocks)
==4175== by 0x806609D: (within /usr/bin/codeblocks)
==4175== by 0x8066E40: (within /usr/bin/codeblocks)
==4175== by 0x80680FE: wxAppConsole::CallOnInit() (in /usr/bin/codeblocks)
==4175== by 0x48E56BF: wxEntry(int&, wchar_t**) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x48E57A5: wxEntry(int&, char**) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x8062A43: (within /usr/bin/codeblocks)
==4175== by 0x4AC8EAF: (below main) (in /lib/tls/libc-2.3.6.so)
==4175==
==4175== Invalid read of size 4
==4175== at 0x465ABF2: (within /usr/lib/libwx_gtk2u_core-2.6.so.0.3.1)
==4175== by 0x5279FA5: (within /usr/lib/libglib-2.0.so.0.1000.2)
==4175== by 0x52781AB: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.1000.2)
==4175== by 0x527B63A: (within /usr/lib/libglib-2.0.so.0.1000.2)
==4175== by 0x527B996: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.1000.2)
==4175== by 0x4EB2340: gtk_main (in /usr/lib/libgtk-x11-2.0.so.0.800.17)
==4175== by 0x4650B37: wxEventLoop::Run() (in /usr/lib/libwx_gtk2u_core-2.6.so.0.3.1)
==4175== by 0x46EDB48: wxAppBase::MainLoop() (in /usr/lib/libwx_gtk2u_core-2.6.so.0.3.1)
==4175== by 0x46EDC40: wxAppBase::OnRun() (in /usr/lib/libwx_gtk2u_core-2.6.so.0.3.1)
==4175== by 0x8064A4D: (within /usr/bin/codeblocks)
==4175== by 0x48E56E9: wxEntry(int&, wchar_t**) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== by 0x48E57A5: wxEntry(int&, char**) (in /usr/lib/libwx_baseu-2.6.so.0.3.1)
==4175== Address 0x44 is not stack'd, malloc'd or (recently) free'd
--- End code ---
Additionally this build produced a file codeblocks.xml:
--- Code: ---<?xml version="1.0" encoding="utf-8"?>
<report version="1.0" kind="exception">
<system description="Linux 2.6.16-1-k7 i686"/>
<modules>
<module path="/lib/ld-2.3.6.so" address="04000000" size="00017000" version="2.3.6"/>
<module path="/usr/lib/valgrind/x86-linux/vgpreload_core.so" address="04019000" size="00002000" version="linux/vgpreload_core"/>
<module path="/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so" address="0401f000" size="00001000" version="linux/vgpreload_memcheck"/>
<module path="/usr/lib/gconv/ISO8859-1.so" address="04021000" size="00002000" version="1"/>
<module path="/usr/lib/X11/locale/common/xlcDef.so.2.0.0" address="04025000" size="00001000" version="2.0.0"/>
<module path="/usr/lib/libcodeblocks.so.0.0.1" address="04029000" size="00347000" version="0.0.1"/>
<module path="/lib/tls/libpthread-2.3.6.so" address="04374000" size="00010000" version="2.3.6"/>
<module path="/lib/tls/libdl-2.3.6.so" address="04386000" size="00004000" version="2.3.6"/>
<module path="/usr/lib/libwx_gtk2u_xrc-2.6.so.0.3.1" address="0438b000" size="00082000" version="0.3.1"/>
<module path="/usr/lib/libwx_gtk2u_qa-2.6.so.0.3.1" address="0440e000" size="00020000" version="0.3.1"/>
<module path="/usr/lib/libwx_gtk2u_html-2.6.so.0.3.1" address="044b2000" size="00005000" version="0.3.1"/>
<module path="/usr/lib/libwx_gtk2u_adv-2.6.so.0.3.1" address="044b8000" size="0009b000" version="0.3.1"/>
<module path="/usr/lib/libwx_gtk2u_core-2.6.so.0.3.1" address="04555000" size="002e1000" version="0.3.1"/>
<module path="/usr/lib/libwx_baseu_xml-2.6.so.0.3.1" address="0483d000" size="00009000" version="0.3.1"/>
<module path="/usr/lib/libwx_baseu_net-2.6.so.0.3.1" address="04870000" size="00002000" version="0.3.1"/>
<module path="/usr/lib/libwx_baseu-2.6.so.0.3.1" address="04987000" size="0000e000" version="0.3.1"/>
<module path="/usr/lib/libstdc++.so.6.0.8" address="049a2000" size="000db000" version="6.0.8"/>
<module path="/lib/tls/libm-2.3.6.so" address="04a83000" size="00026000" version="2.3.6"/>
<module path="/lib/libgcc_s.so.1" address="04ab3000" size="00001000" version="1"/>
<module path="/lib/tls/libc-2.3.6.so" address="04be2000" size="00008000" version="2.3.6"/>
<module path="/usr/lib/libwxscintilla.so.0.0.1" address="04bed000" size="00102000" version="0.0.1"/>
<module path="/usr/lib/libgdk-x11-2.0.so.0.800.17" address="04cf0000" size="00082000" version="0.800.17"/>
<module path="/usr/lib/libz.so.1.2.3" address="04d85000" size="00001000" version="1.2.3"/>
<module path="/usr/lib/libgtk-x11-2.0.so.0.800.17" address="0506e000" size="00009000" version="0.800.17"/>
<module path="/usr/lib/libatk-1.0.so.0.1114.0" address="0507a000" size="0001a000" version="0.1114.0"/>
<module path="/usr/lib/libgdk_pixbuf-2.0.so.0.800.17" address="05095000" size="00016000" version="0.800.17"/>
<module path="/usr/lib/libfontconfig.so.1.0.4" address="050d4000" size="00005000" version="1.0.4"/>
<module path="/usr/lib/libXext.so.6.4.0" address="050da000" size="0000e000" version="6.4.0"/>
<module path="/usr/lib/libXrender.so.1.3.0" address="050ef000" size="00001000" version="1.3.0"/>
<module path="/usr/lib/libXinerama.so.1.0.0" address="050f2000" size="00001000" version="1.0.0"/>
<module path="/usr/lib/libXi.so.6.0.0" address="050fa000" size="00001000" version="6.0.0"/>
<module path="/usr/lib/libXrandr.so.2.0.0" address="050fc000" size="00004000" version="2.0.0"/>
<module path="/usr/lib/libXcursor.so.1.0.2" address="05108000" size="00001000" version="1.0.2"/>
<module path="/usr/lib/libXfixes.so.3.0.0" address="0510d000" size="00001000" version="3.0.0"/>
<module path="/usr/lib/libpango-1.0.so.0.1200.1" address="05145000" size="00002000" version="0.1200.1"/>
<module path="/usr/lib/libX11.so.6.2.0" address="0520c000" size="00003000" version="6.2.0"/>
<module path="/usr/lib/libgobject-2.0.so.0.1000.2" address="05249000" size="00001000" version="0.1000.2"/>
<module path="/usr/lib/libgmodule-2.0.so.0.1000.2" address="0524b000" size="00004000" version="0.1000.2"/>
<module path="/usr/lib/libgthread-2.0.so.0.1000.2" address="05252000" size="00001000" version="0.1000.2"/>
<module path="/usr/lib/libglib-2.0.so.0.1000.2" address="052da000" size="00001000" version="0.1000.2"/>
<module path="/usr/lib/libpng12.so.0.1.2.8" address="052ff000" size="00001000" version="0.1.2.8"/>
<module path="/usr/lib/libjpeg.so.62.0.0" address="0531f000" size="00001000" version="62.0.0"/>
<module path="/usr/lib/libtiff.so.4.2.1" address="05372000" size="00003000" version="4.2.1"/>
<module path="/usr/lib/libexpat.so.1.0.0" address="05376000" size="00020000" version="1.0.0"/>
<module path="/usr/lib/libpangocairo-1.0.so.0.1200.1" address="0539d000" size="00001000" version="0.1200.1"/>
<module path="/usr/lib/libcairo.so.2.2.4" address="053e7000" size="00001000" version="2.2.4"/>
<module path="/usr/lib/libfreetype.so.6.3.10" address="053e9000" size="0006c000" version="6.3.10"/>
<module path="/usr/lib/libXau.so.6.0.0" address="05457000" size="00001000" version="6.0.0"/>
<module path="/usr/lib/libXdmcp.so.6.0.0" address="0545b000" size="00002000" version="6.0.0"/>
<module path="/usr/lib/libpangoft2-1.0.so.0.1200.1" address="05481000" size="00001000" version="0.1200.1"/>
<module path="/usr/lib/locale/locale-archive" address="05585000" size="00047000"/>
<module path="/usr/lib/pango/1.5.0/modules/pango-basic-fc.so" address="055d6000" size="00003000" version="fc"/>
<module path="/lib/tls/libnss_compat-2.3.6.so" address="055df000" size="00009000" version="2.3.6"/>
<module path="/lib/tls/libnsl-2.3.6.so" address="055fa000" size="00002000" version="2.3.6"/>
<module path="/lib/tls/libnss_nis-2.3.6.so" address="055fe000" size="0000a000" version="2.3.6"/>
<module path="/lib/tls/libnss_files-2.3.6.so" address="05612000" size="00002000" version="2.3.6"/>
<module path="/usr/lib/gtk-2.0/2.4.0/engines/libclearlooks.so" address="0572e000" size="00013000" version="2.0/2.4.0/engines/libclearlooks"/>
<module path="/usr/lib/libart_lgpl_2.so.2.3.17" address="05756000" size="00001000" version="2.3.17"/>
<module path="/usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-xpm.so" address="0575d000" size="00001000" version="xpm"/>
<module path="/usr/lib/libgnomeprint-2-2.so.0.1.0" address="05c61000" size="00063000" version="0.1.0"/>
<module path="/usr/lib/libxml2.so.2.6.24" address="05dd7000" size="00005000" version="2.6.24"/>
<module path="/usr/lib/libgnomeprintui-2-2.so.0.1.0" address="05ddd000" size="00038000" version="0.1.0"/>
<module path="/usr/lib/libgnomecanvas-2.so.0.1400.0" address="05e3f000" size="00001000" version="0.1400.0"/>
<module path="/SYSV00000000" address="06e40000" size="00060000"/>
<module path="/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf" address="072e5000" size="00054000"/>
<module path="/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf" address="07353000" size="00024000"/>
<module path="/usr/share/codeblocks/plugins/libprojectwizard.so" address="073d7000" size="0004a000"/>
<module path="/usr/share/codeblocks/plugins/libwxsmith.so" address="075a4000" size="00017000"/>
<module path="/usr/share/codeblocks/plugins/libastyle.so" address="075bf000" size="0004a000"/>
<module path="/usr/share/codeblocks/plugins/libcodestat.so" address="07630000" size="00002000"/>
<module path="/usr/share/codeblocks/plugins/libtodo.so" address="07661000" size="00003000"/>
<module path="/usr/share/codeblocks/plugins/libdefaultmimehandler.so" address="07686000" size="00002000"/>
<module path="/usr/share/codeblocks/plugins/libkeybinder.so" address="076ce000" size="00003000"/>
<module path="/usr/share/codeblocks/plugins/libpluginwizard.so" address="076f4000" size="00002000"/>
<module path="/usr/share/codeblocks/plugins/libprofiler.so" address="07721000" size="00002000"/>
<module path="/usr/share/codeblocks/plugins/libclasswizard.so" address="07731000" size="00001000"/>
<module path="/usr/share/codeblocks/plugins/libhelp_plugin.so" address="07758000" size="00002000"/>
<module path="/usr/share/codeblocks/plugins/libcodecompletion.so" address="077eb000" size="00005000"/>
<module path="/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-Bold.ttf" address="07ff9000" size="00043000"/>
<module path="/usr/bin/codeblocks" address="080d6000" size="00006000"/>
<module path="/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf" address="08bdd000" size="00031000"/>
<module path="/usr/lib/valgrind/x86-linux/memcheck" address="0a143000" size="00001000"/>
<module path="[stack]" address="afa5b000" size="00015000"/>
</modules>
<stack>
<frame level="2" function="wxStackWalker::Walk(unsigned int)" offset="0000002e"/>
<frame level="3" function="wxDebugReport::AddContext(wxDebugReport::Context)" offset="000009f2"/>
<frame level="4" function="wxDebugReport::AddAll(wxDebugReport::Context)" offset="00000018"/>
<frame level="5" function="wxHtmlWindow::LoadPage(wxString const&)" offset="00000cdc"/>
<frame level="6" function="wxFatalSignalHandler" offset="00000026"/>
<frame level="7"/>
<frame level="8"/>
<frame level="9"/>
<frame level="10" function="g_main_context_dispatch" offset="000001fc"/>
<frame level="11"/>
<frame level="12" function="g_main_loop_run" offset="000001f7"/>
<frame level="13" function="gtk_main" offset="000000c1"/>
<frame level="14" function="wxEventLoop::Run()" offset="00000058"/>
<frame level="15" function="wxAppBase::MainLoop()" offset="00000059"/>
<frame level="16" function="wxAppBase::OnRun()" offset="00000021"/>
<frame level="17"/>
<frame level="18" function="wxEntry(int&, wchar_t**)" offset="0000006a"/>
<frame level="19" function="wxEntry(int&, char**)" offset="00000036"/>
<frame level="20" function="EditorBase::CreateContextSubMenu(int)" offset="000002bc"/>
</stack>
</report>
--- End code ---
I contacted with one other Gentoo User but he doesn't have these strange crash problems.
One more thought, this problem is with last element of class ToolsManager, wxTimer, so maybe it could be a problem with structure alignment? But this is a blind shoot...
I can't send anything about debian configuration, nor how this binary package was created but i can give some specific informations about my system configuration, but i must say, i don't use anything weird, i never had problems with any library configuration, also i use one more wxWidgets application (aMule) and it works without problems.
mandrav:
Here you go:
--- Code: (cpp) ---void ToolsManager::OnToolTerminated(CodeBlocksEvent& event)
{
m_Timer.Stop(); // <-- your crash is here
m_Pid = 0;
m_pProcess = 0;
Manager::Get()->GetMessageManager()->Log(_T("Tool execution terminated with status %d"), event.GetInt());
}
--- End code ---
It makes no sense, because m_Timer is a member object (not a pointer). The only time this could be invalid is if the ToolsManager class is not constructed yet. But this can't be the case because it's a singleton. It exists throughout the application lifetime. And, if I 'm not mistaken, you don't get the crash on startup or on shutdown, but during a normal run. Right?
--- Quote ---i never had problems with any library configuration, also i use one more wxWidgets application (aMule) and it works without problems.
--- End quote ---
This means absolutely nothing. Nil.
The fact that two apps use the same widgets lib under the hood doesn't necessarily indicate faulty usage in one of them (if one is misbehaving). Especially if that lib is wxWidgets. You can have it configured in so many ways (static/shared, monolithic/modular, unicode/ansi, etc).
--- Quote ---I can't send anything about debian configuration, nor how this binary package was created but i can give some specific informations about my system configuration
--- End quote ---
And you really want to get help after stating this?
Well, I will ask for info and you decide if you want to give me some.
I need the output of the following commands:
--- Code: ---wx-config --cflags
wx-config --libs
ldd codeblocks
ldd libcodeblocks.so
--- End code ---
(I just hope you 're not using a static wxWidgets build)
Michael:
Hallo,
I have checked both under Gentoo (rev2489) and Ubuntu 5.10 (.deb package rev2484). I have added ln as tool with --help as parameter.
Gentoo works fine, but Ubuntu crashes. It crashes when I press enter (but also with the X button) to close the command line windows and generates the same error report as posted by moloh.
It is possible that this is just a problem of the .deb package instead of C::B itself.
Moloh could you try a previous revision of C::B? And also the new built I will provided today (or tomorrow morning). Thanks :).
Best wishes,
Michael
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version