Hi,
EDIT: found loop in my code, which strangely appears to somehow be triggered by width of folder name / window title. Fixed.
I have my project in Documents/corona/sstarot
Somewhere around 6PM tonight, the macOS app started to hang on startup (with no visible window). If I created a folder called “OLD”, copy sstarot/* to OLD, and build the SAME version in that directory, the app opens/runs ok.
The problem is that if it’s in the directory “sstarot”, the resulting macOS app fails at startup. If I rename the directory, it works.
I can do:
cd Documents/corona
mv sstarot sstarot1
and then open sstarot1 and build it for mac….and it runs!
If I rename the directory back to “sstarot” and build it, it fails.
This is driving me crazy!
(I first saw it was the directory name after copying/comparing/moving/deleting separate files that had changed … but I eventually realized that I could quite cleanly duplicate the problem with a simple directory rename, which excludes possible problems like stale files not being copied.)
Any hints appreciated!
(To compound things, my TimeMachine drive went offline and unmountable this evening : )
Any suggestions, other than just renaming my project? Thanks!
Any chance TimeMachine went down when it had locks on some files in that folder, or on the folder itself, and that’s causing problems. I don’t think that fits what you’re describing, but can’t think of much else either. I guess if you’ve symlink’d that folder to somewhere else, that would explain it, but that’s kind of hard to do by accident. I’d definitely restart the machine if you haven’t already anyway just in case.
What happens if you copy it to a sstarot folder in a different root (ie not under Documents/corona)?
Good question, but I’d rebooted twice and the problem still occurs.
Further testing shows that there is a stupid loop that is trying to calculate a fontsize that will result in text not getting truncated at the edge of the screen. (Stupid because it had a bad boundary check to prevent an infinite loop.)
As strange as it seems … I think the reason it doesn’t happen in the renamed folder is that the folder name difference triggers a window name difference, and that perhaps that makes the initial macOS window just a few pixels bigger, and that’s just enough that it didn’t trigger my truncation avoidance code. But….I tried renaming “sstarot” to “longfoldername” and the hang occurs, changing back to “sstarot1” the hang disappears, changing back to “sstarot” and the hang occurs.
I’ve fixed the code 
1 Like