Why does this NOT crash?

Xojo 2018r4 running on Win 10.

Basic GUI project with Window1 and Timer1 (set to multiple)

Timer1.Action dim p as ptr p.integer=12345

Can anyone explain why the above code does not crash? For me, the program runs and remains interactive.

the (0) is missing, right?

dim p as ptr p.integer(0)=12345

Both crash for me.

Thanks for the responses. Kem, could I ask what IDE version/platform/target are you using?

With the following code in Timer1.Action:

dim p as ptr break p.integer(0)=12345 break

The debugger repeatedly hits the first breakpoint, but NEVER hits the second.

This concerns me, because failure to crash in this circumstance potentially allows access violation bugs to evade detection.

Any further insights would be greatly appreciated.

Additionally:

I do get a crash if the code is moved to, say, Window1.MouseDown.

But the code does not crash for me if it is in Timer1.Action.

I tested in a Pushbutton.Action, for whatever that’s worth.

I’m on a Mac, 10.13.6, and Xojo 2018r4.

So it seems that an Exception is kind of raised (as execution of code bails out), but not properly handled (raised to App.UnhandledException → crash if not handled) by the Framework…

It would not surprise me if Exception Handling is broken or not working as expected in Timer.Action.
You really should add a Feedback to show the difference in Window1.PushButton1.Action and Window1.Timer1.Action.

Things become even more unreliable in Modal Dialogs. And Exception Handling in general isn’t working reliably at all…
See this Forum Post with a list of issues regarding Exception Handling. Oh, and copy your Feedback Case Number there, too - it seems a good Thread to share and collect Feedback cases for this kind of issues.

We really need Exception Handling to work reliably… in order to be able to build reliable and stable applications. I hope Xojo listens/reads… at the very least: Feedback is (already) available, so they can start anytime at working on this :slight_smile: