Author Topic: config file grows infinitely  (Read 5751 times)

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
config file grows infinitely
« on: October 12, 2006, 04:10:15 pm »
there is a bug somehow with the lexer configuration storage ...

each time you open & close CB the config file grows with a few empty lines in the SET2 of the lexers

has anyone changed something there recently ?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: config file grows infinitely
« Reply #1 on: October 12, 2006, 07:34:55 pm »
I never understood why we need to copy all lexers (even ones that you have never used before) into the config, anyway.

I could imagine it has to do with the recent change of strings being stored as CDATA. But then, on the other hand side... I can't imagine how that could lead to empty newlines being inserted...
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: config file grows infinitely
« Reply #2 on: October 12, 2006, 07:44:52 pm »
i've deleted all the lexer config from the config file and configured it new, now it doesn't grow any more  :)

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: config file grows infinitely
« Reply #3 on: October 12, 2006, 08:06:08 pm »
CDATA[...]

insert any string with a ']'  ??? could this make troubles ?

excerpt from the troublemaker

Code
							<SET2>
<str>
<![CDATA[a addindex addtogroup anchor arg attention                                    author b brief bug c class code date def defgroup deprecated                                    dontinclude e em endcode endhtmlonly endif endlatexonly endlink                                    endverbatim enum example exception f$ f[ f] file fn                                    hideinitializer htmlinclude htmlonly if image include ingroup                                    internal invariant interface latexonly li line link mainpage name                                    namespace nosubgrouping note overload p page par param post pre                                    ref relates remarks return retval sa section see showinitializer                                    since skip skipline struct subsection test throw todo typedef                                    union until var verbatim verbinclude version warning weakgroup                                    $ @ \  < > # { }]]>
</str>

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: config file grows infinitely
« Reply #4 on: October 13, 2006, 10:10:47 am »
Actually I'd expect this to work. After all, CDATA must be able to hold any kind of character data, so the xml library had better escape anything that may be a problem.

Did you insert that ']' programatically, or by hacking the xml file?
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: config file grows infinitely
« Reply #5 on: October 13, 2006, 10:24:26 am »
i'm innocent - as always  :P

no seriously,

what i've done:

i added a second configuration set,
added some keywords to the C/C++ lexer ( byte word ... ) but nothing which i can remember with any ']'

after i got problems with the TODO plugin (username not editable) i wanted to edit my config file
before i did that, i made a backup copy (which was already 380kb big, which made me suspiciously already)
then started/closed CB again and then i saw, that the config file was 2kB bigger than before.

i did a file compare and saw many many empty lines before the

between the
Code
< >
   and the 
Code
#
  characters in that part of the config file,
which i've posted previously.
and after looking closer, i found, that there were almost all lexers with the same behaviour.

after deleting all lexer-config in my config file, it didn't happen again, but i'll keep an eye about ...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: config file grows infinitely
« Reply #6 on: October 15, 2006, 03:34:52 pm »
here is a copy of the config file, which is growing inf.

maybe you can find the problem then

regards, tiwag

[attachment deleted by admin]