Author Topic: Settings don't get saved (svn 4454)  (Read 31291 times)

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Settings don't get saved (svn 4454)
« Reply #30 on: September 25, 2007, 02:59:11 pm »
Well I do use C::B on Linux and on Windows. I have not noticed such unexpected behaviour.

I use codeblocks also on both platforms, and never had this kind of problems.

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #31 on: September 25, 2007, 03:30:38 pm »
Unfortunately it wasn't as easy to swap between KDE and Gnome as I thought so I'll have to leave that for now. However, here's what I have done....

1) Load up the Code::Blocks - Unix project from within Code::Blocks itself.
2) Select the build target "All".
3) Select Build->Clean and remove all object files.
4) Close Code::Blocks
5) Open a terminal window and switch to my C::B root folder.
6) Try to rebuild C::B using 'make'.

To my amazement it tells me there's nothing to be done!!

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Settings don't get saved (svn 4454)
« Reply #32 on: September 25, 2007, 03:41:58 pm »
Unfortunately it wasn't as easy to swap between KDE and Gnome as I thought so I'll have to leave that for now. However, here's what I have done....

1) Load up the Code::Blocks - Unix project from within Code::Blocks itself.
2) Select the build target "All".
3) Select Build->Clean and remove all object files.
4) Close Code::Blocks
5) Open a terminal window and switch to my C::B root folder.
6) Try to rebuild C::B using 'make'.

To my amazement it tells me there's nothing to be done!!

Doing things blindly will get you nowhere. What does the Code::Blocks project file has to do with 'make'?  :shock:
You will either use Code::Blocks to build Code::Blocks (with the supplied project file) or you will use autotools and friends (configure, make, make install). Make your pick.

Also make sure you read the wiki for instructions on building because something tells me you missed performing one very important step.
Be patient!
This bug will be fixed soon...

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Settings don't get saved (svn 4454)
« Reply #33 on: September 25, 2007, 03:57:30 pm »
BTW, I just read your posts. You have mentioned that you use KDE desktop. But I use GNOME one. So can you just give GNOME desktop a try to see if the problem persists or not.

Unfortunately it wasn't as easy to swap between KDE and Gnome as I thought so I'll have to leave that for now. However, here's what I have done....

I just changed between KDE, Gnome and icewm , started codeblocks, compiled a project and started it.

No problems.

Also no such problems here on WinXP/SP2 and W2k .

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #34 on: September 25, 2007, 04:36:36 pm »
make sure you read the wiki for instructions on building because something tells me you missed performing one very important step.

Just to clarify - up until a week ago I'd never built Code::Blocks from source at all. I'd ran all my previous installations from rpm packages. However, each time I did an update, C::B just became more & more unreliable.  Eventually, I was advised to try installing from source.

I've only compiled from source once but the finished executable still has all the same problems. I can't see anything obvious in the wiki that I've missed out - although some of its instructions are slightly different from the ones that I followed. For example, it gives the instruction make -f Makefile.unix to perform the build. That wouldn't work for me (I got an error about Makefile.unix being an invalid folder). So I just typed make (and eventually, make install). Also, I installed wxWidgets and wxGTK-devel from rpm packages, as opposed to the tar files recommended in the wiki. Other than those differences though, I seem to have done everything.

What is the important step you think I missed?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Settings don't get saved (svn 4454)
« Reply #35 on: September 25, 2007, 05:06:13 pm »
What is the important step you think I missed?

For most of the popular Linux distributions, the following few instructions are sufficient if you check out source from SVN.
Quote
./bootstrap
./configure
make
su
make install

If you download the source tarball, you may omit the first instruction.

Personally I use Windows XP SP2 on 2 PCs and with Fedora Core 7 on one more PC. All of them has C::B installed. Apart from that I've several Linux VMs installed (Ubuntu 7.04, Ubuntu 7.10 Alpha, Fedora 7 & 8 Beta, OpenSUSE-10.3 Beta, PC-BSD-1.3, Debian Etch, PC-Linux 2007, etc) and all of them has C::B installed for testing. Why I'm writing this. Because I didn't face such problem in any of these platforms.

Several other users have also confirmed that C::B works fine with them. Still you keep on saying the following.

However, each time I did an update, C::B just became more & more unreliable.  Eventually, I was advised to try installing from source.

