Skip to content

Mac app crashes when any modifier key is pressed #72393

@justinmc

Description

@justinmc
  1. Create a new app with flutter create bug and run it.
  2. Make sure the window is focused, and press any modifier key (shift, control, option, command).
  3. The app crashes.

Is this happening for anyone else?

Logs
  2020-12-15 15:43:55.804 just_a_text_field[39919:427031] *** Assertion failure in -[NSEvent charactersIgnoringModifiers], /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1894.60.100/AppKit.subproj/NSEvent.m:2796
2020-12-15 15:43:55.809 just_a_text_field[39919:427031] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid message sent to event "NSEvent: type=FlagsChanged loc=(366.617,505.117) time=24758.9 flags=0x80120 win=0x7fa207e04db0 winNum=4850 ctxt=0x0 keyCode=58"'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff2e19db57 __exceptionPreprocess + 250
	1   libobjc.A.dylib                     0x00007fff66fe95bf objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff2e1c6d08 +[NSException raise:format:arguments:] + 88
	3   Foundation                          0x00007fff308b8e9d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
	4   AppKit                              0x00007fff2b5dab8e -[NSEvent charactersIgnoringModifiers] + 717
	5   AppKit                              0x00007fff2b6e3122 -[NSButton performKeyEquivalent:] + 43
	6   AppKit                              0x00007fff2b6e30dd -[NSControl _performKeyEquivalent:conditionally:] + 150
	7   AppKit                              0x00007fff2b6e2fb1 -[NSView performKeyEquivalent:] + 189
	8   AppKit                              0x00007fff2b6e2fb1 -[NSView performKeyEquivalent:] + 189
	9   AppKit                              0x00007fff2b6e2fb1 -[NSView performKeyEquivalent:] + 189
	10  AppKit                              0x00007fff2bc2d76c -[NSWindow _commonPerformKeyEquivalent:conditionally:] + 73
	11  AppKit                              0x00007fff2b7094fd -[NSWindow keyDown:] + 30
	12  FlutterMacOS                        0x00000001044856c0 -[FlutterViewController propagateKeyEvent:ofType:] + 512
	13  FlutterMacOS                        0x0000000104485e38 __49-[FlutterViewController dispatchKeyEvent:ofType:]_block_invoke + 152
	14  FlutterMacOS                        0x000000010447bc8f _ZZ51-[FlutterEngine sendOnChannel:message:binaryReply:]EN3$_88__invokeEPKhmPv + 95
	15  FlutterMacOS                        0x00000001049a3fe3 _ZNSt3__110__function6__funcIN3fml8internal14CopyableLambdaIZN7flutter31EmbedderPlatformMessageResponse8CompleteENS_10unique_ptrINS2_7MappingENS_14default_deleteIS8_EEEEE3$_0EENS_9allocatorISD_EEFvvEEclEv + 83
	16  FlutterMacOS                        0x00000001049a81ea _ZN7flutter18EmbedderTaskRunner8PostTaskEy + 682
	17  FlutterMacOS                        0x000000010498eb7c FlutterEngineRunTask + 44
	18  FlutterMacOS                        0x000000010447b7a7 __60-[FlutterEngine postMainThreadTask:targetTimeInNanoseconds:]_block_invoke + 71
	19  libdispatch.dylib                   0x00007fff681376c4 _dispatch_call_block_and_release + 12
	20  libdispatch.dylib                   0x00007fff68138658 _dispatch_client_callout + 8
	21  libdispatch.dylib                   0x00007fff68143cab _dispatch_main_queue_callback_4CF + 936
	22  CoreFoundation                      0x00007fff2e160e81 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
	23  CoreFoundation                      0x00007fff2e120c87 __CFRunLoopRun + 2028
	24  CoreFoundation                      0x00007fff2e11fe3e CFRunLoopRunSpecific + 462
	25  HIToolbox                           0x00007fff2cd4cabd RunCurrentEventLoopInMode + 292
	26  HIToolbox                           0x00007fff2cd4c7d5 ReceiveNextEventCommon + 584
	27  HIToolbox                           0x00007fff2cd4c579 _BlockUntilNextEventMatchingListInModeWithFilter + 64
	28  AppKit                              0x00007fff2b392039 _DPSNextEvent + 883
	29  AppKit                              0x00007fff2b390880 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
	30  AppKit                              0x00007fff2b38258e -[NSApplication run] + 658
	31  AppKit                              0x00007fff2b354396 NSApplicationMain + 777
	32  just_a_text_field                   0x00000001044686fd main + 13
	33  libdyld.dylib                       0x00007fff68191cc9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Lost connection to device.
flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel master, 1.25.0-9.0.pre.72, on Mac OS X 10.15.7 19H15 darwin-x64, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [✓] Xcode - develop for iOS and macOS (Xcode 12.0) [✓] Chrome - develop for the web [✓] Android Studio (version 3.5) [✓] Connected device (2 available)

• No issues found!

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: desktopRunning on desktopc: crashStack traces logged to the consolec: fatal crashCrashes that terminate the processcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.engineflutter/engine related. See also e: labels.found in release: 1.26Found to occur in 1.26has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-macBuilding on or for macOS specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions