Open Bug 1733436 Opened 3 years ago Updated 2 years ago

Crashes with "Assertion failed: (backingScaleFactor > 0.f), function drawnFocusRingBitmapForTime", while dragging an 'NSColorPanel' object, on macOS 11 and up

Categories

(Core :: Widget: Cocoa, defect, P3)

Unspecified
macOS
defect

Tracking

()

REOPENED

People

(Reporter: smichaud, Unassigned)

References

(Blocks 1 open bug)

Details

Crash Data

These all have +[NSColorPanel _dragColor:withEvent:fromView:source:] on the stack -- so they happen while dragging an NSColorPanel object over a Firefox or Thunderbird window. I don't yet have any concrete examples, nor can I reproduce these crashes.

Some of them happen in builds that are too old to have support for "mac crash info" (builds prior to the 90-branch on which bug 1577886 landed).

bp-32c61088-59c3-4e40-a694-9dc7e0210913

    {
      "num_records": 1,
      "records": [
        {
          "message": "Assertion failed: (backingScaleFactor > 0.f), function drawnFocusRingBitmapForTime, file /System/Volumes/Data/SWE/macOS/BuildRoots/d7e177bcf5/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-2022.60.126/AppKit.subproj/NSAutomaticFocusRing.m, line 306.\n",
          "module": "/usr/lib/system/libsystem_c.dylib"
        }
      ]
    }

    0  libsystem_kernel.dylib  __pthread_kill   context
    1  libsystem_pthread.dylib  pthread_kill   cfi
    2  libsystem_c.dylib  abort   cfi
    3  libsystem_c.dylib  __assert_rtn   cfi
    4  AppKit  +[_NSAutomaticFocusRing showForView:forceRect:isAccessibilityRequest:]   cfi
    5  AppKit  -[NSColorPanelFavoriteSwatch setSelected:]   cfi
    6  UIFoundation  __93-[_NSCollectionViewCore _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory:]_block_invoke.800   cfi
    7  UIFoundation  +[_NSUIAnimator performWithoutAnimation:]   cfi
    8  UIFoundation  -[_NSCollectionViewCore _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory:]   cfi
    9  UIFoundation  -[_NSCollectionViewCore dequeueReusableItemWithReuseIdentifier:forIndexPath:]   cfi
    10  AppKit  -[NSCollectionView makeItemWithIdentifier:forIndexPath:]   cfi
    11  AppKit  -[NSColorPanelFavoritesList collectionView:itemForRepresentedObjectAtIndexPath:]   cfi
    12  AppKit  -[_NSCollectionViewDataSourceAdapter collectionView:itemForRepresentedObjectAtIndexPath:]   cfi
    13  UIFoundation  -[_NSCollectionViewCore _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:isFocused:notify:]   cfi
    14  UIFoundation  -[_NSCollectionViewCore _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:]   cfi
    15  UIFoundation  -[_NSCollectionViewCore _updateVisibleCellsNow:]   cfi
    16  UIFoundation  -[_NSCollectionViewCore _layoutItems]   cfi
    17  UIFoundation  -[_NSCollectionViewCore _itemAtIndexPath:includePrefetchedCells:]   cfi
    18  UIFoundation  __74-[_NSCollectionViewCore _selectItemsAtIndexPaths:animated:notifyDelegate:]_block_invoke   cfi
    19  CoreFoundation  __NSSET_IS_CALLING_OUT_TO_A_BLOCK__   cfi
    20  CoreFoundation  -[__NSSingleObjectSetI enumerateObjectsWithOptions:usingBlock:]   cfi
    21  UIFoundation  -[_NSCollectionViewCore _selectItemsAtIndexPaths:animated:notifyDelegate:]   cfi
    22  AppKit  -[NSCollectionView _selectItemsAtIndexPaths:scrollPosition:notifyDelegate:]   cfi
    23  AppKit  -[NSCollectionView setSelectionIndexPaths:]   cfi
    24  CoreFoundation  __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__   cfi
    25  CoreFoundation  ___CFXRegistrationPost_block_invoke   cfi
    26  CoreFoundation  _CFXRegistrationPost   cfi
    27  CoreFoundation  _CFXNotificationPost   cfi
    28  Foundation  -[NSNotificationCenter postNotificationName:object:userInfo:]   cfi
    29  AppKit  -[NSFavoriteColorsStore setColorEntries:]   cfi
    30  AppKit  -[NSFavoriteColorsStore updatingFromBacking:]   cfi
    31  AppKit  -[NSFavoriteColorsStore updateColorsFromBacking]   cfi
    32  CoreFoundation  __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__   cfi
    33  CoreFoundation  ___CFXRegistrationPost_block_invoke   cfi
    34  CoreFoundation  _CFXRegistrationPost   cfi
    35  CoreFoundation  _CFXNotificationPost   cfi
    36  Foundation  -[NSNotificationCenter postNotificationName:object:userInfo:]   cfi
    37  AppKit  -[NSFavoriteColorsStore setColorEntries:]   cfi
    38  AppKit  -[NSGridFavoriteStoreTransposer writeColorsToBacking:]   cfi
    39  AppKit  -[NSFavoriteColorsStore setColorEntries:]   cfi
    40  AppKit  -[NSFavoriteColorsStore insertColor:atIndex:]   cfi
    41  AppKit  -[NSColorPanelFavoritesList collectionView:acceptDrop:indexPath:dropOperation:]   cfi
    42  AppKit  -[_NSCollectionViewDropReceiver performDragOperation:]   cfi
    43  AppKit  NSCoreDragReceiveMessageProc   cfi
    44  HIServices  CallReceiveMessageCollectionWithMessage   cfi
    45  HIServices  DoMultipartDropMessage   cfi
    46  HIServices  DoDropMessage   cfi
    47  HIServices  DragInApplication   cfi
    48  HIServices  CoreDragStartDragging   cfi
    49  AppKit  -[NSCoreDragManager _dragUntilMouseUp:accepted:]   cfi
    50  AppKit  _handleBeginDraggingSession   cfi
    51  CoreFoundation  __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__   cfi
    52  CoreFoundation  __CFRunLoopDoObservers   cfi
    53  CoreFoundation  CFRunLoopRunSpecific   cfi
    54  Foundation  -[NSRunLoop(NSRunLoop) runMode:beforeDate:]   cfi
    55  Foundation  -[NSRunLoop(NSRunLoop) runUntilDate:]   cfi
    56  AppKit  +[NSColorPanel _dragColor:withEvent:fromView:source:]   cfi
    57  AppKit  -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:]   cfi
    58  AppKit  -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:]   cfi
    59  AppKit  -[NSWindow(NSEventRouting) sendEvent:]   cfi
    60  AppKit  -[NSApplication(NSEvent) sendEvent:]   cfi
    61  XUL  -[GeckoNSApplication sendEvent:]  widget/cocoa/nsAppShell.mm:163  cfi
    62  AppKit  -[NSApplication _handleEvent:]   cfi
    63  AppKit  -[NSApplication run]   cfi
    64  XUL  nsAppShell::Run()  widget/cocoa/nsAppShell.mm:751  cfi
    65  XUL  nsAppStartup::Run()  toolkit/components/startup/nsAppStartup.cpp:289  cfi
    66  XUL  XREMain::XRE_mainRun()  toolkit/xre/nsAppRunner.cpp:5291  cfi
    67  XUL  XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&)  toolkit/xre/nsAppRunner.cpp:5476  cfi
    68  XUL  XRE_main(int, char**, mozilla::BootstrapConfig const&)  toolkit/xre/nsAppRunner.cpp:5535  cfi
    69  firefox  main  browser/app/nsBrowserApp.cpp:386  cfi
    70  libdyld.dylib  start   cfi

