Sublime Forum

Build 3200 Crashing on MacOS (Assertion failure in NSCGLSurface flushRect)

#5

Hmm, I wonder if the OpenGL driver for the DisplayLink has an issue.

As @kingkeith noted, we only use OpenGL if at least one of the displays is above a certain resolution and gpu_window_buffer is "auto" or true.

3 Likes

#6

Confirmed, setting “gpu_window_buffer” to “false” fixed the issue. Thank you @kingkeith and @wbond

1 Like

#7

I can confirm I had the same issue with a display link dock with a couple 2560x1440 displays. Disabling the gpu_window_buffer resolved it. Any thoughts on a fix so we can use the gpu again? Let me know if you need any further info.

0 Likes

#8

Thanks for the help all. Adding "gpu_window_buffer": "false" to my user preferences is an effective workaround.

0 Likes

#9

Of note - I’ve ordered a DisplayLink adapter to use to try and debug this. It’ll be a couple of days until it arrives, and after that I’ll have to see if it is a bug in our end or in the driver.

0 Likes

#10

Thanks @wbond It certainly wouldn’t surprise me if it was the driver. I’ve had all manner of problems with the dock. It’s behaving relatively well now but for a long time after I upgraded to Mojave it didn’t work at all.

0 Likes

#11

2019-03-29 14:49:32.278 Sublime Text[26359:5137433] *** Assertion failure in -[NSCGLSurface flushRect:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1671.40.119/OpenGL.subproj/NSCGLSurface.m:569

Adding a user preference file and adding that option didn’t do the trick for me.
However, Sublime does open if I disconnect the external monitors (even without the pref file, obviously).
In case I did something wrong:

  • added Preferences.sublime-settings into /Users/csc017/Library/Application Support/Sublime Text 3/Packages/User
  • wrote "gpu_window_buffer": false into it. Also tried "gpu_window_buffer": "false".
  • application still doesn’t launch :frowning:
0 Likes

#12

Well, we definitely don’t utilize NSCGLSurface if gpu_window_buffer is false.

The contents of your preferences file should look like the following, assuming no other settings:

{
    "gpu_window_buffer": false,
}

The file path in your case would be:

/Users/csc017/Library/Application Support/Sublime Text 3/Packages/User/Preferences.sublime-settings

From your comment, it sounds like you’ve done this, I just wanted to make sure the Preferences JSON formatting was correct.

1 Like

Using Sublime Text/Merge often crashes my MacBook while using an EGPU
#13

Hmm, apparently, I had missed a weird invisible character next to the first ‘{’, which rendered the Json invalid.

Sublime does start now. Thank you for your support.

0 Likes

#14

Build 3204 now automatically detects if a DisplayLink adapter is plugged in and will disable using the GPU window buffer, without the user having to change any settings.

2 Likes

#15

As described in this thread, it seems that a similar issue exists when using Sublime Text in combination with an eGPU.
Setting the gpu_window_buffer option manually to false solved the problem for now. :wink:

1 Like

#16

Even with that preference manually set, I can’t seem to do much without Sublime crashing on me.

0 Likes

#17

I also have a similar issue with a Blackmagic eGPU, Sublime Text build 3207, and Mojave 10.14.4. When a Sublime Text window is on a display being run through the eGPU, just clicking on a tab would crash Sublime Text. Windows on the MacBook Pro display (integrated GPU) work fine.

Setting gpu_window_buffer to false seems to stop the crashing.

0 Likes

#18

I am running Sublime version 3.2.1 build 3207 on Mojave 10.14.4 - and it just started crashing on me today. Pretty disruptive. I could try monkeying with the settings if it keeps recurring but do we expect a fix to be forthcoming?

0 Likes

#19

Well, Apple is in control of when 10.14.5 comes out. Until then you can change the setting, or wait for our next dev build which will automatically set the setting to disable all usage of NSOpenGLView for 10.14.4.

1 Like

#20

Ah great, thanks - I was thinking it was more of a Sublime issue but I see your point. At least it forced me to rethink my open project files and reorganized them a bit so I don’t get lost :wink:

1 Like

#21

I have only this in my user preferences/settings now… i still get the spinning beachball of death sometimes and have to force-quit. Is this correct, what I put in, or is there something else needed?

0 Likes

#22

This sounds like an unrelated issue, perhaps with a plugin. I would recommend creating a new topic in the forum, or create an issue on the issue tracker.

0 Likes

#23

Ya ok – I’ll capture the log when it happens again. I don’t have it running now as it has become disruptive to my workflow and unreliable since the 3200 build. I may have to shut off auto-updates going forward once this is resolved…

0 Likes

#24

The best way to mitigate crashes like this is to report them as soon as you see them with as many details as possible. Obviously something like Apple releasing a bugging build of macOS is out of our control, but since that doesn’t seem to be the issue in your case, more details about your setup would be most helpful.

This is the best place to report crashes: https://github.com/SublimeTextIssues/Core/issues.

0 Likes