News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Edit Global Compiler Settings aborts

Started by Pecan, September 13, 2009, 03:47:10 PM

Previous topic - Next topic

Pecan

When I attempt to edit the Global compiler settings, I get the Abort/Retry/Ignore message.

MSW XP sp2 SVN 5751.




Jenna

Confirmed on linux too.
Only happens (at least for me), if I add a custom-variable with a name not starting with a letter .
It happens because the name of the variable is used as key, when stored in default.conf .

configmanager.cpp tests for illegal characters as first letter of the key, and if it founds one it throws an exception.

I think we should either check the variable-name directly after the user added it in compiler-config-dialog or change the way we store it.
But the second would of course lead to changes in conf-file format and to incompatibilities with the actual version.
Any other ideas ?

By the way the same problem might happen at other places, where the user can edit the name of a key directly (if such keys exist).

MortenMacFly

Quote from: jens on September 14, 2009, 01:17:40 AM
configmanager.cpp tests for illegal characters as first letter of the key, and if it founds one it throws an exception.
Well - maybe a trupid question, but why is "_" an illegal character, even for a key?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

Quote from: MortenMacFly on September 14, 2009, 06:37:31 AM
Quote from: jens on September 14, 2009, 01:17:40 AM
configmanager.cpp tests for illegal characters as first letter of the key, and if it founds one it throws an exception.
Well - maybe a trupid question, but why is "_" an illegal character, even for a key?
Don't know, it's implemented this way, only the first letter is tested. Might be a (Tiny-)XML restriction.

I did not dig into this deeper (it was a little late yesterday).

MortenMacFly

Quote from: jens on September 14, 2009, 07:08:32 AM
Don't know, it's implemented this way, only the first letter is tested. Might be a (Tiny-)XML restriction.
Saw that, too now. Well I thinks it's a bug in configmanager cause "_" even as a starter is valid XML. I'm pretty sure tinyXML will accept that, too (will try anyways...) - so I suppose to fix configmanager. However - it won't fix the crash if the user does enter something invalid there... so some more thoughts on that are welcome. Probably Thomas has an idea - he's the godfather of configmanager IIR... ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]