Hello Ben,
the log does not show anything interesting, may be there's other file with previous log entries (.bak_0.log).
Anyway, I tried to reproduce it and it works fine for me (Win10) - click on exit asks me and then it asks me if I want to save the MEX configuration. May be if you open the Pins (active Pins perspective), do the import of settings from the C file and check, whether you have the save icon enabled:

If yes, please save it, so your work is not lost when killing the IDE.
You can just try to disable asking for closing the IDE in the preferences:

And last question - if you click on close the IDE - does the IDE works normally, or does it stop responding?
Regards,
Libor