IMHO, you made a mess of your C::B installation. And you are blaming C::B again and again.
Be a part of the solution, not a part of the problem.

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #36 on: September 25, 2007, 05:27:16 pm »
I can only repeat that, up until a week ago, I'd only ever installed from rpm packages. I, personally, haven't done anything to my installation (apart from using it) until a week ago when I installed and re-built it from source code. Also, I've never performed an update because of having problems. I updated because I needed a new feature - but in every case, the problems were immediately apparent, directly after updating. So what can I have done to cause this??

For most of the popular Linux distributions, the following few instructions are sufficient if you check out source from SVN.
Quote
./bootstrap
./configure
make
su
make install

That's exactly what I did. Just for the record, I've now done a make clean and followed those same instructions again. The new executable has today's date & time but is still giving me the same erratic performance.

Immediately after re-building, I re-booted, opened a project, placed a breakpoint at a line where it should reach and pressed F8. The program launched without stopping at the breakpoint. I exited the program and hit F8 again. The same thing happened. Without doing anything I exited the program and hit F8 for a third time. This time I got the same errors that I reported in my thread about debugging problems:-

Quote
Setting breakpoints
Debugger name and version: GNU gdb 6.5
No symbol table is loaded.  Use the "file" command.

My guess is that either C::B has got out of step with something it depends on - or maybe some kind of config file or startup file has become corrupted. Is there a way to completely uninstall C::B including all it's config files (and preferably wxWidgets) so I can re-install them both fresh?
« Last Edit: September 25, 2007, 05:54:17 pm by johne53 »

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #37 on: September 25, 2007, 08:25:44 pm »
Since my last post I've uninstalled (using Yast) wxWidgets, wxWidgets-devel, wxGTK and wxGTK-devel (strangely, although I've been told that wxWidgets and wxGTK are the same thing, Yast doesn't consider them to be the same).

I then re-installed all 4 using the rpm packages that I originally downloaded (versions 2.8 ).

Next I went to my C::B root folder and typed make clean - then deleted the C::B executable and checked that my desktop icon was now non-functional, just to be absolutely sure the old version had gone...!

Then I typed the following:-
./bootstrap
./configure --enable-contrib
make
sudo make install


I even found an old default.conf file and used that, in case my most recent file was corrupted.

I've now got a brand new executable (dated a few minutes ago) - but it's still got the same problems....  :(

The only thing I can think of is to follow the wiki, step-by-step. However, the wiki refers to libraries such as wxWidgets 2.6.3 which I've been told is now out-of-date. Also, I already know that at least one of its instructions (make -f Makefile.unix) wouldn't work for me when I tried it, last time.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Settings don't get saved (svn 4454)
« Reply #38 on: September 25, 2007, 08:43:44 pm »
Let me make a wild guess. Is it due to AppArmor (OpenSUSE comes with it)?? It works as a security layer providing security against malicious programs (I hope I'm correct). May be you've set the security level to the strictest one.

Check this possibility. Though I had OpenSUSE installed in my PC and I never faced such problems. But you know sometimes your Anti-Virus creates such nuisance on Windows. ;)
Be a part of the solution, not a part of the problem.

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #39 on: September 26, 2007, 07:40:36 am »
Good suggestion. Under Windows I used to have spurious problems with things working erratically when I used to use Zone Alarm - and I eventually had to replace it. However, AppArmor is disabled for OpenSuse in my current setup.

I can't help feeling that this is an "out-of-step" problem. Does C::B have any other dependencies - or require a minimum level of certain other libraries - apart from wxGTK? So far I've just been concentrating on wxGTK but presumably there are other dependencies too? The annoying thing is that it all worked fine when I first installed C::B. These problems started to appear gradually, as & when I updated it - which again makes me think that I should have been updattng something else to keep in step.

Also I've noticed there's an option to install "wxGTK debug info" which I've never installed. Should I have installed that?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Settings don't get saved (svn 4454)
« Reply #40 on: September 26, 2007, 08:49:11 am »
@johne53: why don't you try running C::B from within gdb and post a backtrace here when it crashes?
Be patient!
This bug will be fixed soon...

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #41 on: September 26, 2007, 10:15:20 am »
Hi Mandrav - it's not crashing as such. It's just not working the way it used to. For example, when I press F8 to debug a project, it no longer stops if I set break points. Or to be more specific - sometime it runs the program without stopping at the break points; other times it runs the program normally (and stops at the break points); other times it doesn't even run the program. The important thing is that I'm not changing anything while this is going on. One minute it will work - the next it won't (but mostly, it won't).

