GRaceful way to exit a B3D application

Community Forums/General Help/GRaceful way to exit a B3D application

Blitzplotter(Posted 2012) [#1]
Hi folks.

I've a little issue whereby using the 'END' command to terminate my executable sometimes results in a pop GUI stating 'program.exe has stopped working - Windows is looking for a resolution'. Whilst not a biggie - I'd prefer for it to just stop rather than Windows OS thinking that it has fallen over unintentionally.

Anyone had a similar problem?


Yasha(Posted 2012) [#2]
Are you definitely sure it's End and not something you're calling immediately before it?

The closest problem I've had to that was a library that turned out to have an error in one of the DeInit functions, which were presumably more or less untested since nobody ever uses them mid-application.


Blitzplotter(Posted 2012) [#3]
@Yasha, thanks for the suggestion - I am using MikhailV's excellent FastImage - although I cannot tell if it is using this that randomly causes a memory exception.

Basically my 'quit' code hangs of a button at the moment:



As you can see, I stuck in a vwait of 100 to try and resolve the issue, it didn't work - I still get random crashes upon trying to quit.

I know the user is exiting the app anyhow - but it'd be nice to end the executable gracefully.

Is anyone aware of how to 'take down / terminate' a B3D program other than using the 'END' statement? Thanks.


Floyd(Posted 2012) [#4]
End should work anytime for Blitz3D. You are probably not deinitializing FastImage properly.


Blitzplotter(Posted 2012) [#5]
@Floyd - thanks, I will look into my de-initialization of FastImage - I do not believe I am doing that at all currently - probably the root of my problem.

Anyone know how to de-initiliaze FastImage?


Yasha(Posted 2012) [#6]
There is a DeInitDraw command that the FastImage documentation suggests calling before EndGraphics or ClearWorld. I would be surprised if omitting this before End was a problem, as commenting it out of the examples has no effect, but seeing if it fixes the problem is cheap, so...


Blitzplotter(Posted 2012) [#7]
Thx, will try when I get home on Saturday.


Blitzplotter(Posted 2012) [#8]
tried the following:



However still giving me a MAV upon quitting.

Is there a way I can capture what is causing the MAV and work it back from there?