I get Xojo crashes fairly frequently - a few per day - while editing code. Click too fast, and there’s a crash.
Fine, the Auto Save feature will save me and the unsaved changes will be restored next time I start Xojo, right? And it does present the dialog. But if I tell it to restore the unsaved project, nothing happens and I have lost all that work.
I’m back to remembering to periodically save like it’s 1996 again. Anyone else experiencing this? I’m running Xojo 2024r1 on Mac Sonoma 14.4.1.
Recovery hasn’t worked for me in quite some time, but I don’t know exactly when it stopped - whether it’s a MacOS thing or a Xojo thing, or even a setting. I’m still on 2021r2.1 and I feel like it used to work with this version.
No recent crashes, but I never trust recovery and don’t recommend anyone else trust it either. Time is too precious for recoding. Make sure you have a SaveFile build script. It’s part of all of my projects that I plan to keep for more than an hour.
Right-click your OS in the navigator > Add to “Build Settings” > Build Step > Script
Add content:
Speak( "Saving" ) // I do this so I know it's happening
DoCommand( "SaveFile" )
Crashes while editing code may be a sign of a corrupted font or font chache. A short check can show, if there is any problem…
Or let us have a look in the crash log, as Beatrix suggested.
Xojo 2024R1.1 on macOS 14.4.1 is running stable on my MacStudio.
Note 546091
Keep in mind that Xojo only does its “autosave” when you Run (or Build) with unsaved changes. If you are just editing for a while without saving and Xojo crashes, there won’t be an autosave file to restore unless you have also Run without saving at some point.
My most-frequent crash happens when setting a breakpoint. Click on a line to set the breakpoint and -bam - Xojo gone. Not bothering to file a report because it’s 2021r2.1 and because whatever I report they will say it’s not reproducible. These kinds of rare intermittent bugs can only be fixed by long and careful code inspection.
Kernel Triage:
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
Interesting crash. Autocomplete is trying to refresh a rect.
Which font do you use for your code? Do you have HiDPI on? At which exact stage during typing does the crash happen? I remember doing a secrete preference to show API 1 entries for autocomplete. Did you do the same?
@Beatrix_Willius has good ideas. Also, since the crash is in Autocomplete, and autocomplete uses options based on your own classes, properties, and modules, it could be something specific to this project. Do you see the crash in a different project? If you can isolate it, please submit as an Issue.
The auto save, in my opinion, has always been flaky. I’m so used to do Save and then Run on debug it’s ingrained in muscle memory. I also use text format and commit to git on a regular basis so it’s easy enough to revert code to a known good point.