Frustration: Xojo no longer restores unsaved changes after a crash!

This is incredibly frustrating.

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.

No crashes here but I have different environment

  • Xojo 2023r4
  • macOS 13.6.6
  • working everyday with Xojo Web projects

No crashes here either, though I still save like it’s the 90’s (force of habit).

  • Xojo 2024r1.1 (Desktop apps only)
  • macOS 13.6.6 (Intel)

I also have a MBA M1 with 14.4.1 that I sometimes use (which I don’t fully trust since upgrading to Sonoma), but no Xojo crashes there, so far.

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.

1 Like

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" )
  • Drag the new build step above “Build”

I save manually often as a force of habit, but if I forget then at least the IDE will do it for me each time I run the project.

7 Likes

The debugger is still flaky as heck and there always has been a memory leak when doing debug runs. But editing text never ever has crashed for me.

Please post your crash log in a new thread.

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.

2 Likes

33 years of using Photoshop has made saving completely automatic.

So many times I heard artist complain about losing 2, 3 or even four hours of work because they hadn’t saved in that long.

@Eric_Williams

To echo others - please post the crash log here by following these steps:

  • Open Console.app
  • If the Sources pane is not showing, show it:
    image
  • navigate to the Crash Reports section:
    image
  • find your crash, and copy & paste the entire text
  • paste the crash report text here in the forum

Since these reports can be very long and make the forum difficult to use, please as a courtesy format it for easy reading:

  • select the crash report text, and click the “code” tag in the forum:
    image
  • then click the Details option to hide the very long crash report behind a disclosure triangle
    image

The end result will look something like this:

My Crash Report
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               mdworker [7833]
Path:                  /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Support/mdworker
Identifier:            mdworker
Version:               ???
Code Type:             X86-64 (Native)
Parent Process:        launchd [1]
User ID:               503

Date/Time:             2024-04-29 07:34:41.2851 -0700
OS Version:            macOS 13.6.6 (22G630)
Report Version:        12
...
3 Likes

Did you run your project between start and crash?

From Issue #66851

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.

2 Likes

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.

2 Likes
Summary

