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

Offline johne53

  • Regular
  • ***
  • Posts: 253
Settings don't get saved (svn 4454)
« on: September 19, 2007, 08:10:25 am »
A few days ago I installed svn 4454 (via the rpm package for OpenSuse). Since then, I'm finding that changes to my IDE aren't being reliably saved. For example, if the selected build target is Debug and I change it to Release, next time I start C::B it will still be Debug. Similarly if I use Settings->Compiler and Debugger and I add a new search directory, the new setting has disappeared next time I re-start C::B. Can anyone else confirm this before I report it as a bug?

Also, is there a way to manually save these kinds of changes?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Settings don't get saved (svn 4454)
« Reply #1 on: September 19, 2007, 09:13:55 am »
Can anyone else confirm this before I report it as a bug?
This is not the bug, but only a symptom of the bug. If settings are not saved, this means that a crash occurs after you tell the application to quit, but before ConfigManager is deleted (settings are saved in its destructor). To narrow down the source of the crash, please try disabling all contrib plugins first, and if that does not help, disable the "core" plugins one by one (start with CodeCompletion). Also, if you have a RPT file, it may be helpful to see that one.

Quote
Also, is there a way to manually save these kinds of changes?
None at the present time (and not likely in the future, although it would probably be easy to implement).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #2 on: September 19, 2007, 09:18:00 am »
If settings are not saved, this means that a crash occurs after you tell the application to quit, but before ConfigManager is deleted (settings are saved in its destructor). To narrow down the source of the crash, please try disabling all contrib plugins first, and if that does not help, disable the "core" plugins one by one (start with CodeCompletion). Also, if you have a RPT file, it may be helpful to see that one.

Yes - that's pretty much what I suspected. I haven't installed any plugins personally but I'll happily try disabling the standard ones if you can tell me where to do it. Also, what is an RPT file and where would I find it??

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Settings don't get saved (svn 4454)
« Reply #3 on: September 19, 2007, 09:38:02 am »
For example, if the selected build target is Debug and I change it to Release, next time I start C::B it will still be Debug.

This one is confirmed. This happens as the default target loaded from layout file is not used to update the Target Combo and the Menu items.
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 #4 on: September 19, 2007, 10:06:19 am »
In fact I've just realised that if I change an IDE setting, I don't see the dialog box any more telling me that my layout has changed and asking if I want to save the new layout. So it's not even getting to that stage.

Is there a way of going back to my old version temporarily? I don't like having bugs that cause things not to get saved.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Settings don't get saved (svn 4454)
« Reply #5 on: September 19, 2007, 10:39:57 am »
Is there a way of going back to my old version temporarily? I don't like having bugs that cause things not to get saved.

If you compile codeblocks from svn you can checkout older versions by explicitly tell the svn-revision:

