unlucky behavior: error message behind debug window

Post bugs related to the IDE here
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

unlucky behavior: error message behind debug window

Post 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
Last edited by infratec on Tue Nov 10, 2015 1:26 pm, edited 2 times in total.
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Total crash when constant is not defined

Post 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 ... :?:
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Total crash when constant is not defined

Post 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
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Total crash when constant is not defined

Post 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
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: unlucky behavior: error message behind debug window

Post by IdeasVacuum »

Extremly good snippet to demonstrate the problem Bernd 8)
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply