Author Topic: "Could not save config file..." Error  (Read 25661 times)

Offline spflanze

  • Almost regular
  • **
  • Posts: 134
"Could not save config file..." Error
« on: September 16, 2017, 08:35:23 pm »
Whenever I close CodeBlocks 16.01 I get two error message windows. Their messages are:
Quote
Unable to open personal dictionary file
Could not save config file...

Not remembered between invocations of CodeBlocks 16.01 are:
1) Recent projects and files
2) The base directory for the wx global directory

What do I need to do to enable CodeBlocks to save the config file?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: "Could not save config file..." Error
« Reply #1 on: September 16, 2017, 11:34:42 pm »
State your OS as a start. Another option is to start codeblocks from a console and pass --debug-log -v options to see extended information.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline spflanze

  • Almost regular
  • **
  • Posts: 134
Re: "Could not save config file..." Error
« Reply #2 on: September 17, 2017, 12:56:46 am »
The OS is Windows 7 Professional SP1

This problem is solved. The problem was I was using CbLauncher.exe to invoke CodeBlocks. Now I use codeblocks.exe and when this is used instead the errors no longer appear when closing it, the recent files and projects are remembered, and so is the wx global variable.


Offline crobar

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: "Could not save config file..." Error
« Reply #3 on: October 02, 2018, 11:18:58 am »
I'm seeing the same issue on 17.12 on Ubuntu 16.04. I followed the instructions in the post above to produce debug output, see the session below.

I can't actually remember now for sure, but I think I compiled codeblocks from source. To get the error I changed the brace completion to false and exited codeblocks.

Code
$ codeblocks --debug-log -v > codeblock_log.txt 2>&1
$ cat codeblock_log.txt
10:12:59: Debug: Failed to connect to session manager: SESSION_MANAGER environment variable not defined
10:13:00: Debug: WindowPosition[200 150 300 400]
10:13:00: Debug: Adding duplicate image handler for 'XPM file'
10:13:00: Debug: WindowPosition[200 150 300 400]
10:13:00: Debug: CodeSnippetsWindowLoadingFile:/home/rcrozier/.config/codeblocks/codesnippets.xml
10:13:00: Debug: Personality is[]
10:13:01: Debug: wxColour::Set - couldn't set to colour string 'CB_BODY_BGCOLOUR'
10:13:01: Debug: wxColour::Set - couldn't set to colour string 'CB_LINK_COLOUR'
10:13:01: Debug: wxColour::Set - couldn't set to colour string 'CB_LINK_COLOUR'
10:13:01: Debug: wxColour::Set - couldn't set to colour string 'CB_LINK_COLOUR'
10:13:01: Debug: wxColour::Set - couldn't set to colour string 'CB_LINK_COLOUR'
10:13:01: Debug: wxColour::Set - couldn't set to colour string 'CB_LINK_COLOUR'
10:13:01: Debug: wxColour::Set - couldn't set to colour string 'CB_LINK_COLOUR'
10:13:01: Debug: wxColour::Set - couldn't set to colour string 'CB_TEXT_COLOUR'
10:13:01: Debug: wxColour::Set - couldn't set to colour string 'CB_LINK_COLOUR'
10:13:01: Debug: wxKeyBinder::DetachAll - detaching from all my [0] targets
10:13:01: Debug: wxKeyBinder::DetachAll - detaching from all my [0] targets
10:13:01: Debug: wxKeyBinder::Attach - attaching to [SCIwindow] 0x2d11420

(codeblocks:10309): Gtk-CRITICAL **: IA__gtk_tree_model_iter_nth_child: assertion 'n >= 0' failed
10:13:08: Debug: wxKeyConfigPanel::UpdateButtons
10:13:08: Debug: wxKeyConfigPanel::OnProfileSelected
10:13:08: Debug: wxKeyConfigPanel::OnTreeCommandSelected
10:13:08: Debug: wxKeyConfigPanel::UpdateButtons
10:13:08: Debug: wxKeyConfigPanel::UpdateDesc
10:13:08: Debug: wxKeyConfigPanel::UpdateButtons
10:13:08: Debug: wxColour::Set - couldn't set to colour string 'wxSYS_COLOUR_INFOBK'
10:13:08: Debug: wxColour::Set - couldn't set to colour string 'wxSYS_COLOUR_INFOTEXT'
10:13:08: Debug: wxColour::Set - couldn't set to colour string 'wxSYS_COLOUR_HIGHLIGHT'
10:13:12: Debug: wxKeyConfigPanel::ApplyChanges
10:13:12: Debug: wxKeyBinder::DetachAll - detaching from all my [1] targets
10:13:12: Debug: wxKeyBinder::DetachAll - detaching from all my [0] targets
10:13:12: Debug: wxKeyBinder::DetachAll - detaching from all my [0] targets
10:13:12: Debug: wxKeyBinder::Attach - attaching to [SCIwindow] 0x2d11420
10:13:12: Debug: wxKeyBinder::Attach - attaching to [SCIwindow] 0x3fdd780
10:13:12: Debug: wxKeyBinder::Attach - attaching to [SCIwindow] 0x3ffbe90
10:13:13: Debug: wxKeyBinder::DetachAll - detaching from all my [0] targets
10:13:13: Debug: wxKeyBinder::DetachAll - detaching from all my [0] targets
10:13:17: Debug: SavingWindowPosition[200 150 300 400]
10:13:18: Debug: wxKeyBinder::DetachAll - detaching from all my [3] targets
10:13:18: Debug: wxKeyBinder::DetachAll - detaching from all my [0] targets
10:13:22: Debug: 3 threads were not terminated by the application.
Starting Code::Blocks Release 17.12  rev 11256 Aug  3 2018, 13:55:49 - wx3.0.2 (Linux, unicode) - 64 bit

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: "Could not save config file..." Error
« Reply #4 on: October 02, 2018, 12:42:33 pm »
What are the permissions of the ~/.config/codeblocks folder?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline crobar

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: "Could not save config file..." Error
« Reply #5 on: October 02, 2018, 12:54:18 pm »
Code
$ ls -l ~/.config/
total 84
drwxr-xr-x 2 rcrozier rcrozier 4096 Oct  2 10:21 codeblocks

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: "Could not save config file..." Error
« Reply #6 on: October 02, 2018, 01:15:30 pm »
I cannot verify they are correct only you can do it. Also you need to check the permissions of the files in this folder.

