Skip to content

BrowserWindow 'title-bar-style': 'hidden-inset' option causes crash on OS X 10.9 #2790

Closed

Description

@sindresorhus

From: #2776 (comment)

const win = new BrowserWindow({
        'width': 800,
        'height': 600,
        'title-bar-style': 'hidden-inset'
});

This throws on OS X 10.9 with Electron 0.32.3.

image

Activity

  1. changed the title [-]BrowserWindow `title-bar-style': 'hidden-inset'` option causes crash on OS X 10.9[/-] [+]BrowserWindow 'title-bar-style': 'hidden-inset' option causes crash on OS X 10.9[/+] on Sep 15, 2015
  2. ssreekanth commented on Sep 15, 2015

    @ssreekanth

    I see the issue on OS X 10.10.5 too.

  3. jaanus commented on Sep 15, 2015

    @jaanus
    Contributor

    This is strange. I now reviewed and tested the Chromium implementation of IsOSYosemiteOrLater and it looks correct. It should guard against that method running. @sindresorhus and @ssreekanth what does uname -r (from command line) return on your Mavericks system?

  4. ssreekanth commented on Sep 15, 2015

    @ssreekanth

    I'm on Yosemite..

    $ uname -r
    14.5.0
    
  5. jaanus commented on Sep 16, 2015

    @jaanus
    Contributor

    @ssreekanth so what exactly do you see on your 10.10.5 Yosemite machine? These APIs should be available there.

  6. jaanus commented on Sep 16, 2015

    @jaanus
    Contributor

    About the comment made by @zcbenz …

    Can you create a new issue for this? I'm wondering if it is caused by me setting MACOSX_DEPLOYMENT_TARGET to 10.10.

    I’m now looking at vendor/brightray/vendor/download/libchromiumcontent/src/base/mac_util.h which says…

    // When the deployment target is set, the code produced cannot run on earlier
    // OS releases. That enables some of the IsOS* family to be implemented as
    // constant-value inline functions. The MAC_OS_X_VERSION_MIN_REQUIRED macro
    // contains the value of the deployment target.
    

    And the inlined function is…

    #if defined(MAC_OS_X_VERSION_10_10) && \
        MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
    #define BASE_MAC_MAC_UTIL_H_INLINED_GE_10_10
    inline bool IsOSYosemiteOrLater() { return true; }
    #endif
    

    I’m not sure how to set a deployment target for building this project to test this theory, but it appears that if this inlined function were to be used, it would produce incorrect results when code built on Yosemite is run on pre-Yosemite.

  7. vadimdemedes commented on Sep 16, 2015

    @vadimdemedes

    @jaanus Running uname -r on Mavericks returns: 13.4.0.

  8. sindresorhus commented on Sep 16, 2015

    @sindresorhus
    ContributorAuthor

    @jaanus I just published my app if you need a testcase.

  9. added a commit that references this issue on Sep 16, 2015
  10. added a commit that references this issue on May 9, 2017
    fa588f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions