I had to work on some entitlements issue in my build process. Since then Xojo does the occasional hard crash when building my apps. There is a helper app, an uninstaller, an installer and the main app. Xojo crashes during building of the main app.
VM Region Info: 0x78002e0074 is not in any region. Bytes after previous region: 34362753141 Bytes before following region: 105037717176204
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
commpage (reserved) 1000000000-7000000000 [384.0G] —/— SM=NUL reserved VM address space (unallocated)
—> GAP OF 0x5f9000000000 BYTES
MALLOC_NANO 600000000000-600020000000 [512.0M] rw-/rwx SM=PRV
Kernel Triage:
CL - (arg = 0x0) cluster_pagein past EOF
APFS - (arg = 0x3b12001600200040) cluster_pagein() failed
VM - (arg = 0x1900000016) Filesystem pagein returned an error in vnode_pagein
VM - (arg = 0x0) Page has error bit set
CL - (arg = 0x0) cluster_pagein past EOF
Assuming this line is correct (it may not be with an offset of 1652), that’s code that reads a file in the RealBasicBinaryFile class, which is responsible for reading and writing binary projects.
I suspect, based on the crash report, that the problem is actually the SaveAgain script and the fact that Xojo is running it under a DoEvents loop for the progress window.
Is this build automation something that you run while you’re using the IDE or completely automatically where it launches the IDE, builds your app and then quits the IDE when it’s done?
No, haven’t added logging to the “save” script. I’ve now removed the script completely as well as the “Lite” script and Xojo still crashes.
I’m using the IDE Communicator app because I need to build 4 apps. But the IDE isn’t launched or quit. However, all 4 apps use Xojo scripts.
VM Region Info: 0x44206c616e72 is not in any region. Bytes after previous region: 74425011629683 Bytes before following region: 30647068299662
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
commpage (reserved) 1000000000-7000000000 [384.0G] —/— SM=NUL reserved VM address space (unallocated)
—> GAP OF 0x5f9000000000 BYTES
MALLOC_NANO 600000000000-600020000000 [512.0M] rw-/rwx SM=PRV
I’m using the IDE Communicator app because I need to build 4 apps. But the IDE isn’t launched or quit. However, all 4 apps use Xojo scripts.
So you’re running the Xojo IDE as usual, not even with the Environment Variable XOJO_AUTOMATION=True? (see Documentation: IDE Communicator — Xojo documentation)
Just thinking of the unexpected TemplatesWindowNew…
So what does your IDE Communicator Script look like?
I’d assume:
Load Project 1
Build
Close Project 1
…this is where the TemplatesWindowNew might pop up…
Load Project 2
Build
…
In all our build automations, we always
make sure the Xojo IDE is quit
launch Xojo IDE (with corresponding/needed Environment Variables such as XOJO_AUTOMATION=True)
load/build a project
Quit Xojo
Yes, this would take longer to build 4 projects when launching/quitting Xojo between each project… but it would be interesting to know if that makes a difference.
Maybe also just not closing the previously opened projects?
Or maybe try (just to test) to split up the IDE Communicator Script in 4 distinct ones. One for each project to be built. And in between (once one project has been built) manually close the Xojo IDE Windows (even a possible “New Templates Window”).
That’s just trying to see if the issue occurs if building 4 different projects one-after-another with the same Xojo IDE instance running (or if the Xojo IDE has a build issue when switching between projects and sometimes showing the “new project” dialog).
That would be my guess, that the issue is in that “uncommon” usage of having an IDE Communicator load/build/close multiple projects in a single script (and having the Xojo IDE in “normal mode”, not “build automation mode”).
I can’t say if that dialog is also hidden (not showing) when using the Environment Variable XOJO_AUTOMATION=True…
I’ll do some testing with building only one project.
The build script opens each project, builds and closes it with some twists. I first open the main project and check something. This has worked fine for 2 years or so.
But I have had problems with an important script in one of the apps not being run. I had a check inside the app with an error message. Then I noticed that the error isn’t being shown. So I added a check in the IDE Communicator script:
'Check only NSUIElement value in Info.plist
dim SchedulerPath as String = basePath + "code\ current/Builds\ -\ max\ scheduler/macOS\ Universal/"
if MaxVersion = "0" then
SchedulerPath = SchedulerPath + "Mail\ Archiver\ X\ Scheduler.app"
elseif MaxVersion = "1" then
SchedulerPath = SchedulerPath + "Mail\ Archiver\ X\ Pro\ Scheduler.app"
elseif MaxVersion = "3" then
SchedulerPath = SchedulerPath + "Mail\ Archiver\ X\ Pro\ Admin\ Scheduler.app"
end if
theCommand = "/usr/bin/defaults read " + SchedulerPath + "/Contents/Info NSUIElement"
theResult = doShellCommand(theCommand)
If theResult.Trim <> "1" Then
theCommand = "osascript -e 'display dialog ""Scheduler not set to Background.""'"
theResult = DoShellCommand(theCommand)
return
End If
Xojo also likes to crash after showing the dialog. I’ll take that out for testing to see if this makes a difference.
Build one project at a time: worked fine.
Build with Xojo project and not with app: crashed on uninstaller.
Take out plist check: crashed on uninstaller.
Reverted build app to an older version: crashed on installer.
Don’t open main project first for check: worked fine 2 times in a row.
Is this weird or not? I have this check in the IDE Communicator script for 2 years. Next I’ll try to close the main project after the check. And I’ll make a ticket.