MsgBox without action

Hello, I have a problem with MsgBox which generates no message on the screen.
I set a breakpoint, the program performs well MsgBox (“haha”), without display.
Xojo2016r2, Cocoa, debug mode, MacOS 10.11
This function had no problem with Xojo2014v24 and Cocoa.
She has no problem with either MacOS 10.8.5 and Xojo2016r2, Cocoa.
Does anyone ever seen this?
Thank you

are you saying the msgbox appears but “haha” does not appear in the box?
or that the box itself does not appear?
if it is the 2nd, it may be due to WHERE the msgbox is being called from.
calling if from within a canvas paint event for example will not display the box,

Yes, the box itself does not appear.
And yes, it is in a paint event…
And do you know why “calling if from within a canvas paint event for example will not display the box” ? Since when ?

probably because the msgbox is itself an event, and the paint event isn’t registering (and shouldn’t) the msgbox

basicilly you are attempting to interrupt the refresh of the display.

and as far as I know… . since always…

if you need debugging… use the debug log… or what I prefer is to create by own log file

SUB log(msg as string)
  Dim t As TextOutputStream
  If msg="!!!" And logFile.exists Then /// sending !!! will restart the log file
  End If
  If Not logFile.exists Then
  End If
  t.write msg+EndOfLine.UNIX


this assumes that logFile has already been defined someplace

The problem appears only in these versions of Mac OS and Xojo …
This is old code, which dates REALbasic v5.5 :))

Note: a similar problem (blocking) also appears for all ShowModal called from a Paint not only for MsgBox.

And I already use my own debug and log tools, but this was a message to the user.

Thank you for your help !

For user prompt, place the code that displays the box or modal dialog/window in a single timer, and simply start the timer in Paint.

Plus, indeed, using Msgbox to debug is not a good idea. Better use System.Debuglog.

I’ll bet we all have incorrect code/procedures which older versions of RB allowed. Better to just correct that code now as Dave has pointed out, than to try to work around.

Roger, It’s certain !

Marc, in future can you please mark the correct response as the ‘Answer’, rather than your own comment on the end. It helps others who want to read only your question and the answer at the top of the Conversation without having to scroll down. It is also polite for those who have helped you.