I figured out what was causing the issue! When the program is killed with Command+Q
, the application exits suddenly without completing the main
function. This causes a problem with the string variables when the application reopens. This is strange because the OS is supposed to free the memory that the application was using. Pressing the close button on the top left corner of the window works almost fine. Sometimes, there are problems when the main font opens a second time, which leads to an exit.
How am I supposed to fix this? It might be a good idea to implement an Exit button. But there are still some issues.