It's the same with saving my Compiler & Debugger settings. If I change a setting, the change (usually) doesn't get saved. But occasionally it does. There's no logic to it at all.

To be honest, C::B isn't really useable in its current state. The frustrating thing is that I don't know how it got into this state and nothing - not even re-installing - seems to fix it....  :(

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Settings don't get saved (svn 4454)
« Reply #42 on: September 26, 2007, 12:05:24 pm »
Quote
Hi Mandrav - it's not crashing as such. It's just not working the way it used to. For example, when I press F8 to debug a project, it no longer stops if I set break points. Or to be more specific - sometime it runs the program without stopping at the break points; other times it runs the program normally (and stops at the break points); other times it doesn't even run the program. The important thing is that I'm not changing anything while this is going on. One minute it will work - the next it won't (but mostly, it won't).

So why don't you post the debugger's log here?
And while you 're at it, enable the debugger's debug log in debugger settings and post that too.

The only relevant thing I have noticed is that, when loading a project, if the active target is the debug target (and depending what I was previously doing with C::B), some times it might not pick this up and try to debug the release target (which of course will behave like you describe). In that case I switched to the release target and then back to the debug one and it worked fine from then on.
I admit I haven't been able to reproduce this in a constant manner and so it's a bit difficult to track. But this will be fixed eventually.
Still, if this is really the problem you have, then just momentarily switch to another target and then back to debug and the problem will go away.

Quote
It's the same with saving my Compiler & Debugger settings. If I change a setting, the change (usually) doesn't get saved. But occasionally it does. There's no logic to it at all.

As said before, the only reason your settings are not saved is if C::B crashes on exit. You can only verify this by running C::B from a console or, even better, from inside gdb so you can post the backtrace I asked.

Quote
To be honest, C::B isn't really useable in its current state.

Please refrain from using such bold statements.
I can see that this might have been your experience but, as you probably saw from the replies in this topic, this is not what any of us experiences. So either help us to help you by providing the info we ask for, or patiently wait until C::B works for you as you expect it to.
Really, nothing more to say.
Be patient!
This bug will be fixed soon...

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #43 on: September 26, 2007, 01:17:04 pm »
Maybe I should have said that in it's current state, it isn't useable by me. I wasn't speaking generally, or for anyone else.

Something interesting happened after I toggled to Release and then back to Debug. I'd started C::B from a terminal and got this output

Quote
[email protected]:~> codeblocks
-------------- Build: Debug in Ardour ---------------
Target is up to date.
Nothing to be done.

which I assume is normal. However, at the same time, the "Layout changed" dialog appeared, telling me that the Code::Blocks default layout had changed and asking if I wanted to save it. At first I hit 'No'. I then saw that it had launched a new terminal window, instead of the app's GUI. I selected Debug->Stop debugger and tried again. The "Layout changed" dialog appeared again but this time I selected 'Cancel'. This time, I saw a new dialog saying "Error - unable to stop the debug process". When I hit "OK", my app loaded normally (in the debugger) and my break point got reached. I then stopped the debugger and closed C::B. In the terminal window I then saw a message "segmentation fault". This seems to be the same with any project but unfortunately, I'm not getting the codeblocks.rpt file that you mentioned. I've searched my main partition and my home partition but it's not there.

I've also found (although I'm not yet sure how consistent this will be) that the problem of my IDE settings not getting saved seems to happen only with one particular workspace loaded. Again, I see "segmentation fault" in the terminal window but I'm not getting that codeblocks.rpt file. Is there something I need to do to enable it?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Settings don't get saved (svn 4454)
« Reply #44 on: September 26, 2007, 01:42:00 pm »
codeblocks.rpt is generated only in windows.

Run "gdb codeblocks".
Inside gdb, type "run".
Do what you want in C::B.
If it crashes on exit, go back to the terminal with gdb running.
Type "bt".
Copy and paste the backtrace here.
Be patient!
This bug will be fixed soon...