OpenGL buffer creation error on MacBook Pro

Bug #1822223 reported by Jan Brittenson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Expired
Medium
Unassigned

Bug Description

This is on a 2016 MacBook Pro running Mojave (10.14.3 (18D42)). KiCad 5.1.0, as released.

I keep my MacBook Pro's internal display's resolution at 1920x1200 although the retina will do almost twice this, mainly because it's still readable to me.

If I plug in an external display I get an OpenGL error (unable to allocate buffer) if its set resolution exceeds the internal display's scaled resolution in either X or Y. So 1920x1020 is fine on the external display (its aspect ratio doesn't support 1920x1200), but anything higher and either eeschema or newpcb will fail to allocate an OpenGL buffer and _sometimes_ falls back on software rendering. Sometimes all of KiCad simply appears to exit. If I set the internal retina display to 3360x2100, then I can use the external display at the same. (or slightly less on the height due to the different aspect ratio.) The external display is a 4K monitor.

Other OpenGL software works fine, including Fusion 360 and Ultimaker Cura. But they may possibly use different Apple frameworks for rendering (I have no familiarity with any of this).

Either way, it looks like during OpenGL initialization it uses the wrong display to create the buffer.

Not sure what to attach or what else to provide, it's pretty straightforward to reproduce. (I'm not at a suitable external display right now, unfortunately, so can't copy the exact error message.)

I use Display Manager to manage the scaled display resolutions.

Tags: gal macos
Revision history for this message
Jan Brittenson (bson) wrote :

Where I wrote "If I plug in an external display I get an OpenGL error " I meant "If I plug in an external display and run KiCad and launch either eeschema or newpcb I get an OpenGL error "

Revision history for this message
Jan Brittenson (bson) wrote :

Oh, and I meant "Display Menu", not "Display Manager"... apologies.
https://itunes.apple.com/us/app/display-menu/id549083868?mt=12

Revision history for this message
Michael Kavanagh (michaelkavanagh) wrote :

Could you please copy the full version info from the KiCad app menu -> About KiCad -> Copy Version Info

tags: added: gal macos
Revision history for this message
Jan Brittenson (bson) wrote :

Application: kicad
Version: (5.1.0-0), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.6.4 zlib/1.2.11 nghttp2/1.24.1
Platform: Mac OS X (Darwin 18.2.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (UTF-8,STL containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=ON
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Revision history for this message
Tomasz Wlostowski (twlostow) wrote :

What are your antialiasing settings? Does disabling antialiasing help?

Tom

Revision history for this message
Jan Brittenson (bson) wrote :

It does! I normally have it set to Supersampling (4x) since that works best on a scaled retina display. If I set it to No Antialiasing it works fine on the external display. In fact, it works on all settings other than 4x supersampling. So it looks specific to that AA setting.

Revision history for this message
Tomasz Wlostowski (twlostow) wrote :

Your computer doesn't have enough video memory to handle two high-DPI screens with 4x AA. 4x supersampling AA mode just renders the image in 4x larger resolution and then scales it down - so for a 3360x2100 display, the actual buffer size is 13340x8400x3 ~~ 300 MB. Kicad needs more than one such buffer to work.

BTW, even with AA off the schematics look rather smooth on my Macbook with retina (set in native resolution, without scaling) and with 2xAA they look almost perfect.

Tom

Revision history for this message
Jan Brittenson (bson) wrote :

The ATI Radeon Pro 460 in the laptop has 4G VRAM, so no problem with a 300M buffer. And it's tied to the scaled resolution on the internal display; if memory were a problem increasing the internal resolution would decrease the buffer memory available.

Revision history for this message
Tomasz Wlostowski (twlostow) wrote :

You're right, 4G VRAM should easily accommodate a 300 MB buffer. Did you check if your Macbook has dynamic graphics switching (low performance/memory Intel / high performance Radeon), like Nvidia Optimus on PCs?

Tom

Changed in kicad:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for KiCad because there has been no activity for 60 days.]

Changed in kicad:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.