Code
svn checkout svn://svn.berlios.de/codeblocks/trunk /path/to/your/codeblocks/source/ -r revision_you_want --non-interactive 


Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Settings don't get saved (svn 4454)
« Reply #6 on: September 19, 2007, 12:28:17 pm »
Thanks Jens. Unfortunately I've never managed to build C::B from source. If I try to compile the Codeblocks-unix project I get an error at line 9 ofPlatWX.cpp (wx/wx.h can't be found). I've tried finding it with find but I don't seem to have it. On the other hand, if I try to compile the Codeblocks project I get the error cc1plus: error: unrecognized command line option "-mthreads" I've never managed to work out what's wrong....  :(

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Settings don't get saved (svn 4454)
« Reply #7 on: September 19, 2007, 01:40:55 pm »
If I try to compile the Codeblocks-unix project I get an error at line 9 ofPlatWX.cpp (wx/wx.h can't be found).

It means you don't have wxGTK-devel package installed.

On the other hand, if I try to compile the Codeblocks project I get the error cc1plus: error: unrecognized command line option "-mthreads"

I guess you tried with the project file meant for Windows. -mthreads is applicable for Windows only. It won't work on Linux. So don't try to use this project file. It will not work out-of-box.
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 #8 on: September 19, 2007, 02:32:37 pm »
It means you don't have wxGTK-devel package installed.

Sorry - did you mean wxWidgets-devel? I couldn't find much on Google about wxGTK_devel. Can you point me towards a site where I can download it (I'm running OpenSuse 10.2, so Yast or RPM would probably be favoured).

[Edit...] Oops, sorry. I found it (I typed it wrong into Google)

Do you know what version it's up to? The latest I can find is 2.6.3.3 but I thought it was at around 2.8.x.x
« Last Edit: September 19, 2007, 02:35:38 pm by johne53 »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Settings don't get saved (svn 4454)
« Reply #9 on: September 19, 2007, 02:53:09 pm »
I'll happily try disabling the standard ones if you can tell me where to do it.
If you launch Code::Blocks with --safe-mode (type that in the "Run..." box or in the shell), it starts without *any* plugins at all. Other than that, you can disable plugins one by one from the "Manage Plugins" dialog (found in the "Plugins" menu).
Also, there is the really hard way of simply deleting the respective shared library from the plugins folder. As you can always restore them by hitting the "build" button, there's not much to lose really.

Quote
Also, what is an RPT file and where would I find it??
That is a file containing a stack backtrace, which can be used to pinpoint a crash in many situations. It is created when the application crashes and can normally be found in the same directory as the application or in your home directory, and called codeblocks.rpt.
« Last Edit: September 19, 2007, 02:54:46 pm by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Settings don't get saved (svn 4454)
« Reply #10 on: September 19, 2007, 03:08:35 pm »
[Edit...] Oops, sorry. I found it (I typed it wrong into Google)
Do you know what version it's up to? The latest I can find is 2.6.3.3 but I thought it was at around 2.8.x.x

You should use at least wxGTK-devel-2.8.4 if you want to use wxGTK-2.8.x. Otherwise you can install wxGTK-2.6.3 package.

Or just compile it on your own. I assume, your PC has autotools, gcc installed.
1) Download wxGTK-2.8.4 source from wxWidgets site.
2) Extract it to a folder.
3) Open shell and type the following command to configure wxGTK (this is what I do).
Code
./configure --disable-debug --enable-shared --enable-unicode --enable-monolithic --with-gtk=2
4) Now do make and make install. Your PC is ready to compile C::B.

Quote
Also, what is an RPT file and where would I find it??

On Linux, you'll find it under /tmp folder. Look for the folders starting with codeblocks_dbgrpt-* (where * is several numbers). Inside that folder you'll find an codeblocks.xml file. That will contain the crash report.

Edit 1:

You can download wxGTK-2.8.4-devel from the following link.
Quote
http://download.opensuse.org/repositories/home:/TheTuxKeeper/openSUSE_10.2/i586/
« Last Edit: September 19, 2007, 03:18:07 pm by Biplab »
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 #11 on: September 19, 2007, 04:48:40 pm »
Thanks. Forgive my ignorance - but is wxGTK-devel the same as wxWidgets-devel ?

(the library shown in your link was wxWidgets-devel).

Online stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Settings don't get saved (svn 4454)
« Reply #12 on: September 19, 2007, 05:38:33 pm »
Thanks. Forgive my ignorance - but is wxGTK-devel the same as wxWidgets-devel ?

(the library shown in your link was wxWidgets-devel).

wxWidgets has more than one type; wxGTK is the type needed by Code::Blocks under Linux.
Note, wxWidgets-devel is needed to compile Code::Blocks.

The file wxWidgets-2.8.4-11.1.i586.rpm is most likely needed to run Code::Blocks.

Tim S 
« Last Edit: September 19, 2007, 05:42:10 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Settings don't get saved (svn 4454)
« Reply #13 on: September 19, 2007, 06:25:30 pm »
Thanks. Forgive my ignorance - but is wxGTK-devel the same as wxWidgets-devel ?

(the library shown in your link was wxWidgets-devel).

Sorry for creating that confusion.

Download the wxWidgets-devel package to compile C::B. :)
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 #14 on: September 19, 2007, 06:47:08 pm »
Okay, I installed wxWidgets2.8-devel. Now when I compile I get an error at line 42 of /usr/include/wx-2.8/wx/defs.h

error: #error "No Target! You should use wx-config program for compilation flags!"

Is this simply a matter of a missing preprocessor directive or do I need to run some external program to configure something..?
« Last Edit: September 19, 2007, 07:36:17 pm by johne53 »