Skip to content

Crash on MacOS: NSInternalInconsistencyException (Invalid message sent to event) #72634

@tvolkert

Description

@tvolkert

Ran my app in debug mode on MacOS and then didn't touch it - just let it sit in the background. Came back to discover this:

2020-12-18 13:10:31.026 payouts[7981:9355285] *** 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-18 13:10:31.042 payouts[7981:9355285] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid message sent to event "NSEvent: type=FlagsChanged loc=(974.973,46.5195) time=479413.6 flags=0x100 win=0x7fb846a0d3c0 winNum=42698 ctxt=0x0 keyCode=0"'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff3301cb57 __exceptionPreprocess + 250
	1   libobjc.A.dylib                     0x00007fff6be685bf objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff33045d08 +[NSException raise:format:arguments:] + 88
	3   Foundation                          0x00007fff35737e9d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
	4   AppKit                              0x00007fff30459b8e -[NSEvent charactersIgnoringModifiers] + 717
	5   AppKit                              0x00007fff30562122 -[NSButton performKeyEquivalent:] + 43
	6   AppKit                              0x00007fff305620dd -[NSControl _performKeyEquivalent:conditionally:] + 150
	7   AppKit                              0x00007fff30561fb1 -[NSView performKeyEquivalent:] + 189
	8   AppKit                              0x00007fff30561fb1 -[NSView performKeyEquivalent:] + 189
	9   AppKit                              0x00007fff30561fb1 -[NSView performKeyEquivalent:] + 189
	10  AppKit                              0x00007fff30aac76c -[NSWindow _commonPerformKeyEquivalent:conditionally:] + 73
	11  AppKit                              0x00007fff305884fd -[NSWindow keyDown:] + 30
	12  FlutterMacOS                        0x000000010657fbc0 -[FlutterViewController propagateKeyEvent:ofType:] + 512
	13  FlutterMacOS                        0x0000000106580338 __49-[FlutterViewController dispatchKeyEvent:ofType:]_block_invoke + 152
	14  FlutterMacOS                        0x000000010657618f _ZZ51-[FlutterEngine sendOnChannel:message:binaryReply:]EN3$_88__invokeEPKhmPv + 95
	15  FlutterMacOS                        0x0000000106a9ec23 _ZNSt3__110__function6__funcIN3fml8internal14CopyableLambdaIZN7flutter31EmbedderPlatformMessageResponse8CompleteENS_10unique_ptrINS2_7MappingENS_14default_deleteIS8_EEEEE3$_0EENS_9allocatorISD_EEFvvEEclEv + 83
	16  FlutterMacOS                        0x0000000106aa2e2a _ZN7flutter18EmbedderTaskRunner8PostTaskEy + 682
	17  FlutterMacOS                        0x0000000106a897bc FlutterEngineRunTask + 44
	18  FlutterMacOS                        0x0000000106575ca7 __60-[FlutterEngine postMainThreadTask:targetTimeInNanoseconds:]_block_invoke + 71
	19  libdispatch.dylib                   0x00007fff6cfb66c4 _dispatch_call_block_and_release + 12
	20  libdispatch.dylib                   0x00007fff6cfb7658 _dispatch_client_callout + 8
	21  libdispatch.dylib                   0x00007fff6cfc2cab _dispatch_main_queue_callback_4CF + 936
	22  CoreFoundation                      0x00007fff32fdfe81 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
	23  CoreFoundation                      0x00007fff32f9fc87 __CFRunLoopRun + 2028
	24  CoreFoundation                      0x00007fff32f9ee3e CFRunLoopRunSpecific + 462
	25  HIToolbox                           0x00007fff31bcbabd RunCurrentEventLoopInMode + 292
	26  HIToolbox                           0x00007fff31bcb7d5 ReceiveNextEventCommon + 584
	27  HIToolbox                           0x00007fff31bcb579 _BlockUntilNextEventMatchingListInModeWithFilter + 64
	28  AppKit                              0x00007fff30211039 _DPSNextEvent + 883
	29  AppKit                              0x00007fff3020f880 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
	30  AppKit                              0x00007fff3020158e -[NSApplication run] + 658
	31  AppKit                              0x00007fff301d3396 NSApplicationMain + 777
	32  payouts                             0x000000010656471d main + 13
	33  libdyld.dylib                       0x00007fff6d010cc9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Lost connection to device.

Version info

[✓] Flutter (Channel master, 1.26.0-2.0.pre.84, on Mac OS X 10.15.7 19H15 darwin-x64, locale en-US)
    • Flutter version 1.26.0-2.0.pre.84 at /Users/tvolkert/project/flutter/flutter
    • Framework revision e2a0d03b79 (1 day ago), 2020-12-11 08:23:14 -0800 2020-12-17 19:25:28 -0800
    • Engine revision fd6b409f95
    • Dart version 2.12.0 (build 2.12.0-157.0.dev)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Critical issues such as a build break or regressiona: desktopRunning on desktopc: crashStack traces logged to the consoleengineflutter/engine related. See also e: labels.platform-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