Page 1 of 1

unlucky behavior: error message behind debug window

Posted: Tue Nov 10, 2015 11:53 am
by infratec
PB 5.40 x86 on Debian 7.9 x86

Try this:

Code: Select all

OpenWindow(0, 0, 0, 100, 90, "Test 0", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
SetWindowColor(0, RGB(0, 255, 0))

CompilerIf #Test = #True
  Debug 1
CompilerEndIf

Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
I started PB from a console.
I have to press CTRL+C to close PB.

Bernd

Re: Total crash when constant is not defined

Posted: Tue Nov 10, 2015 1:13 pm
by infratec
Strange:

tried it again, because I wanted to remove the SetWindowColor() and ...
it worked like expected.

A message appeared.
I have only one explanation which makes sense:
Maybe in my first tries the message window was behind the PB window.
So it was not possible to do anything with PB.

But why ... :?:

Re: Total crash when constant is not defined

Posted: Tue Nov 10, 2015 1:16 pm
by infratec
Ahhhh....

I know now why:

I had a debug output open and the debug window (always on top) was over the error message.
I didn't saw the error message.

Bernd

Re: Total crash when constant is not defined

Posted: Tue Nov 10, 2015 1:23 pm
by infratec
For demonstration:

Code: Select all

Debug "Now close the program window"
Debug "Let the debug window open"
Debug "Remove the comment and press F5"

OpenWindow(0, 0, 0, 100, 90, "Test 0", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
SetWindowColor(0, RGB(0, 255, 0))

; This produce an error if uncommented

Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
The bad thing is that you are not able to close the debug window when it happened.
You can only move it or make it small.

I tried to close it, I tried to close PB but no reaction.
So I thought everything crashed.

On windows the error message window is above the debug window -> no problem.

Bernd

Re: unlucky behavior: error message behind debug window

Posted: Tue Nov 10, 2015 6:06 pm
by IdeasVacuum
Extremly good snippet to demonstrate the problem Bernd 8)