Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window with customButtonsOnHover crashes when entering fullscreen #15704

Closed
zcbenz opened this issue Nov 14, 2018 · 4 comments
Closed

Window with customButtonsOnHover crashes when entering fullscreen #15704

zcbenz opened this issue Nov 14, 2018 · 4 comments
Assignees
Labels

Comments

@zcbenz
Copy link
Member

zcbenz commented Nov 14, 2018

  • Operating System (Platform and Version): macOS >= 10.10
  • Last known working Electron version (if applicable): 3.x

Electron crashes when entering fullscreen if customButtonsOnHover is used.

This started to happen after Chrome 69 upgrade, and I can confirm this is caused by the NSWindowStyleMaskFullSizeContentView window style.

I doubt it is related to changes in new macOS SDK, and I'm still looking into it.

Can be reproduced with following app:

const {BrowserWindow} = require("electron")
let mainWindow
app.on('ready', function () {
  mainWindow = new BrowserWindow({
    frame: false,
    titleBarStyle: 'customButtonsOnHover'
  })
  mainWindow.setFullScreen(true)
})

Stack trace:


Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [0]

Application Specific Information:
Crashing on exception: titlebarAccessoryViewControllers not supported for this window style

Application Specific Backtrace 1:
0   CoreFoundation                      0x00007fff290d12db __exceptionPreprocess + 171
1   libobjc.A.dylib                     0x00007fff50278c76 objc_exception_throw + 48
2   CoreFoundation                      0x00007fff290d7072 +[NSException raise:format:arguments:] + 98
3   Foundation                          0x00007fff2b200340 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
4   AppKit                              0x00007fff267f27e6 -[NSWindow titlebarAccessoryViewControllers] + 191
5   AppKit                              0x00007fff26b59a98 -[_NSFullScreenDetachedToolbarMenuBarCompanionController _originalWindowShouldAutomaticallyAutohide] + 116
6   AppKit                              0x00007fff26b59bbd -[_NSFullScreenDetachedToolbarMenuBarCompanionController setContentController:] + 217
7   AppKit                              0x00007fff269ea1ce -[_NSWindowFullScreenContentController makeDetachedMenuBarCompanionController] + 96
8   AppKit                              0x00007fff27161244 -[NSWindow(NSFullScreen) _fullScreenStatusChanged] + 84
9   AppKit                              0x00007fff267ec376 __25-[NSWindow setStyleMask:]_block_invoke + 1977
10  AppKit                              0x00007fff2670bc0c NSPerformVisuallyAtomicChange + 146
11  AppKit                              0x00007fff267ebb74 -[NSWindow setStyleMask:] + 191
12  AppKit                              0x00007fff26abea8a __82-[_NSWindowEnterFullScreenTransitionController setupWindowForAfterFullScreenEnter]_block_invoke + 123
13  AppKit                              0x00007fff2670bc0c NSPerformVisuallyAtomicChange + 146
14  AppKit                              0x00007fff26abea06 -[_NSWindowEnterFullScreenTransitionController setupWindowForAfterFullScreenEnter] + 168
15  AppKit                              0x00007fff26f904e9 -[_NSEnterFullScreenTransitionController start] + 393
16  AppKit                              0x00007fff26ac002e -[_NSWindowEnterFullScreenTransitionController start] + 369
17  Electron Framework                  0x0000000116479d12 -[AtomNSWindow toggleFullScreenMode:] + 98
@welcome
Copy link

welcome bot commented Nov 14, 2018

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@zcbenz
Copy link
Member Author

zcbenz commented Nov 15, 2018

I don't think we can fix this issue, it seems that macOS simply asserts that window with NSWindowStyleMaskFullSizeContentView style should not enter fullscreen mode.

Unsetting the style before entering fullscreen does not work around the assertion.

@electron-triage
Copy link

Thank you for taking the time to report this issue and helping to make Electron better.

The version of Electron you reported this on has been superseded by newer releases.

If you're still experiencing this issue in Electron 6.x.y or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.

I'm setting the blocked/need-info label for the above reasons. This issue will be closed 7 days from now if there is no response.

Thanks in advance! Your help is appreciated.

@electron-triage electron-triage added the blocked/need-info ❌ Cannot proceed without more information label Feb 19, 2020
@electron-triage
Copy link

Thank you for your issue!

We haven't gotten a response to our questions in our comment above. With only the information that is currently in the issue, we don't have enough information to take action. I'm going to close this but don't hesitate to reach out if you have or find the answers we need, we'll be happy to reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants