Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12.3
-
None
Description
In a larger project (where the bug can be reproduced), I have after several hours not been able to detect the missing piece in the attached example (that may not fail - where it in the larger project fails first time and always)
The failing assert is in qcocoawindow.mm
QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel) { .. Q_ASSERT_X(nsWindow.screen == cocoaScreen->nativeScreen(), "QCocoaWindow", "Resulting NSScreen should match the requested NSScreen");
A part of the reason is that topleft is outside any screen (after restoreGeometry). The main-window is placed on the secondary screen where restore also should take place.
(I do wonder why only top left is checked - wouldn't it be an idea to search for most overlapping screen in case top left doesn't match anything?)
Again, I cannot explain the difference the example code and the larger project code, but the main variables frame, stylemask, flags seem to be set similar and the system is the same.
When running in release mode the dialog shows up, so maybe a warning could also be sufficient rather than crashing the application on debug.