Author Topic: Settings not being saved on macOS Mojave  (Read 3492 times)

Offline anb

  • Multiple posting newcomer
  • *
  • Posts: 13
Settings not being saved on macOS Mojave
« on: February 26, 2021, 12:42:27 pm »
Hi all,

I have just re-installed Mojave on my Mac and subsequently re-installed Code::Blocks (build 12240 in both instances).  But after the re-install I can no longer save any settings in CB.  Every time I load CB it just loads the brand new defaults, and states it has found some compilers, which is normal for the first run but not every time.

I made a backup of my user folder before re-installing so I have restored the default.conf file, which now gets me back to where I was before, but I am still unable to change anything.

I also need to add some environment variables but these do not get saved either.

I have checked the permissions on the default.conf file, and I have read/write access, so it can't be a permissions issue with that file.  I have no idea where the env vars are stored for CB so I cannot go check that.

No errors are ever shown in CB, so it must think it has saved the settings but it hasn't.

Has anyone else encountered this or does anyone have any advice?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Settings not being saved on macOS Mojave
« Reply #1 on: February 26, 2021, 12:45:36 pm »
What happens if you use "File -> Save everything" menu item?
Is codeblocks crashing on exit?
(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 anb

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Settings not being saved on macOS Mojave
« Reply #2 on: February 26, 2021, 12:54:23 pm »
Thanks for the super quick reply!

That appears to work!!!  :o

I have added an env var, OK'd out of the dialog, and then clicked "Save everything", and then reloaded CB, and the env var is still there!  :o

I don't know why I need to do that but it works and means I can carry on working now.

Many thanks!  :D

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Settings not being saved on macOS Mojave
« Reply #3 on: February 26, 2021, 01:21:40 pm »
Because CB is probably crashing on exit and it is not saving the config file.
Last time I've tried it on macOS it asserted and if you're hitting the close button it will abort, you have to use the continue/ignore button in this dialog.
(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 anb

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Settings not being saved on macOS Mojave
« Reply #4 on: February 26, 2021, 02:04:23 pm »
I have had CB crash on macOS before on exiting, but only when I have a project/workspace open.  So I now make sure to close the workspace before exiting.  Doing so does not show any crash/exception/error, it just closes.

It makes sense that it is crashing on closing, resulting in not saving the settings.

Thanks for your help.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Settings not being saved on macOS Mojave
« Reply #5 on: February 26, 2021, 02:31:44 pm »
Can you post a backtrace of the crash?
If you see a crash report macOS dialog there is a full backtrace. Copy and paste it here.
(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 anb

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Settings not being saved on macOS Mojave
« Reply #6 on: March 01, 2021, 10:58:04 am »
It won't visibly crash now, since I re-installed macOS.  Before, I think it just froze the app forever, if a project was open.  So, as I said before, I got in to the habit of closing the project before closing CB.  Just tried it now, and it closes.  No error or exception shown, and it doesn't freeze.  Don't know if it actually crashed silently though.