Awful / Awful.app

Something Awful Forums browser for iOS
https://forums.somethingawful.com/showthread.php?threadid=3837546&perpage=40&noseen=1
136 stars 45 forks source link

Post composer context menu crashes on right click on M1 Mac #1126

Open kode54 opened 2 years ago

kode54 commented 2 years ago

Link to post on the forums by me


Steps to reproduce

  1. Launch Awful.
  2. Open BYOB "post a music" thread, within the first page of topics.
  3. Go to the end of the topic.
  4. Open the post reply box.
  5. Right click on the edit box, using an M1 Mac running the app (Built for iPad) target is acceptable.

Expected result

Should pop up the BBcode context menu, and possibly other menu items, not sure.

Observed result

Application crashes due to NSApplication invoking a crash due to uncaught exception. Backtrace attached in notes.

Notes

I'm using Awful version 5.11 (51101) on an M1 Mac mini (2020, 16GB RAM, 256GB storage) running macOS Monterey 12.1 beta 3. It also occurs with debug builds of the app, fresh built from Git main branch, with all dependencies, and an App Group configured, and the bundle identifiers altered so I could provision signing keys with my account.

Exception notice in log:

2021-11-18 02:20:22.422127-0800 AwfulDebug[54290:1038418] [General] An uncaught exception was raised
2021-11-18 02:20:22.422256-0800 AwfulDebug[54290:1038418] [General] *** -[__NSDictionaryM setObject:forKey:]: object cannot be nil (key: title)

Exception backtrace:

    0   CoreFoundation                      0x00000001829dc1cc __exceptionPreprocess + 240
    1   libobjc.A.dylib                     0x000000018272d7b8 objc_exception_throw + 60
    2   CoreFoundation                      0x0000000182aac488 -[__NSCFString characterAtIndex:].cold.1 + 0
    3   CoreFoundation                      0x0000000182ab9294 -[__NSDictionaryM setObject:forKey:].cold.3 + 0
    4   CoreFoundation                      0x0000000182915630 -[__NSDictionaryM setObject:forKey:] + 904
    5   UIKitCore                           0x00000001a9f42c2c -[_UIMenuBarItem properties] + 124
    6   UIKitMacHelper                      0x0000000197e4bb30 UINSNSMenuItemFromUINSMenuItem + 96
    7   UIKitMacHelper                      0x0000000197e4b838 _insertUINSMenuItemsIntoNSMenu + 844
    8   UIKitMacHelper                      0x0000000197e4b298 UINSNSMenuFromUINSMenu + 152
    9   UIKitMacHelper                      0x0000000197e4b168 -[UINSMenuController _createNSMenu:forContextMenu:] + 92
    10  UIKitMacHelper                      0x0000000197eba438 -[UINSMenuController _prepareToShowContextMenu:activityItemsConfiguration:] + 144
    11  UIKitMacHelper                      0x0000000197eb9d9c -[UINSMenuController showContextMenu:inWindow:atLocationInWindow:activityItemsConfiguration:] + 312
    12  libdispatch.dylib                   0x00000001039b3ff0 _dispatch_call_block_and_release + 32
    13  libdispatch.dylib                   0x00000001039b5d24 _dispatch_client_callout + 20
    14  libdispatch.dylib                   0x00000001039c8f80 _dispatch_main_queue_callback_4CF + 1248
    15  CoreFoundation                      0x000000018299df00 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
    16  CoreFoundation                      0x000000018295b8c0 __CFRunLoopRun + 2540
    17  CoreFoundation                      0x000000018295a734 CFRunLoopRunSpecific + 600
    18  HIToolbox                           0x000000018b4e6f68 RunCurrentEventLoopInMode + 292
    19  HIToolbox                           0x000000018b4e6cdc ReceiveNextEventCommon + 552
    20  HIToolbox                           0x000000018b4e6a9c _BlockUntilNextEventMatchingListInModeWithFilter + 72
    21  AppKit                              0x00000001854af9a4 _DPSNextEvent + 844
    22  AppKit                              0x00000001854ae248 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1332
    23  AppKit                              0x00000001854a0268 -[NSApplication run] + 596
    24  AppKit                              0x000000018547193c NSApplicationMain + 1064
    25  AppKit                              0x0000000185747c88 +[NSWindow _savedFrameFromString:] + 0
    26  UIKitMacHelper                      0x0000000197e48eb4 UINSApplicationMain + 1280
    27  UIKitCore                           0x00000001a9dcf9f4 UIApplicationMain + 164
    28  AwfulDebug                          0x0000000102569c54 main + 464
    29  dyld                                0x000000010373d0f4 start + 520