News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

</envars> being added to project file

Started by killerbot, August 13, 2007, 03:10:06 PM

Previous topic - Next topic

killerbot

today I noticed still a bunch of them get added, when I edit my project.

Biplab

I faced similar problem. Later I recompiled EnvVars and it became fine.  :)
Be a part of the solution, not a part of the problem.

killerbot

hmm, will kick out its objects and do the same ;-)

thomas

Hmm.... is EnvVars writing raw strings to the project file?

It seems weird that it would add a closing tag without opening tag, TinyXML won't do that (at least not unless something is seriously amiss).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

killerbot

 :? :?  <envvars /> is what it should be, silly me.

So in the end you get something like this in the <Extensions> section :

   <envvars />
   <envvars />
   <envvars />
   <envvars />

MortenMacFly

This has already been reported in another topic. I asked to give me steps to reproduce as this never happened to me. I got no answer so far. How to achive this?
With regards, Morten.
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]

MortenMacFly

I doubt it's my fault, here is the code responsible for saving:

    TiXmlElement* node = elem->FirstChildElement("envvars");
    if (!node)
      node = elem->InsertEndChild(TiXmlElement("envvars"))->ToElement();
    node->Clear();
    if (!m_ProjectSets[project].IsEmpty())
      node->SetAttribute("set", cbU2C(m_ProjectSets[project]));

Notice that it is checked whether the node exists. But please prove mw wrong...?! :?: :?: :?:
Might this be possibly related to the changes Yiannis did in 4332?
With regards, Morten.
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]

killerbot

what I did : just adjust some setting of the project. Will try to find a test case for reproduction.

killerbot

#8
just reproduced it, this is what I did :

(tested on linux) :

0) in CB create new console project, build it and close cb
==>

Quote
      <Extensions>
         <envvars />
         <code_completion />
         <debugger />
      </Extensions>

1) open CB, and open the project (I did that by drag and drop from konqueror to CB [no idea if this is a required action for reproduction])

2) Project properties : build targets : I changed for the Debug target the Platforms (unticked : windows)

3) File menu : save project, close cb
==>
Quote
      <Extensions>
         <envvars />
         <code_completion />
         <debugger />
         <envvars />
      </Extensions>

4) do the same thing : Project properties etc, an tick Windows back on, then file menu save project, close cb

==>

Quote
      <Extensions>
         <envvars />
         <code_completion />
         <debugger />
         <envvars />
         <envvars />
      </Extensions>

EDIT : rev 4370

MortenMacFly

Thanks Lieven!

Quote from: killerbot on August 13, 2007, 06:50:11 PM
just reproduced it, this is what I did :
[...]
EDIT : rev 4370

Did that under Windows and it worked like a charm - no duplicate nodes. Could you try under Windows, too please?!
Unfortunetely my Linux environment is broken (asks me to provide wx26 libs after I have removed them and updated to wx28). So I cannot test it currently under Linux until I have re-installed Ubuntu.

But I would really wonder why the hell this should be platform dependend...?!?!?! And in addition: CC uses quite the very same code - so why doesn't this happen for CC, too?!

With regards, Morten.
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]

killerbot

in windows it is ok, seems to be linux specific then

MortenMacFly

#11
Quote from: killerbot on August 14, 2007, 04:35:23 PM
in windows it is ok, seems to be linux specific then
Dammed. I was hoping that I wouldn't have to re-install the VM. I'll ask in another topic for help - I believe it's a simple configuration error... hopefully.
Edit: Done. See http://forums.next.codeblocks.org/index.php/topic,6679.msg51408.html#msg51408 please.
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]

JGM

Quote from: MortenMacFly on August 14, 2007, 07:29:40 AM
But I would really wonder why the hell this should be platform dependend...?!?!?! And in addition: CC uses quite the very same code - so why doesn't this happen for CC, too?!.

I hate when this kind of mysterious things occur. Resolving them is sometimes a headache. :(