v2 Closing main version crashes 64 bit app

v2 Closing main version does not close 64 bit app

Post
I have just updated my app to a 64 bit version which works fine except now when I use to red button in the main window(window 1) to close the app the app crashes! I did not have this problem with the 32 bit version
I have Quit in the window 1 close event.

Reply Roger Clary

I have Quit in the window 1 close event
Don’t do that. Instead, in your app open event, put
AutoQuit = True
Now your app will automatically quit when the last open window is closed.

Tried to reply but was told

Error you do not have permission to perform this action

MY REPLY

Tried that. The main App window closes ok but the App does not close.

Why would you create a separate thread for this same question?

Don’t know what you did, but you didn’t follow my instructions. Find the app instance in your program. If you don’t already have an Open event, create one. Now in that event type: AutoQuit = True
Take the “Quit” out of your window1.close event
Now run your program. Click the red button to close your only open window. Voila, the app quits as well.

Created separate thread as when I tried to reply got message

Error you do not have permission to perform this action

I did follow your instructions exactly.

[quote=399036:@Jonathan Malthouse]Created separate thread as when I tried to reply got message

Error you do not have permission to perform this action
[/quote]
The forum acts weird sometimes, don’t worry about it.

There’s a known issue with terminating naturally. No-one has been able to pinpoint a pure-Xojo fix (I have never run into it, so my personal uninformed guess is doing anything at all in a Close event anywhere ever, I personally always use CancelClose). The solution that was found was to use declares to terminate naturally, but this screws with Profiling Code. I don’t have any resources handy, but try googling “site:forum.xojo.com mac quit crash” and see if you can find the declare.

Thanks I did the search you suggested and found that hidden windows could cause the problem. I found that I had the Self.hide command in the close pushbutton of several windows, I have now put Window2.close etc in these pushbuttons and the problem appears solved with the program closing ok.
Thanks for all the suggestions

2018v2 Bug fixes now say

51965 Framework » All Quitting from a Close event no longer causes the application to crash.

Does this mean that if you have Quit in the window 1 close event the app will not crash but will close normally?

That’s what I believe it means. Only testing can confirm.