Crashes in com.apple.QuickLookFramework/com.apple.QuickLookUIFramework

  • I use QL API in my application to preview all kind of files (the application is actually a kind of file browser). Before going into real problems, I just want to say I'm just using simple QLPreviewPanel, no hacks or tweaks of any kind. Also, I'm not using any private or non-documented APIs. I also implemented an object that implements QLPreviewPanelController protocol, which also serves as panels delegate and data source, so is also implements all required methods an object implementing QLPreviewPanelDelegate and QLPreviewPanelDataSource protocols (I can send code showing implementation of this object, if necessary).

    However, users report quite some crashes, which involve QLPreviewPanelController. There are three types of crashes, so I'll post them all here.

    This is the first type of crashes:

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

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

    Application Specific Information:
    objc[345]: garbage collection is OFF
    abort() called
    Assertion failure in -[QLPreviewPanelController _updatePanelFrame:animate:] (line 586): unreachable code

    Application Specific Signatures:
    [QL] -[QLPreviewPanelController _updatePanelFrame:animate:]: unreachable code

    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0  libsystem_kernel.dylib            0x00007fff8dcfdce2 __pthread_kill + 10
    1  libsystem_c.dylib                  0x00007fff9477a7d2 pthread_kill + 95
    2  libsystem_c.dylib                  0x00007fff9476ba7a abort + 143
    3  com.apple.QuickLookFramework      0x00007fff97e5d745 _QLCrash + 175
    4  com.apple.QuickLookFramework      0x00007fff97e5d82b _QLRaiseAssert + 230
    5  com.apple.QuickLookUIFramework    0x00007fff90097ec8 -[QLPreviewPanelController _updatePanelFrame:animate:] + 444
    6  com.apple.QuickLookUIFramework    0x00007fff9008e9be -[QLPreviewPanelController previewView:didShowDisplayable:] + 353
    7  com.apple.QuickLookUIFramework    0x00007fff900b1584 -[QLPreviewView _setDisplayable:transition:] + 2236
    8  com.apple.QuickLookUIFramework    0x00007fff900b17a0 -[QLPreviewView _updateDisplayableWithTransition:] + 289
    9  com.apple.QuickLookUIFramework    0x00007fff900b1f19 -[QLPreviewView _setDisplayedDocument:transition:] + 563
    10  com.apple.QuickLookUIFramework    0x00007fff900b3378 -[QLPreviewView _timedOut] + 339
    11  com.apple.Foundation              0x00007fff9263d1aa __NSFireDelayedPerform + 392
    12  com.apple.CoreFoundation          0x00007fff91102c24 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
    13  com.apple.CoreFoundation          0x00007fff91102776 __CFRunLoopDoTimer + 534
    14  com.apple.CoreFoundation          0x00007fff910e3001 __CFRunLoopRun + 1617
    15  com.apple.CoreFoundation          0x00007fff910e2676 CFRunLoopRunSpecific + 230
    16  com.apple.HIToolbox                0x00007fff9329c31f RunCurrentEventLoopInMode + 277
    17  com.apple.HIToolbox                0x00007fff932a35c9 ReceiveNextEventCommon + 355
    18  com.apple.HIToolbox                0x00007fff932a3456 BlockUntilNextEventMatchingListInMode + 62
    19  com.apple.AppKit                  0x00007fff8c98cf5d _DPSNextEvent + 659
    20  com.apple.AppKit                  0x00007fff8c98c861 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
    21  com.apple.AppKit                  0x00007fff8c98919d -[NSApplication run] + 470
    22  com.apple.AppKit                  0x00007fff8cc07b88 NSApplicationMain + 867
    23  com.cocoatech.PathFinder          0x000000010000e764 0x100000000 + 59236

    The stack trace is not always the same, but it always ends with the following calls:

    0  libsystem_kernel.dylib            0x00007fff8dcfdce2 __pthread_kill + 10
    1  libsystem_c.dylib                  0x00007fff9477a7d2 pthread_kill + 95
    2  libsystem_c.dylib                  0x00007fff9476ba7a abort + 143
    3  com.apple.QuickLookFramework      0x00007fff97e5d745 _QLCrash + 175
    4  com.apple.QuickLookFramework      0x00007fff97e5d82b _QLRaiseAssert + 230
    5  com.apple.QuickLookUIFramework    0x00007fff90097ec8 -[QLPreviewPanelController _updatePanelFrame:animate:] + 444

    Is this a bug in QuickLook framework (unreachable code), or am I doing something wrong here? If it's my fault, any hint on what I'm doing wrong is highly appreciated.


    This is the second type of crashes:

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

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

    Application Specific Information:
    objc[193]: garbage collection is OFF
    abort() called
    Assertion failure in -[QLPreviewCacheManager cacheRecentDocument:] (line 161): document.displayBundle.visibility == QLPreviewHiddenVisibilityState

    Application Specific Signatures:
    [QL] -[QLPreviewCacheManager cacheRecentDocument:]: document.displayBundle.visibility == QLPreviewHiddenVisibilityState

    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0  libsystem_kernel.dylib            0x00007fff8784ace2 __pthread_kill + 10
    1  libsystem_c.dylib                  0x00007fff8e1157d2 pthread_kill + 95
    2  libsystem_c.dylib                  0x00007fff8e106a7a abort + 143
    3  com.apple.QuickLookFramework      0x00007fff87c57745 _QLCrash + 175
    4  com.apple.QuickLookFramework      0x00007fff87c5782b _QLRaiseAssert + 230
    5  com.apple.QuickLookUIFramework    0x00007fff869a8ee8 -[QLPreviewCacheManager cacheRecentDocument:] + 615
    6  com.apple.QuickLookUIFramework    0x00007fff86936897 -[QLPreviewView _recycleDocument:restore:] + 229
    7  com.apple.QuickLookUIFramework    0x00007fff86936f4d -[QLPreviewView _setDisplayedDocument:transition:] + 615
    8  com.apple.QuickLookUIFramework    0x00007fff86937127 -[QLPreviewView _setDocument:canDelayDisplay:] + 286
    9  com.apple.QuickLookUIFramework    0x00007fff86938d50 -[QLPreviewView _startLoadingPreviewItem:timeoutDate:] + 1341
    10  com.apple.QuickLookUIFramework    0x00007fff8691a499 -[QLPreviewPanelController _setCurrentPreviewItem:withTransition:blocking:] + 354
    11  com.apple.QuickLookUIFramework    0x00007fff8691a11e -[QLPreviewPanelController _flushCurrentDisplayBundle] + 169
    12  com.apple.QuickLookUIFramework    0x00007fff86954f1a -[QLPathWatcher _watcherDidWatchURL:flags:] + 1064
    13  com.apple.QuickLookUIFramework    0x00007fff8695489a __-[QLPathWatcher _signalEventsForURL:flags:]_block_invoke_1 + 84
    14  com.apple.CoreFoundation          0x00007fff8748975d -[NSObject performSelector:withObject:] + 61
    15  com.apple.Foundation              0x00007fff8cc3dd94 __NSThreadPerformPerform + 214
    16  com.apple.CoreFoundation          0x00007fff874086e1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    17  com.apple.CoreFoundation          0x00007fff87407f4d __CFRunLoopDoSources0 + 253
    18  com.apple.CoreFoundation          0x00007fff8742ed39 __CFRunLoopRun + 905
    19  com.apple.CoreFoundation          0x00007fff8742e676 CFRunLoopRunSpecific + 230
    20  com.apple.HIToolbox                0x00007fff8648831f RunCurrentEventLoopInMode + 277
    21  com.apple.HIToolbox                0x00007fff8648f5c9 ReceiveNextEventCommon + 355
    22  com.apple.HIToolbox                0x00007fff8648f456 BlockUntilNextEventMatchingListInMode + 62
    23  com.apple.AppKit                  0x00007fff90d88f5d _DPSNextEvent + 659
    24  com.apple.AppKit                  0x00007fff90d88861 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
    25  com.apple.AppKit                  0x00007fff90d8519d -[NSApplication run] + 470
    26  com.apple.AppKit                  0x00007fff91003b88 NSApplicationMain + 867
    27  com.cocoatech.PathFinder          0x000000010000e764 0x100000000 + 59236

    They all look pretty much the same. Again the same questions: a bug in the QuickLook framework, or my fault.


    Finally, the third type of crashes:

    Exception Type:  EXC_CRASH (SIGILL)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Crashed Thread:  0  Dispatch queue: com.apple.main-thread

    Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
    0  libSystem.B.dylib                  0x00007fffffe00277 __spin_lock + 23
    1  com.apple.Foundation              0x000000010102a53a -[NSNotificationCenter addObserver:selector:name:object:] + 158
    2  com.cocoatech.PathFinder          0x0000000100058447 0x100000000 + 361543
    3  com.cocoatech.PathFinder          0x0000000100056914 0x100000000 + 354580
    4  com.cocoatech.PathFinder          0x00000001001170c2 0x100000000 + 1142978
    5  com.cocoatech.PathFinder          0x0000000100116ffa 0x100000000 + 1142778
    6  com.apple.QuickLookUIFramework    0x000000010a0a8c53 -[QLPreviewPanelController hasMultipleItems] + 16
    7  com.apple.QuickLookUIFramework    0x000000010a0b3e84 -[QLPreviewControlsController layoutControls] + 1041
    8  com.apple.QuickLookUIFramework    0x000000010a0aca5f -[QLPreviewPanelController _refreshLayoutAndContent] + 388
    9  com.apple.QuickLookUIFramework    0x000000010a0ac894 -[QLPreviewPanelController _doReloadDataIfNecessary] + 297
    10  com.apple.Foundation              0x000000010104b33c __NSFireDelayedPerform + 404
    11  com.apple.CoreFoundation          0x0000000101bfebe8 __CFRunLoopRun + 6488
    12  com.apple.CoreFoundation          0x0000000101bfcdbf CFRunLoopRunSpecific + 575
    13  com.apple.HIToolbox                0x00000001037eb7ee RunCurrentEventLoopInMode + 333
    14  com.apple.HIToolbox                0x00000001037eb5f3 ReceiveNextEventCommon + 310
    15  com.apple.HIToolbox                0x00000001037eb4ac BlockUntilNextEventMatchingListInMode + 59
    16  com.apple.AppKit                  0x0000000102525eb2 _DPSNextEvent + 708
    17  com.apple.AppKit                  0x0000000102525801 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 155
    18  com.apple.AppKit                  0x00000001024eb68f -[NSApplication run] + 395
    19  com.apple.AppKit                  0x00000001024e43b0 NSApplicationMain + 364
    20  com.cocoatech.PathFinder          0x000000010000e764 0x100000000 + 59236

    Again, they all look the same, only sometimes there is something like:

    7  com.apple.QuickLookUIFramework    0x000000010a0ab3fe -[QLPreviewPanelController shouldShowControlWithID:] + 130

    between:

    6  com.apple.QuickLookUIFramework    0x000000010a0a8c53 -[QLPreviewPanelController hasMultipleItems] + 16
    7  com.apple.QuickLookUIFramework    0x000000010a0b3e84 -[QLPreviewControlsController layoutControls] + 1041

    This seems like my fault at first sight, like I'm doing something wrong in delegate of data source methods, but I don't use NSNotificationCenter in any of them.

    Any help is appreciated.

    -- Dragan
previous month may 2012 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today