Crash when users open saved files, think its an OS permission issue

Im having issues pinpointing crashes when users open saved files in an app I made. Users have sent me the files that supposedly crash hard on their machines, but it opens perfectly fine on mine. I think it’s some weird read/write permission issue during code signing or such.

Users report, “It’s always worked, but recently it now crashes!” which makes me suspect its an OS upgrade or something.

If there is a crash then there is a crash log. If there is a permissions problem there is an error message. Not that users can differentiate between the 2 things.

So what is it? Which OS?

1 Like

What does “crash” mean in this context? Are you getting an unhandled exception exit, or a hard crash where the app just vanishes?

It comes up as a message box stating “IOException … RuntimeRaiseException” etc.Here is what the message box says:

%0<window1.window1>oo< ToolItem>

  • [NSToolbarButton sendAction:to:]
  • [NSToolbarltemViewer mouseDown:]
  • [NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:]
  • [NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:]
  • [NSWindow(NSEventRouting) sendEvent:]
    -[NSApplication(NSEvent) sendEvent:]
    Application._CallFunctionWithExceptionHandling%%p _Z33CallFunctionWithExceptionHandlingPFvvE
  • [NSApplication _handleEvent:]
  • [NSApplication run] |
    Kunt mekun

The ErrorNumber property of an IOException is platform specific and will tell you what the problem is. Sometimes there’s even a useful Message property.

This isn’t a crash, this is a RuntimeException, something you can handle completely in your Xojo code. Catch the IOException and you can provide a better error message for the user as well as prevent app termination.

1 Like

Ya, I just don’t understand how this exception error is occurring on another’s machine and not mine. We’re both running MacOS 14.4

The Message property of the IOException may just tell you. Catch the exception and present this information so the user can send it to you.


And it’s the first thing to do when something odd happens. Instrument your code, catch and report exceptions.

Just for clarity, this could be as simple as the file being on a read-only file system and you not specifying read permissions when opening that binarystream as by default they are read/write.