Setting initial priority and severity.

Severity: -- → S3
Priority: -- → P3
Crash Signature: [@ __pthread_kill | pthread_kill | abort | +[_NSAutomaticFocusRing showForView:forceRect:isAccessibilityRequest:] ] [@ __pthread_kill | abort | +[_NSAutomaticFocusRing showForView:forceRect:isAccessibilityRequest:] ]

These all have +[NSColorPanel _dragColor:withEvent:fromView:source:] on the stack

Actually not all of them do. But it's still pretty clear that all of them involve dragging an NSColorPanel object.

I don't have permission to view the comments associated with this bug's signatures. Someone please look at them for possible test cases.

This looks promising (there are a few comments outlining similar STR):

STR:

  1. Open the colors dialog in about:preferences
  2. Select visited link color, opens the color picker
  3. In the dropdown menu (I think in the second tab of the picker?) change “apple” to “developer”
  4. Select “system purple color”
  5. Attempt to drag the purple swatch into the swatch history at the bottom of the picker

Another one:

Changing page background colours in settings, clicked on the colour rectangle to launch the macOS colour picker. Dragged a slider to adjust the colour, then dragged the resultant colour swatch to the frequently-used colour panel at bottom right. Firefox crashed out immediately.

Summary: Crashes with "Assertion failed: (backingScaleFactor > 0.f), function drawnFocusRingBitmapForTime", while dragging → Crashes with "Assertion failed: (backingScaleFactor > 0.f), function drawnFocusRingBitmapForTime", while dragging an 'NSColorPanel' object

I'm unable to reproduce this at the moment with a local build with macOS 12.0 Beta (21A5506j) on Intel, or macOS 11.1 on M1.

I can't either. I tested on macOS 10.15.7 (the latest minor update of that), with the FF 92.0.1 (the current release) and today's mozilla-central nightly. I'll keep trying.

Blocks: 1711944

Possible dups, the second of which is actually on Windows:

Bug 1618418
Bug 1703775

This might be a macOS bug, reproducible in any number of apps:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=568920

Summary: Crashes with "Assertion failed: (backingScaleFactor > 0.f), function drawnFocusRingBitmapForTime", while dragging an 'NSColorPanel' object → Crashes with "Assertion failed: (backingScaleFactor > 0.f), function drawnFocusRingBitmapForTime", while dragging an 'NSColorPanel' object, on macOS 11 and up

On Firefox at least, these crashes seem to happen more often with the dark theme. (I'll test that myself later.)

See Also: → 1618418
Crash Signature: [@ __pthread_kill | pthread_kill | abort | +[_NSAutomaticFocusRing showForView:forceRect:isAccessibilityRequest:] ] [@ __pthread_kill | abort | +[_NSAutomaticFocusRing showForView:forceRect:isAccessibilityRequest:] ] → [@ __pthread_kill | pthread_kill | abort | +[_NSAutomaticFocusRing showForView:forceRect:isAccessibilityRequest:] ] [@ __pthread_kill | abort | +[_NSAutomaticFocusRing showForView:forceRect:isAccessibilityRequest:] ] [@ __pthread_kill | pthread_kill | -…

Closing because no crashes reported for 12 weeks.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Crash Signature: -[NSColorPanelFavoriteSwatch setSelected:] ] → -[NSColorPanelFavoriteSwatch setSelected:] ] [@ pthread_kill | abort | +[_NSAutomaticFocusRing showForView:forceRect:isAccessibilityRequest:] ] [@ abort | +[_NSAutomaticFocusRing showForView:forceRect:isAccessibilityRequest:] ]
Resolution: WORKSFORME → ---
You need to log in before you can comment on or make changes to this bug.