Delphi 10.1 windows 10 onclose issue
I have my application migrated to Delphi 10.1 and database PostgrSQL. All exes works fine on windows 7.I have shifted my code on windows 10 system.On close of exe I get access violation error.
Stack trace gives me:
Form 2 is called using showmodal on create of form1. Code written on cancel button on form2 is: application.Terminate; Modal result is 'mrCancel' of the button. How do I resolve this error? Access violation comes after Application.run.
Accepted Answer
The access violation is pointing to an address which is a default for objects which have already been disposed and their point set nil (i.e. something is being free'd twice).
Is it possible to attach a sample application (which just sufficient code to reproduce the problem) as an attachment here for us to look at?