Thanks for pointing this out. This is a perfect example of why the debugger should always be open for any developer as they are working on a project.
Fortunately, you only learn the hard way once it seems, I did a similar thing before, but was able to run a "close window" script that allowed me to exit gracefully.
Sometimes, it means force-quitting - and I hate that!
I've started to do two things:
Comment my scripts with lines like "MODAL AHEAD!" as a warning for when I'm using the debugger.
Adding a single-step Close Window script called "Modal Close" to a custom menu that only displays for Full Access, as a sort-of back door while developing and testing. It does NOT "Based on the existing command..." for Close.
I wrote this up, because I couldn't find a thread like it when I was struggling for a solution. I've learned my lesson.
Everyone here has access to FM Server. Put your databases onto server and they'll be safe from client-side crashes.
Catching up some very old mail. I use a modular subscript for opening all new windows which includes all possible permutations of the window types available in 12. The script includes all controls for modal windows when logged in with full access to avoid this happening after I got caught by this and had to do similar to lmconsulting in the original post to be able to close the window.
during developing I never uncheck the close window option in a new modal window.
Only when all test are passed I do it.