I am using rev 3126.
CodeBlocks crashes when I try to open menu Settings/Compiler and debugger.
I have deleted ~/.codeblocks to eliminate the possibility of corrupt settings, but the problem persists.
Quote from: bnilsson on October 22, 2006, 07:51:09 PM
I am using rev 3126.
CodeBlocks crashes when I try to open menu Settings/Compiler and debugger.
I have deleted ~/.codeblocks to eliminate the possibility of corrupt settings, but the problem persists.
This can also happen when one of the zip files in ../share/codeblocks is corruped or out of date.
I removed the installation and did 'make install'.
Now CB says at startup: "The file CBProfiler.zip could not be found. Please check your installation."
It still crashes at Settings/Compiler and debugger.
I kept CBProfiler.zip from previous installs, and the error message is not coming up if I put it in.
Funny that it is needed if it not generated.
Still crashing at Settings/Compiler and debugger.
I will now do a 'make clean' and try again.
I'm not sure if this is of help: But since you compile it on your own, C::B should create a report file with a backtrace of the crash. Not sure if this works of MacOS too, but it should...
The content of this file (usually codeblock.rpt in the folder where C::B is) will give an insight in the root of the crash.
With regards, Morten.
I am still building, so I have not found codeblocks.rpt yet, but this is a part of the crash log from OSX:
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
Thread 0 Crashed:
0 org.codeblocks.app 0x0000b228 CompilerSettingsDlg::CompilerSettingsDlg[in-charge](wxWindow*) + 1320
1 org.codeblocks.app 0x0001821c MainFrame::OnSettingsCompilerDebugger(wxCommandEvent&) + 28
2 libwx_macu-2.6.0.dylib 0x015cc4c8 wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) + 200
3 libwx_macu-2.6.0.dylib 0x015cc788 wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) + 168
4 libwx_macu-2.6.0.dylib 0x015ccf14 wxEvtHandler::ProcessEvent(wxEvent&) + 212
5 libwx_macu-2.6.0.dylib 0x015ccf44 wxEvtHandler::ProcessEvent(wxEvent&) + 260
6 libwx_macu-2.6.0.dylib 0x015ccf44 wxEvtHandler::ProcessEvent(wxEvent&) + 260
Of what value this is, I could not judge.
After 'make clean' and rebuild including bootstrap and configure, the problem persists.
And no codeblocks.rpt cound be found at ~/bin or in the application bundle ~/Applications/CodeBlocks.app/Contents/MacOS.
It is intriguing that I need to copy share/codeblocks/profile.zip to share/codeblocks/CBProfile.zip to get rid of the startup error message.
Some fix for lib_finder.zip and profile.zip was completed today in rev 3126, could there be some leftovers from that work?
And could this have anything to do with the crash?
Try running CB under GDB. Modify a run.sh to execute from the Terminal.
Something like:
# ! / bin / sh <== take blanks out of this line
APP_DIR=/Users/pecan/devel/mac/trunk/src/devel
export LD_LIBRARY_PATH=$APP_DIR:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$APP_DIR:$LD_LIBRARY_PATH
CODEBLOCKS_DATA_DIR=`pwd`
export CODEBLOCKS_DATA_DIR
gdb $APP_DIR/codeblocks
When you get the crash, type "backtrace full"
and post the results.
Quote from: bnilsson on October 22, 2006, 09:41:14 PM
Now CB says at startup: "The file CBProfiler.zip could not be found. Please check your installation."
It still crashes at Settings/Compiler and debugger.
I second that on Ubuntu 6.06; wxGTK 2.6.3 (PL2); C::B rev. 3126
Quote
I second that on Ubuntu 6.06; wxGTK 2.6.3 (PL2); C::B rev. 3126
Settings/Compiler... Crash also?
Quote from: bnilsson on October 23, 2006, 06:06:59 PM
Settings/Compiler... Crash also?
Yes, I get a message: "XRC resource 'dlgCBProfilerConfig' (class 'wxPanel') not found!"
Can you open Settings/Compiler and debugger without a crash?
bnilsson, try disabling the profiler plugin and check again if you can open the compiler settings.
I disabled profiler, libfinder, and symbol table and tested by every step, the crash persists.
I disabled ALL plugins except compiler and debugger, and the crash persists.
BTW, now Project/Build options also crashes, system crash report:
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
Thread 0 Crashed:
0 libcompiler.so 0x0664cfd4 CompilerOptionsDlg::OnUpdateUI(wxUpdateUIEvent&) + 292
1 libwx_macu-2.6.0.dylib 0x015cc4c8 wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) + 200
2 libwx_macu-2.6.0.dylib 0x015cc788 wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) + 168
I don't know if this came at the same time as the Settings/Compiler.. crash.
Quote from: bnilsson on October 23, 2006, 08:32:45 PM
Can you open Settings/Compiler and debugger without a crash?
No, I can't. However, please note, that I am new here. Maybe I've done something wrong.
Pecan,
About backtrace:
If I do
cd ~/Applications/CodeBlocks.app/Contents/MacOS
./CodeBlocks --prefix=/Users/bnilsson
I can get CB to run recieving events and respond to mouseclicks.
I have a hard time executing your suggested script inside the bundle, since CB always say "Cannot find resources... --was configured to be installed in
/opt/local/share/codeblocks.. please use --prefix or set CODEBLOCKS_DATA_DIR..."
gdb does not take the second argument --prefix, and setting CODEBLOCKS_DATA_DIR apparently has no effect.
Any suggestions getting a backtrace from a MacOS bundle?
Adding a resource fork (with: `wx-config --rezflags` /path/to/bin/codeblocks) is enough to make wxMac receive events and not launch in the background, and useful when debugging.
Please clarify.
Is this something you do in configure or just on the fly?
Quote from: bnilsson on October 25, 2006, 01:11:34 AM
Please clarify.
Is this something you do in configure or just on the fly?
Just go to the terminal and run
`wx-config --rezflags` /path/to/bin/codeblocksThis one of the ways to be able to receive events in wxWidgets apps.
I tried it and it had no effect.
You should also be able to start your bundle up like so:
(gdb) run --prefix=/Users/bnilsson
Thanks, I can start it but it does not respond to clicks.
So, finally, I got a backtrace for the Settings/Compiler and debugger crash. (I didn't pay attention to the singlequotes in `wx-config --rezflags` before)
Reading symbols for shared libraries . done
Reading symbols for shared libraries ... done
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x0000b228 in CompilerSettingsDlg::CompilerSettingsDlg ()
(gdb) backtrace full
#0 0x0000b228 in CompilerSettingsDlg::CompilerSettingsDlg ()
No symbol table info available.
#1 0x0001821c in MainFrame::OnSettingsCompilerDebugger ()
No symbol table info available.
#2 0x015cd4c8 in wxEvtHandler::ProcessEventIfMatches ()
No symbol table info available.
#3 0x015cd788 in wxEventHashTable::HandleEvent ()
No symbol table info available.
#4 0x015cdf14 in wxEvtHandler::ProcessEvent ()
No symbol table info available.
#5 0x015cdf44 in wxEvtHandler::ProcessEvent ()
No symbol table info available.
#6 0x015cdf44 in wxEvtHandler::ProcessEvent ()
No symbol table info available.
#7 0x015cdf44 in wxEvtHandler::ProcessEvent ()
No symbol table info available.
#8 0x015cdf44 in wxEvtHandler::ProcessEvent ()
No symbol table info available.
#9 0x015cdf44 in wxEvtHandler::ProcessEvent ()
No symbol table info available.
#10 0x015cdf44 in wxEvtHandler::ProcessEvent ()
No symbol table info available.
#11 0x015cdf44 in wxEvtHandler::ProcessEvent ()
No symbol table info available.
#12 0x016d2e0c in wxMenuBase::SendEvent ()
No symbol table info available.
#13 0x015f38f4 in wxMacAppEventHandler ()
No symbol table info available.
#14 0x93207554 in DispatchEventToHandlers ()
No symbol table info available.
#15 0x93206cac in SendEventToEventTargetInternal ()
No symbol table info available.
#16 0x9320da60 in SendEventToEventTarget ()
No symbol table info available.
#17 0x932862cc in SendHICommandEvent ()
No symbol table info available.
#18 0x932b6158 in SendMenuItemSelectedEvent ()
No symbol table info available.
#19 0x932b6060 in FinishMenuSelection ()
No symbol table info available.
#20 0x9329d56c in MenuSelectCore ()
No symbol table info available.
#21 0x9329d054 in MenuSelect ()
No symbol table info available.
#22 0x0164d7f0 in wxMacTopLevelMouseEventHandler ()
No symbol table info available.
#23 0x015f3e5c in wxMacAppEventHandler ()
No symbol table info available.
#24 0x93207554 in DispatchEventToHandlers ()
No symbol table info available.
#25 0x93206cac in SendEventToEventTargetInternal ()
No symbol table info available.
#26 0x9320da60 in SendEventToEventTarget ()
No symbol table info available.
#27 0x932992d4 in HandleMouseEvent ()
No symbol table info available.
#28 0x9320ddcc in ToolboxEventDispatcherHandler ()
No symbol table info available.
#29 0x932077a4 in DispatchEventToHandlers ()
No symbol table info available.
#30 0x93206cac in SendEventToEventTargetInternal ()
No symbol table info available.
#31 0x9320da60 in SendEventToEventTarget ()
No symbol table info available.
#32 0x015f144c in wxApp::MacHandleOneEvent ()
No symbol table info available.
#33 0x015f1544 in wxApp::MacDoOneEvent ()
No symbol table info available.
#34 0x015f15d8 in wxApp::MainLoop ()
No symbol table info available.
#35 0x00005290 in CodeBlocksApp::OnRun ()
No symbol table info available.
#36 0x0157be44 in wxEntry ()
No symbol table info available.
#37 0x00003e48 in main ()
No symbol table info available.
(gdb)
Could you compile CB with the debugging option -g on?
That backtrace has no symbol tables.
or try this:
Quote from: mandrav on October 25, 2006, 08:13:10 PM
Try the following in your working copy:
make clean-zipfiles // <- this is the important part
make
make install // (or whatever it is that you do on Mac)
(don't type the comments!)
mandrav just fixed it all (at least for me) by:
make clean-zipfiles
It fixed both the "Settings/Compiler and debugger" and "Project/Build options" crashes.
BTW: show me the command line that enables a compile with the debugging option -g.
Is it a configure option?
Quote from: bnilsson on October 25, 2006, 08:30:55 PM
BTW: show me the command line that enables a compile with the debugging option -g.
Is it a configure option?
g++ -g your_source_file.cpp
Would I have to change to "g++ -g" in every Makefile?
It seems like a lot of work and to invite mistakes.
Is there a more semi-automatic way to setup the CB build to use this option?
http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks
I was asking how to build CB with the debug option on, not how to use it.
I have not yet been able to build CB using CB.
Strange, I instead find that I need to strip my binaries of debugging symbols afterwards ?
(i.e. that it does build with the -g symbols enabled by default, and is huge because of it)
But they might be talking about the extra Code::Blocks debug code, enabled by configure:
--enable-debug turn on debugging (default is OFF)