Author Topic: rev 2173  (Read 6050 times)

sethjackson

  • Guest
rev 2173
« on: March 12, 2006, 03:19:09 pm »
I have Version 1.0 revision 2173 (gcc 3.4.4 Windows/unicode, build: Mar 10 2006 21:28:07) on Windows XP.
I have found a really nasty problem.  :(

BTW The March 9 nightly doesn't have this problem. The March 11, and March 10 nightlies do.

1. Remove your default.conf from %APPDATA%\codeblocks. Make sure you do not delete it. Put it somewhere safe.

2. Open CodeBlocks.cbp from SVN sources.

3. C::B never opens. (Windows says it can't find CodeBlocks.cbp (DDE bug :? :P ) )

4. Open C::B just by running codeblocks.exe. C::B never opens.

5. Put default.conf back. C::B works again.  :shock:

I have no idea what causes this. Most people probably won't delete their default.conf, but still the above shouldn't happen......

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: rev 2173
« Reply #1 on: March 12, 2006, 03:34:53 pm »
This is due to the wxSTAY_ON_TOP flag in the new splash screen class.

I told you, I told you, I told you... we already had this bug once.

When the "select default compiler" dialog tries to show up, the wxSTAY_ON_TOP flag prevents it from doing so ---> app freezes.

It's fixed in SVN.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

sethjackson

  • Guest
Re: rev 2173
« Reply #2 on: March 12, 2006, 03:36:00 pm »
This is due to the wxSTAY_ON_TOP flag in the new splash screen class.

I told you, I told you, I told you... we already had this bug once.

When the "select default compiler" dialog tries to show up, the wxSTAY_ON_TOP flag prevents it from doing so ---> app freezes.

It's fixed in SVN.

EDIT:

See next post.
« Last Edit: March 12, 2006, 03:42:11 pm by sethjackson »

sethjackson

  • Guest
Re: rev 2173
« Reply #3 on: March 12, 2006, 03:42:40 pm »
Umm no go. C::B uses 99% CPU now. :P

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: rev 2173
« Reply #4 on: March 12, 2006, 03:51:47 pm »
OK, so there are two issues. The other one was true nevertheless :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: rev 2173
« Reply #5 on: March 12, 2006, 04:18:25 pm »
That is related to the new splash screen for certain, too.
Try running codeblocks -ns... works fine.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: rev 2173
« Reply #6 on: March 12, 2006, 04:59:07 pm »
Narrowed it down to MainFrame::ScanForPlugins().
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: rev 2173
« Reply #7 on: March 12, 2006, 05:06:53 pm »
It works without the compiler plugin (which displays the modal "select default" dialog). My guess is that it is some issue between that dialog and the new splash screen (having fun with activate events?).
« Last Edit: March 12, 2006, 05:10:45 pm by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: rev 2173
« Reply #8 on: March 12, 2006, 05:39:31 pm »
Thomas: I thought you were going to use the style parameter in the constructor... :?

BTW, could you make this little change which is used in wxSplashScreen?

Replace, in cbSplashScreen's constructor (CPP file):

Code: C++
  1. Update();

With:

Code: C++
  1. #if defined(__WXMSW__) || defined(__WXMAC__)
  2.   Update();
  3. #else
  4.   wxYieldIfNeeded();
  5. #endif

Thanks (if you do) :P

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: rev 2173
« Reply #9 on: March 12, 2006, 05:54:23 pm »
Quote
BTW, could you make this little change
Did that (does of course not solve the problem).

Any ideas on what to do on that behalf? I believe it is a problem with activating/deactivating frames. I had a similar effect once when redesigning the file association stuff (using a dialog instead of an alert), and finally solved it by moving the dialog to a later stage when the splash screen was already destroyed and the main frame was active. With plugin initialisation, that may prove awkward.

Might experiment if the compiler plugin could hide it in case it needs to, but that's actually not such a pleasant solution either. A plugin should not fiddle with the application in such a way.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: rev 2173
« Reply #10 on: March 12, 2006, 06:22:14 pm »
Few differences with wxWidget's implementation:

wxSS can receive a parent.
wxSS creates a special widget to draw the bitmap and adds it to the frame (I tried this already but the results in Linux aren't that good).
wxSS stops the timer in its destructor.
wxSS has an OnCloseWindow function that stops the timer and destroys the frame (thru EVT_CLOSE).
wxSS adds EVT_CHAR and EVT_MOUSE_EVENTS to its child window, which will close the window.

I wonder if adding some of those would be of any help.

BTW, the splash sample does it this way:

The main frame is created first (just created). Now the splash screen is created with the frame as parent. Follows a call to wxYield() and then frame->Show(true).

I'll try to add some of those changes to my working copy and commit them to SVN (http://svn.cenizasoft.cjb.net/ -> BattleCS -> Server).
« Last Edit: March 12, 2006, 06:26:53 pm by Ceniza »

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: rev 2173
« Reply #11 on: March 12, 2006, 06:47:05 pm »
It's now committed.

The only thing I didn't implement was the use of a child widget to draw.