My Xojo 2021r3.1 is crashing (often but not always) when building a macOS app (universal).
This is a huge app containing multiple helpers (all helpers console apps build as Universal of course).
The last crash report is attached, maybe someone can explain what happens and has an idea how to fix this. https://gate61.com/xojo_docs/xojo_crash.log
Clearing the caches sometimes solves the problem but not always. Sometimes I need to restart the IDE and the build a few times before succeeding.
This happens on a very regular base since I upgraded my macOS to Sequoia (now 15.4.1).
The app is now build as Universal, AppWrapper is taking care of the notarisation and generating 2 packages, one for x86_64 and another for arm_64.
You’re getting the infamous “Hard crash when accessing the RuntimeException.Stack” bug. There is no fix for the hard crash other than to update the Xojo IDE you built the Mac app with (in this case Xojo itself).
The best you can hope for is to maybe figure out why the IDE is getting a RuntimeException during the build process. From the stack it looks like a post-build script is causing an issue, but I can only guess.
Note that your built application has this same limitation. Your app will crash for Intel users macOS 12 or above if you try to handle a RuntimeException and access the Stack.
So it seems I’ll have to move to a more recent Xojo version. Do you have any idea which is the oldest Xojo version that doesn’t have this bug, if any ?
I made a try using Xojo 2024r4 but all helpers were crashing with thread errors. It seems 2024r4.1 fixed this.
But this app is under heavy development for more than 4 years, testing all functionalities takes weeks and I’m afraid each Xojo release has its share of regressions…
I can’t make an IDE suggestion. 2022r2 was the last quality version I was happy to use and it suffers from this crash as well. I was forced to update to 2025r1.1 and every day I am reminded how unhappy I am about that.
Console apps in 2025r1.1 have a number of issues that shock me. Both that nobody else found them in the last 3 years and secondly that they are even problems to begin with.
Update: I’ve been digging around the tickets and it was allegedly fixed in 2023r2. Maybe start there.
The assertion is happening because of one of your CopyFilesSteps. If you look at them, are there any files in there that are missing or possible not readable when you do your builds?
Can you provide more information on the console app issues you are seeing as we plan to update to a recent version of Xojo and want to avoid any issues.
Hopefully you’re not using Windows, because the only one I’ve been able to work up a ticket for (I don’t file a ticket until I can provide enough details) is that #78745 - Console stdin.ReadAll is completely broken on Windows. There isn’t an assignee or milestone for that and it’s “Your product is broken.”
There are others, but again, not calmly and no tickets. The issue tracker game is infuriating. It took 9 upvotes and pulling strings with TWO MVPs to get A COLOR looked at.
Hi Greg,
Thanks for asking.
If a file doesn’t exists or is not readable, restarting Xojo and rebuilding the app without changing anything should crash every time and it isn’t.
I just checked to make sure but all files and folders are existing and readable.
Thanks for the tip.
However most of the copy files steps are to copy helpers in the app resource folder.
These helpers are in their respective Builds - xx folders which are (re)created by Xojo. That means that the .nosync is lost at every build.
Then do it on the parent folder of the helper projects. The face that they are helpers and presumably are rebuilt periodically may mean that this hypothesis is correct. If iCloud is in the process of syncing a new build of a helper app when you go to build your main app, it’s certainly possible that the underlying copy process can’t get a lock on the file or files to be copied.
The parent folder is the application folder which I rather keep synchronised.
I’m now testing multiple compiles/builds of the helpers and the app using Xojo 2023r2 and Xojo is not crashing so far.
This makes sense but if the problem disappear using a newer Xojo version it may be a Xojo bug after all.
I’ll update this post if the IDE is crashing again.