Client: [Sentry] Crash in hasLaunchOnStartup_private

Created on 25 Oct 2017  路  7Comments  路  Source: owncloud/client

From https://sentry.io/owncloud/desktop-win-and-mac/issues/368584972/

It seems hasLaunchOnStartup_private on OSX can crash while accessing a null pointer. Possibly some of the OSX functions there can return 0 and we're not catching those errors? It's likely a rare crash and not a regression in 2.4.0 though.

ReadyToTest bug macOS p2-high sev2-high

Most helpful comment

Could be this macOS bug:

https://discussions.apple.com/thread/8089760?start=0&tstart=0

The system LSSharedFileListItemResolve call returns a null URL even though it also returns a status code indicating success.

I'll make a commit for double checking this stuff and create a build to test.

All 7 comments

I don't see line numbers in sentry even though @jturcotte says we should.
I looked at the function and currently don't know what could crash there

The only thing that I see on casual examination is that folderCFStr may theoretically be null - but that seems unlikely.

Backtrace by @MrBetatester:

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00007fff44cdc5c0 CoreFoundation`CFURLGetString + 32
    frame #1: 0x0000000102f469f3 libocsync.2.4.0.dylib`OCC::hasLaunchOnStartup_private(QString const&) + 531
    frame #2: 0x000000010005f4f7 owncloud`OCC::GeneralSettings::GeneralSettings(QWidget*) + 343
    frame #3: 0x00000001001152e6 owncloud`OCC::SettingsDialogMac::SettingsDialogMac(OCC::ownCloudGui*, QWidget*) + 2678
    frame #4: 0x00000001000734f6 owncloud`OCC::ownCloudGui::ownCloudGui(OCC::Application*) + 102
    frame #5: 0x000000010001d04b owncloud`OCC::Application::Application(int&, char**) + 1995
    frame #6: 0x0000000100006ed9 owncloud`main + 57
    frame #7: 0x0000000100006c54 owncloud`start + 52

@guruz so either urlRef or itemUrlRef end up null somehow?

Raising severity as it seems to be a common crash on high sierra users.

Could be this macOS bug:

https://discussions.apple.com/thread/8089760?start=0&tstart=0

The system LSSharedFileListItemResolve call returns a null URL even though it also returns a status code indicating success.

I'll make a commit for double checking this stuff and create a build to test.

Also closing here - solution in https://github.com/owncloud/client/issues/6191#issuecomment-347520613

Neat!

Was this page helpful?
0 / 5 - 0 ratings