It is a common problem on ubuntu some of these files to be owned by root.
I don't know how this happens, but I'll be very glad if someone could tell me.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7256
Re: "Could not save config file..." Error
« Reply #7 on: October 02, 2018, 01:30:09 pm »
On my system the codeblocks-folder (and all included folders have 755-permissions) and the files have 664.
User and group is the same as the user of the home-folder.
The .config-folder itself has 720.

Offline crobar

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: "Could not save config file..." Error
« Reply #8 on: October 02, 2018, 01:39:20 pm »
I am user rcrozier. in the actual codeblocks folder

Code
$ ls -l ~/.config/codeblocks/
total 132
-rw-rw-r-- 1 rcrozier rcrozier   128 Oct  2 10:13 BrowseTracker.ini
-rw-rw-r-- 1 rcrozier rcrozier 38435 Oct  2 10:21 cbKeyBinder10.ini
-rw-rw-r-- 1 rcrozier rcrozier 38154 Oct  2 10:13 cbKeyBinder10.ini.bak
-rw-rw-r-- 1 rcrozier rcrozier   239 Oct  2 10:13 codesnippets.ini
-rw-r--r-- 1 root     root     40596 Aug 17 12:42 default.conf
-rw-rw-r-- 1 rcrozier rcrozier   231 Oct  2 10:13 DragScroll.ini
-rw-rw-r-- 1 rcrozier rcrozier     0 Oct  2 10:13 en_GB_personaldictionary.dic

so default.conf is owned by root, should this be the case?

Anyway, I changed ownership of default.conf to rcrozer and the problem has gone. My suspicion is that this file is created during installation when using sudo and is therefore owned by root?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: "Could not save config file..." Error
« Reply #9 on: October 02, 2018, 07:09:39 pm »
I'll be surprised if it is.
Is this the first installation on this machine?
Can you repeat the steps (first delete or rename the codeblocks folder)?

Do you have /root/.config/codeblocks?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline sg

  • Single posting newcomer
  • *
  • Posts: 6
Re: "Could not save config file..." Error
« Reply #10 on: August 25, 2019, 09:33:25 pm »
Hi there, I am having the same problem as described in the first post by 'spflanze'--i.e., "Unable to open personal dictionary file"..."Could not save config file"...

I tried his solution--i.e., using codeblocks.exe rather than CbLauncher.exe, but now Code::Blocks can't find the compiler. The file defaukt.conf exists in the following path: Users/[my_user_name]/AppData/Roaming/CodeBlocks
Any assistance is most appreciated. Cheers!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: "Could not save config file..." Error
« Reply #11 on: August 26, 2019, 08:20:12 am »
Are the settings in Settings -> Compiler -> Your compiler -> Toolchain executables correct?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline sg

  • Single posting newcomer
  • *
  • Posts: 6
Re: "Could not save config file..." Error
« Reply #12 on: August 28, 2019, 05:37:37 am »
Thanks for the quick response. The settings look okay to me, but I could be wrong. I've attached a screen shot. Cheers!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: "Could not save config file..." Error
« Reply #13 on: August 28, 2019, 09:11:33 am »
Do you have a compiler in this folder? Does it work? What do you mean by "can't find the compiler"?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline sg

  • Single posting newcomer
  • *
  • Posts: 6
Re: "Could not save config file..." Error
« Reply #14 on: August 31, 2019, 12:09:05 am »
Yes, the compiler works. When I launch the CB from CbLauncher.exe, the code compiles and runs correctly. When I say "can't find the compiler", I mean CB doesn't compile the program, as if the compiler is missing (i.e., as if I installed the CB version without the compiler.)