`-------------------------------------
Translated Report (Full Report Below)

Process: Xojo [52356]
Path: /Applications/Xojo 2024 Release 1/Xojo.app/Contents/MacOS/Xojo
Identifier: com.xojo.xojo
Version: 24.1.0.62510 (24.1.0.3.62510)
Code Type: X86-64 (Native)
Parent Process: launchd [1]
User ID: 504

Date/Time: 2024-04-28 16:26:47.5286 -0700
OS Version: macOS 14.4.1 (23E224)
Report Version: 12
Bridge OS Version: 8.4 (21P4222)
Anonymous UUID: C6FAEEB1-F277-585E-9737-4D7DE182F63F

Sleep/Wake UUID: 4FFA01A4-8B61-4C16-831A-356E5A87FCA3

Time Awake Since Boot: 390000 seconds
Time Since Wake: 13578 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
abort() called

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

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x7ff808ebe14a __pthread_kill + 10
1 libsystem_pthread.dylib 0x7ff808ef6ebd pthread_kill + 262
2 libsystem_c.dylib 0x7ff808e1ca39 abort + 126
3 IDEUtils.dylib 0x121aa120f 0x121a92000 + 61967
4 HIToolbox 0x7ff8139bd828 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2057
5 HIToolbox 0x7ff8139bc9bf SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 336
6 HIToolbox 0x7ff8139bc85e SendEventToEventTargetWithOptions + 45
7 HIToolbox 0x7ff813a15bb1 SendTSMEvent_WithCompletionHandler + 388
8 HIToolbox 0x7ff813b6e5c0 __SendTextInputEvent_WithCompletionHandler_block_invoke + 511
9 HIToolbox 0x7ff813b6cf08 SendTextInputEvent_WithCompletionHandler + 1046
10 TextInputUIMacHelper 0x7ffc14329210 -[TUINSCursorUIController getCursorLocation:] + 540
11 TextInputUIMacHelper 0x7ffc14328e07 __47-[TUINSCursorUIController updateCursorLocation]_block_invoke + 928
12 TextInputUIMacHelper 0x7ffc1432c323 __TUIRectForCharacterRange_block_invoke + 238
13 AppKit 0x7ff80d3d0d43 -[NSTextInputContext(NSInputContext_WithCompletion) firstRectForCharacterRange:completionHandler:] + 302
14 TextInputUIMacHelper 0x7ffc1432c13f TUIRectForCharacterRange + 222
15 TextInputUIMacHelper 0x7ffc1432c02f __TUISelectionRect_block_invoke_2 + 355
16 TextInputUIMacHelper 0x7ffc1432bea8 __TUISelectionRect_block_invoke + 136
17 TextInputUIMacHelper 0x7ffc14328a27 -[TUINSCursorUIController updateCursorLocation] + 1143
18 TextInputUIMacHelper 0x7ffc14329f9c -[TUINSCursorUIController invalidateCharacterCoordinates] + 211
19 Xojo 0x1018f9195 TextInputCanvas.InvalidateTextRects%%o + 69
20 Xojo 0x111147c52 CodeEditorCanvasNew.ChangeSelection%%ooobbbb + 81842
21 Xojo 0x11123a360 CodeEditorCanvasNew.ReplaceText%%osb + 14864
22 Xojo 0x11112faa5 CodeEditorCanvasNew.ApplyAutocomplete%b%o + 6149
23 Xojo 0x11110e8c7 CodeEditorCanvasNew.Event_DoCommand%b%os + 11239
24 IDEUtils.dylib 0x121b0d370 0x121a92000 + 504688
25 AppKit 0x7ff80c8f9e49 -[NSTextInputContext(NSInputContext_WithCompletion) doCommandBySelector:completionHandler:] + 220
26 AppKit 0x7ff80c82d6ef -[NSKeyBindingManager(NSKeyBindingManager_MultiClients) interpretEventAsCommand:forClient:] + 2115
27 AppKit 0x7ff80c83625e __84-[NSTextInputContext _handleEvent:options:allowingSyntheticEvent:completionHandler:]_block_invoke_5 + 496
28 AppKit 0x7ff80d3cebd9 __84-[NSTextInputContext _handleEvent:options:allowingSyntheticEvent:completionHandler:]_block_invoke_3.922 + 74
29 AppKit 0x7ff80c83604e -[NSTextInputContext tryHandleEvent_HasMarkedText_withDispatchCondition:dispatchWork:continuation:] + 86
30 AppKit 0x7ff80d3ceb60 __84-[NSTextInputContext _handleEvent:options:allowingSyntheticEvent:completionHandler:]_block_invoke.919 + 246
31 HIToolbox 0x7ff813b72232 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_6 + 68
32 HIToolbox 0x7ff813a2a46d invocation function for block in DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 110
33 AppKit 0x7ff80d3c9d90 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke.321 + 563
34 AppKit 0x7ff80c82f3b8 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke_2 + 74
35 AppKit 0x7ff80c82f33f -[NSTextInputContext tryHandleTSMEvent_HasMarkedText_withDispatchCondition:dispatchWork:continuation:] + 86
36 AppKit 0x7ff80c82e9c6 -[NSTextInputContext handleTSMEvent:completionHandler:] + 1850
37 AppKit 0x7ff80c82e21d _NSTSMEventHandler + 299
38 HIToolbox 0x7ff8139bd573 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1364
39 HIToolbox 0x7ff8139bc9bf SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 336
40 HIToolbox 0x7ff8139bc85e SendEventToEventTargetWithOptions + 45
41 HIToolbox 0x7ff813a15bb1 SendTSMEvent_WithCompletionHandler + 388
42 HIToolbox 0x7ff813a16065 __SendUnicodeTextAEToUnicodeDoc_WithCompletionHandler_block_invoke + 390
43 HIToolbox 0x7ff813a15eba __SendFilterTextEvent_WithCompletionHandler_block_invoke + 182
44 HIToolbox 0x7ff813a15c01 SendTSMEvent_WithCompletionHandler + 468
45 HIToolbox 0x7ff813a15a00 SendFilterTextEvent_WithCompletionHandler + 230
46 HIToolbox 0x7ff813a156c1 SendUnicodeTextAEToUnicodeDoc_WithCompletionHandler + 274
47 HIToolbox 0x7ff813a15473 __utDeliverTSMEvent_WithCompletionHandler_block_invoke_2 + 277
48 HIToolbox 0x7ff813a152d6 __utDeliverTSMEvent_WithCompletionHandler_block_invoke + 362
49 HIToolbox 0x7ff813a15125 TSMKeyEvent_WithCompletionHandler + 590
50 HIToolbox 0x7ff813a197e0 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_5 + 251
51 HIToolbox 0x7ff813a14ecc __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_4 + 311
52 HIToolbox 0x7ff813a14d03 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_3 + 262
53 HIToolbox 0x7ff813a14aba __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_2 + 283
54 HIToolbox 0x7ff813a1485c __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke + 275
55 HIToolbox 0x7ff813a035fb TSMProcessRawKeyEventWithOptionsAndCompletionHandler + 2345
56 AppKit 0x7ff80d3cea57 __84-[NSTextInputContext _handleEvent:options:allowingSyntheticEvent:completionHandler:]_block_invoke_3.917 + 111
57 AppKit 0x7ff80d3ce7b6 __204-[NSTextInputContext tryTSMProcessRawKeyEvent_orSubstitution:dispatchCondition:setupForDispatch:furtherCondition:doubleSpaceSubstitutionCondition:doubleSpaceSubstitutionWork:dispatchTSMWork:continuation:]_block_invoke.881 + 120
58 AppKit 0x7ff80c82cd52 -[NSTextInputContext tryTSMProcessRawKeyEvent_orSubstitution:dispatchCondition:setupForDispatch:furtherCondition:doubleSpaceSubstitutionCondition:doubleSpaceSubstitutionWork:dispatchTSMWork:continuation:] + 246
59 AppKit 0x7ff80c82c750 -[NSTextInputContext _handleEvent:options:allowingSyntheticEvent:completionHandler:] + 1396
60 AppKit 0x7ff80c82c1a2 -[NSTextInputContext _handleEvent:allowingSyntheticEvent:] + 105
61 IDEUtils.dylib 0x121b0ca8c 0x121a92000 + 502412
62 AppKit 0x7ff80c799142 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 520
63 AppKit 0x7ff80c798d1f -[NSWindow(NSEventRouting) sendEvent:] + 345
64 XojoFramework 0x117c5510d 0x117b66000 + 979213
65 AppKit 0x7ff80cf482b6 -[NSApplication(NSEventRouting) sendEvent:] + 346
66 XojoFramework 0x117c45879 0x117b66000 + 915577
67 Xojo 0x1016456e5 Application._CallFunctionWithExceptionHandling%%op + 181
68 XojoFramework 0x117dcce65 CallFunctionWithExceptionHandling(void (*)()) + 254
69 XojoFramework 0x117c457f7 0x117b66000 + 915447
70 AppKit 0x7ff80cb035c2 -[NSApplication _handleEvent:] + 65
71 AppKit 0x7ff80c62b02a -[NSApplication run] + 640
72 XojoFramework 0x117dcb689 RuntimeRun + 41
73 Xojo 0x1018389c3 REALbasic._RuntimeRun + 19
74 Xojo 0x115736fe6 _Main + 326
75 Xojo 0x1156f9a03 main + 19
76 dyld 0x7ff808b6b366 start + 1942
`

1 Like

Ohhhh so THIS is why every time I run the graffitisuite demo the TTS scares the daylights out of me, LOL. No question that it’s useful though!

1 Like

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.

1 Like

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.

4 Likes