I have recently started having a problem with my app.

When I exit the app in the IDE it closes cleanly.

When closing the compiled version I get a

'The instruction at "blah" referenced memory at "blah". The memory could not be "written" '

Anyone got any quick tips? I really don't know what has changed.