-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#34072Closed
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: desktopRunning on desktopRunning on desktopc: fatal crashCrashes that terminate the processCrashes that terminate the processcustomer: todoplatform-macBuilding on or for macOS specificallyBuilding on or for macOS specifically
Description
There seems to be a bug in cocoa where [NSViewController viewWillAppear] gets called twice. This can happen in situation where there are multiple windows, one of them minimized.
When calling [NSWindow makeKeyAndOrderFront:] on the minimized window multiple times the viewWilAppear: handler gets called twice, despite window being already visible.
Here are both stacktraces:
makeKeyAndOrderFronton minimized window, quickly after the first one.
-[FlutterViewController viewWillAppear] (/Users/Matej/Projects/flutter/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm:394)
-[NSViewController _sendViewWillAppear] (@-[NSViewController _sendViewWillAppear]:14)
-[NSViewController _windowWillOrderOnScreen] (@-[NSViewController _windowWillOrderOnScreen]:33)
-[NSView _windowWillOrderOnScreen] (@-[NSView _windowWillOrderOnScreen]:21)
-[NSView _windowWillOrderOnScreen] (@-[NSView _windowWillOrderOnScreen]:55)
-[NSView _windowWillOrderOnScreen] (@-[NSView _windowWillOrderOnScreen]:55)
-[NSWindow(NSWindow_Theme) _prepareToUnMinimizeFromDock:forceActivation:wantsToBeKey:] (@-[NSWindow(NSWindow_Theme) _prepareToUnMinimizeFromDock:forceActivation:wantsToBeKey:]:34)
-[NSWindow(NSWindow_Theme) _prepareToRestoreFromDock:forceActivation:wantsToBeKey:] (@-[NSWindow(NSWindow_Theme) _prepareToRestoreFromDock:forceActivation:wantsToBeKey:]:38)
-[NSWindow(NSWindow_Theme) _doRestoreComingFromDock:forceActivation:wantsToBeKey:] (@-[NSWindow(NSWindow_Theme) _doRestoreComingFromDock:forceActivation:wantsToBeKey:]:10)
-[NSWindow _reallyDoOrderWindowAboveOrBelow:relativeTo:findKey:forCounter:force:isModal:] (@-[NSWindow _reallyDoOrderWindowAboveOrBelow:relativeTo:findKey:forCounter:force:isModal:]:107)
-[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] (@-[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:]:40)
-[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] (@-[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:]:76)
-[NSWindow orderWindow:relativeTo:] (@-[NSWindow orderWindow:relativeTo:]:47)
-[NSWindow makeKeyAndOrderFront:] (@-[NSWindow makeKeyAndOrderFront:]:19)
- next call to
makeKeyAndOrderFront
-[FlutterViewController viewWillAppear] (/Users/Matej/Projects/flutter/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm:394)
-[NSViewController _sendViewWillAppear] (@-[NSViewController _sendViewWillAppear]:14)
-[NSViewController _windowDidOrderOnScreen] (@-[NSViewController _windowDidOrderOnScreen]:33)
-[NSView _windowDidOrderOnScreen] (@-[NSView _windowDidOrderOnScreen]:21)
-[NSView _windowDidOrderOnScreen] (@-[NSView _windowDidOrderOnScreen]:55)
-[NSView _windowDidOrderOnScreen] (@-[NSView _windowDidOrderOnScreen]:55)
-[NSWindow _reallyDoOrderWindowAboveOrBelow:relativeTo:findKey:forCounter:force:isModal:] (@-[NSWindow _reallyDoOrderWindowAboveOrBelow:relativeTo:findKey:forCounter:force:isModal:]:462)
-[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] (@-[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:]:40)
-[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] (@-[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:]:76)
-[NSWindow orderWindow:relativeTo:] (@-[NSWindow orderWindow:relativeTo:]:47)
-[NSWindow makeKeyAndOrderFront:] (@-[NSWindow makeKeyAndOrderFront:]:19)
While this may be a bug in cocoa, it seems like this needs to be handled properly and not crash.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: desktopRunning on desktopRunning on desktopc: fatal crashCrashes that terminate the processCrashes that terminate the processcustomer: todoplatform-macBuilding on or for macOS specificallyBuilding on or for macOS specifically