Exceptions are not throwing
BlitzMax Forums/BlitzMax Programming/Exceptions are not throwing
| ||
My program has stopped alerting the user if there is a runtimeerror called or a null object used. Before it made a pop-up but now it just closes silently. I don't know why. I can't give any code to replicate because I wouldn't know what to send other than, a runtimeerror in any place which doesn't pop up a message. I'm not using any Try blocks. |
| ||
What platform? On Mac the following code brings up a crash report in both Debug and Release:Local a:Int Ptr a=Int Ptr(0) a[0]=0 |
| ||
Are you sure you're not overloading the stack with heavy recursion? The only time I've personally witnessed a BlitzMax app just close without any error messages was if I accidentally got into an infinite loop or (very) deep recursion and overloaded the stack, which kills the debugger and therefore stops you getting any error messages. |
| ||
It happens even on the root level. And it only happens in Release mode. skidracer, your code does process an exception access violation. Local v:TVec2 v.x = 5 This does not. I had a similar problem before and I removed a Try and it fixed it. But I don't have any Trys now. |
| ||
I doubt release mode in BlitzMax ever trapped writes to null objects as they are located in valid app memory, however after checking versions.txt I see the following but not sure which exact code Mark is referring to: ***** 1.36 Release ***** * Added an 'exception handler' to win32 appstub to aid with debugging. It doesn't throw a BlitzMax style exception, just displays a message box and does a DebugStop/exit (just exit in release mode). Last edited 2011 |
| ||
Maybe that is what is happening! I have been relying on the Runtimeerror message box to give important error info for testers. For the time being I've replaced it with my own function that does a Notify and then exits. |
| ||
I had exactly the same problem some time ago. Not sure if it is still valid but this is from the bug bin: Click here! Last edited 2011 |
| ||
JSP: edited your link - interesting topic. Perhaps bbnullobject got tweaked around that time also, IMHO release mode should use a null address to help the program crash in an obvious manner. |