Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Edit Global Compiler Settings aborts

(1/1)

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.

--- End quote ---
Well - maybe a trupid question, but why is "_" an illegal character, even for a key?

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.

--- End quote ---
Well - maybe a trupid question, but why is "_" an illegal character, even for a key?

--- End quote ---
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.

--- End quote ---
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... ;-)

Navigation

[0] Message Index

Go to full version