Author Topic: Projectmanager / build bug  (Read 3829 times)

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Projectmanager / build bug
« on: January 21, 2008, 01:57:02 pm »
Just found a funny bug by accident.

Double-clicking a project file while an instance of Code::Blocks is still running a build (minimized, in my case) brings up Code::Blocks, opens the project, switches to its first target, and uses this target's paths and settings for the next target in the running build, resulting in sudden, unexpected death.

Similarly, hitting "clean" and then double clicking a non-active project in the workspace will delete all files in the first project, and then initiate the build for the other project. This can turn out quite funny, if Code::Blocks reports "nothing to do, everything is up to date" after it has just deleted all files.

Double-clicking a non-active project in the workspace while a build is running activates that project, but seems to work reliably in every way. Surprising... I was unable to break anything by doing so.

The problem obviously lies in the fact that opening a different project changes the state which the build depends on (although I'm surprised this doesn't break the build in the third case).

Of course this finding opens the question as to what is the correct behaviour for opening a project while a build is running:
1. postpone opening until the build is done, which could be 30 minutes, 2 hours, or anything (ugh...)
2. fail (um...?)
3. show a silly alert (argh...)
4. open the project and break the running build (lol?)
5. create another instance of the whole project state (yeah, right...)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline denk_mal

  • Multiple posting newcomer
  • *
  • Posts: 35
Re: Projectmanager / build bug
« Reply #1 on: January 21, 2008, 07:23:04 pm »
Hi,

i've found out, that CodeBlocks would not longer respect the setting for multible instance on my system (WinPX SP2).
Have you turn the option for mulitple instances on or off?

grettings
denk_mal

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Projectmanager / build bug
« Reply #2 on: January 21, 2008, 07:38:31 pm »
I have it turned off.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline wobien

  • Multiple posting newcomer
  • *
  • Posts: 69
Re: Projectmanager / build bug
« Reply #3 on: January 21, 2008, 08:17:30 pm »
i've found out, that CodeBlocks would not longer respect the setting for multible instance on my system (WinPX SP2).
Have you turn the option for mulitple instances on or off?
I just compiled SVN 4836 on WinXP SP2, and it has no problem running 2 instances.
Regards, Wobien