User forums > Help
Settings don't get saved (svn 4454)
johne53:
Mandrav - if there isn't anything obvious in the above backtrace, don't waste too much time on it. Since posting the above info I've come to the conclusion that there's some kind of capacity problem here (at least as far as the 'failure to save' problem is concerned).
I have a particular workspace containing 20 projects, each with a Debug and Release target. 19 of the projects build Shared Object files and the last one is a GUI application. With all 20 projects present in the workspace I get the saving crash (i.e. segmentation fault) every time C::B closes (assuming I've changed a setting). If I remove some of the projects, the problem goes away. It doesn't seem to matter which projects I remove. There are 3 particular projects which I can remove and the problem reliably goes away. If I only remove 1 of them (or any combination of 2) the problem doesn't go away. But if I put those 3 projects into a smaller workspace, they don't cause any problems. Conversely, if I put them back into the original workspace, I can remove other projects and the problem still goes away.
I'm very busy over the next few days but if I get a chance next week, I'll see if I can either:-
a) find out if there's anything common to (or unusual about) those 3 projects - or
b) find out if I can home in on something more repeatable.
Thanks for your help, so far. I'm still keen to find out if that message (Failed to read a valid object file image from memory) is a bad indication. Assuming it's not normal, is there any way to find out which image couldn't be read?
johne53:
Woohoo...! I've tracked down at least one of the situations that's been causing this strange crashing problem. I think there might be other situations too - but maybe it's best to deal with one problem at a time. Consider this C::B project (my actual project is much bigger but I can still reproduce the problem, even from this cut-down version).
To see the crash, the following steps are necessary:-
1) Add this project to a workspace (unfortunately, it doesn't crash with every workspace - but it does with the majority of them)
2) Launch a terminal window and type gdb codeblocks - followed by run
3) After C::B starts, open the workspace to which you added the project below
4) Change one or more of the global settings (for example, one of the Compiler & Debugger settings)
5) Exit Code::Blocks. At this point you get a segmentation fault and your new change(s) are lost.
--- Quote ---<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="Ardour" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="$(#output)/ardour2/ardour-2.0.5" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="0" />
<Option compiler="gcc" />
<Option host_application="ardour-2" />
<Compiler>
<Add option="-DDEBUG" />
</Compiler>
<Linker>
<Add directory="$(#output)/ardour2/" />
<Add directory="$(#base)/ardour2/libs/pbd/" />
</Linker>
</Target>
<Target title="Release">
<Option output="bin/Release/ardour-2.0.5" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O3" />
</Compiler>
<Linker>
<Add directory="$(#output)/ardour2/" />
<Add directory="$(#base)/ardour2/libs/pbd/" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
</Compiler>
<Linker>
<Add library="jack" />
</Linker>
<Unit filename="waveview.cc" />
<Unit filename="waveview.h" />
<Unit filename="waveview_p.h" />
<Extensions>
<code_completion />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>
--- End quote ---
Pay particular attention to the red lines. If they'd been written like this:-
<Option output="$(#output)/ardour2/ardour-2.0.5" prefix_auto="0" extension_auto="0" />
<Option output="bin/Release/ardour-2.0.5" prefix_auto="0" extension_auto="0" />
(in other words, auto prefix and extension disabled, instead of enabled) the crash doesn't occur. Similarly, if the output target filename doesn't include fullstops, the crash doesn't occur either. I hope this will go some way towards identifying the problem.
johne53:
Another thing that seems to be causing problems for Code::Blocks is the use of quotation marks within a #define. For example, many of my projects require that the compiler (g++) is sent a compile option taking a form similar to this:-
-DLOCALEDIR=\"/usr/local/share/locale\"
After asking on this forum I was told to implement this within C::B as a preprocessor directive (#define build option) of the form:-
LOCALEDIR=\\"/usr/local/share/locale\\"
Within the relevant project (.cbp file) this translates to an XML string entry of the form:-
<Add option='-DLOCALEDIR=\\"/usr/local/share/locale\\"' />
which is listed among the relevant target's Compiler options. As far as I can tell, C::B seems to tolerate a small number of these - but once I include a dozen or more I start seeing the same segmentation faults each time I try to shut down C::B.
I guess it could be the case (in fact, I hope it is the case) that I've been wrongly advised and I should be using some other syntax. However, the syntax shown above does cause the correct option to get sent to the compiler, so it seems to have some validity. In any case, I can't see why a particular text string - even if it was illegal - should cause the host program to crash.
johne53:
Has anyone managed to reproduce these problems?
Or can someone comment on why these particular settings (with seemingly correct syntax) should be causing C::B to segfault?
johne53:
I didn't managed to fix these problems so I decided to try out Linux and C::B on a completely different PC. I've chosen a different distro (64Studio, which is a Debian based Linux) and installed it on my laptop. Using SubVersion I checked out SVN 4454 of CodreBlocks (the one where I originally discovered the problems) and soon I'll be trying to build it.
I have a vague memory of needing to install a library/package called contrib but I can't quite remember where I got it from. Can anyone remind me if it comes as part of a standard SVN checkout or is there somewhere else that I need to get it from?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version