When you unplug the external screen attached to a closed MacBookPro, all running Qt applications are crashing.
- This issue is reproducible with Qt 5.13.1 on macOS 10.15.1
Steps to reproduce
- Attach an external display to a MacBook Pro. I used a Thunderbolt Dock and Display Port to connect the external display.
- Close the MacBook Pro
- Launch any Qt application on the external screen. For example Qt Creator or Linguist.app.
- Unplug the Thunderbold cable of the external display
- Open the lid after having unplugged the cable and with the cable still unplugged
Result: All running Qt applications (for example Qt Creator or Linguist.app) have crashed
The crash occurs in windowWillUseStandardFrame:defaultFrame: in qnswindowdelegate.mm.
As you can see in this code, there is no check for NULL pointer for platformWindow->screen() which is I think causing the crash:
Tested the steps to reproduce with similar equipment. Could not reproduce the issue. We suspect that some setting or other unknown is causing this.