I apologies for using this forum as a sounding board...

This is going to be a pain to track down. I've got a case where I'm almost guaranteed to cause a crash on exit - it's not a simple case

Ok - think I've got it - just not sure what the fix should be - or even if a fix is needed. In my app, I catch the terminate event and ask the user if they are sure they wish to exit. If they say yes, I perform logic to save various settings. Once the settings have been saved I return -1, which should exit. During this exit phase (for some reason) various WM_NCHITTEST message are sent, and I assume that the window has already been destroyed(? - or perhaps some kind of timing issue, which explains why adding the print statements and Perl 5.6 don't cause the crash) - the crash happens when the function CallWindowProc is called. The 'fix' in my case is to hide the main window as soon as the user clicks on the yes button...

Cheers,

jez.



Reply via email to