Page MenuHomeSchine - Phabricator

Starmade | Does not correctly detect frame buffer capabilities
Closed, FinishedPublic

Description

Just learned about the TAB+F3 trick to enable frame buffer support (see improvements illustrated in attached screenshots). Performance improved, system also didn't get so hot while running game. Was able to run game for ~8 hours without issue.

Then I relogged...sad times.

Error at startup (also note typos in error message; first word is missing an "e" & additional uses of same word are spelled correctly but with lowercase "b"):
FramBuffers are not supported on this Graphics Card. Framebuffers are used for effects like bloom. Continue without Framebuffers.

Intel Iris GPU: Late 2013 13” Retina MacBook Pro w/ 2.8Ghz i7, 16GB RAM, 1.5GB shared to GPU.

Details

Commits
Restricted Diffusion Commit
Restricted Diffusion Commit
Restricted Diffusion Commit
Task Type
Bug
Testing Results
Affected Gamemode(s)
Single and Multi
Reproducible
uncertain
Category
Engine
Hardware/Software/System
OS-Specific
OSX Only
Hardware-Specific
No
Video Card Vendor
uncertain
Steps to reproduce
  1. Enable frame buffer support via TAB+F3 (no menu item for this)
  2. relog, get error, be sad.
  3. Enable frame buffer support again, be happy.
Tester information (Internal use only)

even though the framebuffers can be activated while in game, at startup the capability is not recognized.
as i do understand it you couldnt change the drivers on the MacOS
could also be that it only affects Intel iGPU solutions.

clue to that might be in here

This hints at a likely cause:
http://stackoverflow.com/questions/19658745/why-is-my-opengl-version-always-2-1-on-mac-os-x

A little more info in this answer:
http://stackoverflow.com/questions/32958071/why-does-my-mac-only-support-opengl-2-1

Detected video (Graphicsinfo.txt)

Running on thread: main
Adapter: null
Driver Version: null
Vendor: Intel Inc.
OpenGL Version: 2.1 INTEL-10.14.58
Renderer: Intel Iris OpenGL Engine
GLSL Ver: 1.20

Serverconfig (server.cfg)
<replace this line with the file content>
Clientconfig (settings.cfg)
<replace this line with the file content>
Java Version (64bit)

java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)

(bundled java not usable, see T1467)

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Restricted Application added a project: Issue Navigation. · View Herald TranscriptMay 22 2016, 2:57 PM

This error occurs only during relog. Once logged-in, TAB+F3 again significantly improves rendering, without causing any apparent issues/crashes.

erthparadine updated the task description. (Show Details)May 22 2016, 4:33 PM
erthparadine edited Java Version (64bit). (Show Details)
AndyP added a subscriber: AndyP.May 23 2016, 3:54 PM

Looks like this is sort of a known issue with intel drivers under OSX.

They seem to deny framebuffers but do for some reason accept if you enable them ignoring the "hardware features" the driver replies.
However, ignoring a hardware limitation is not a good ideaby default, and there should be some reason for the driver to not enable them.

Not sure how to resolve this, without the risk of someone not being able to reach the menu ever again, because he enabled framebuffers on a video card that cannot enable it.

erthparadine added a comment.EditedMay 23 2016, 8:37 PM

Notice the version reported in graphicsinfo.txt (2.1) doesn't match what Apple says my hardware is capable of (4.1):
https://support.apple.com/en-us/HT202823

Nifty chart:
https://developer.apple.com/opengl/capabilities/

This hints at a likely cause:
http://stackoverflow.com/questions/19658745/why-is-my-opengl-version-always-2-1-on-mac-os-x

A little more info in this answer:
http://stackoverflow.com/questions/32958071/why-does-my-mac-only-support-opengl-2-1

SmilingDemon shifted this object from the S1 Public space to the S3 Starmade space.May 24 2016, 4:29 PM
SmilingDemon changed the visibility from "Custom Policy" to "Public (No Login Required)".
SmilingDemon changed the edit policy from "Task Author" to "Starmade (Project)".
SmilingDemon changed Affected Gamemode(s) from none/unspecified to Single and Multi.
SmilingDemon changed Category from none/unspecified to Engine.
SmilingDemon changed OS-Specific from No to OSX Only.
SmilingDemon triaged this task as High priority.
SmilingDemon edited Tester information (Internal use only). (Show Details)May 24 2016, 4:33 PM
SmilingDemon edited Tester information (Internal use only). (Show Details)May 24 2016, 4:43 PM
SmilingDemon changed the task status from Open to In Queue (Game).May 24 2016, 4:46 PM

-validate-
-confirmed-

Restricted Application edited projects, added Starmade, Game Development; removed Issue Navigation. · View Herald TranscriptMay 24 2016, 4:46 PM

After that recent slack discussion, I found this, seems to address the issue of GL2.1 vs GL3.2/GL4.1 support, and how to enable the appropriate OpenGL support on OSX: http://stackoverflow.com/questions/26807573/lwjgl-wont-give-me-an-opengl-context-that-supports-4-1

Quoting/paraphrasing the above link: it's not that a Mac's OS/driver/hardware combination lacks GL4.1 support, but the real problem is a silly decision Apple made when implementing core profiles. The necessary LWJGL call to generate an OpenGL 4.1 context is
Display.create(new PixelFormat(), new ContextAttribs(3, 2).withForwardCompatible(true).withProfileCore(true));

Note: it must be ContextAttribs(3, 2), not (4, 1), see link for more info.

Also note the “Platform Issue (MacOSX)” portion at https://www.opengl.org/wiki/Core_And_Compatibility_in_Contexts

33Cav added a subscriber: 33Cav.Aug 13 2016, 3:39 AM

With Windows 8.1 and the new AMD Radeon graphics drivers (Crimson) on my laptop which also has an integrated Intel HD family card the game gives me an exception relating to OpenGL when framebuffer is enabled. I had to remove all my AMD drivers and reinstall the last release of CCC to get it working again. Note that after 5-10 minutes in game without framebuffer enabled my draw-time for frames shoots up to 500ms.

AndyP changed the task status from In Queue (Game) to In Queue.Mar 10 2017, 5:05 PM
Restricted Application added a project: Engine. · View Herald TranscriptMar 10 2017, 5:05 PM
AndyP moved this task from Backlog / Unclassed to Rendering on the Engine board.Mar 16 2017, 2:14 PM
AndyP edited projects, added Engine (Rendering); removed Engine.
schema added a subscriber: schema.Mar 21 2017, 5:43 AM
schema changed the task status from In Queue to wontfix.

If the driver reports to the game that it doesn't support it but still support it, it is a driver issue which can't really be fixed ingame. Trying to turn on framebuffer as a check would have bad consequences on graphics cards that dont support it.

Restricted Application removed a subscriber: AndyP. · View Herald TranscriptMar 21 2017, 5:43 AM

The problem is that the driver DOES support it, STARMADE IS MAKING THE WRONG API CALLS and therefore not detecting relevant support. Please see my extensive commentary this topic in-ticket. Since performance is so abysmal on macOS without framebuffer support, should we assume the wrontfix is an indication of plans to drop macOS support?

schema added a comment.EditedMar 21 2017, 2:10 PM

calm down. we are definitely not dropping macOS support. No reason to get angry. I misunderstood the comment above

The thing was that i used a check for capabilities beforehand. I'll try to create a context that way if macOS is used. Hopefully that wont affect other users

schema changed the task status from wontfix to In Queue.Mar 21 2017, 2:21 PM
schema added a commit: Restricted Diffusion Commit.Mar 21 2017, 2:22 PM
schema changed the task status from In Queue to Resolved by committing Restricted Diffusion Commit.
Restricted Application added a project: Quality Assurance. · View Herald TranscriptMar 21 2017, 2:22 PM

you should see

[DISPLAY] Creating MAC OS context for OpenGL 4.1 if possible

in the logs

version 0.199.489 or higher

schema added a commit: Restricted Diffusion Commit.Mar 21 2017, 3:22 PM
erthparadine added a comment.EditedMar 21 2017, 3:31 PM

While the "Creating MAC OS context for OpenGL 4.1 if possible" entry does appear, the game crashes on launch.

Obviously, I can't see your code, I'm going to take a few guesses here:

  • The API call cannot be for 4,1, but instead must be 3,2. As they use a constant kCGLOGLPVersion_3_2_Core to mean any core profile. That constant really should not include a version number, but unfortunately it does...additional discussion in comments at http://stackoverflow.com/questions/26807573/lwjgl-wont-give-me-an-opengl-context-that-supports-4-1
  • You also need to add both "forward_compat" and "core_profile" hints before create window...as macOS only supports forward-compatible core profiles
[2017-03-21 08:18:18] [VERSION] loading version from install dir: ./
[2017-03-21 08:18:18] [VERSION] VERSION: 0.199.489
[2017-03-21 08:18:18] [VERSION] BUILD: 20170321_152410
[2017-03-21 08:18:18] #################### StarMade #######################
[2017-03-21 08:18:18] # version 0.199.489 - build 20170321_152410 #
[2017-03-21 08:18:18] #####################################################
[2017-03-21 08:18:18] [SERIAL] "not retrieved"
[2017-03-21 08:18:18] [INSTALLATION_DIRECTORY] "/Users/greggberkholtz/Library/Application Support/StarMade/."
[2017-03-21 08:18:18] [JVM-ARGUMENTS] [-Djava.net.preferIPv4Stack=true, -Xmn128M, -Xms512M, -Xmx8192M, -Xincgc]
[2017-03-21 08:18:18] [TEXTURE-PACK] WARNING: ignoring lava.png: not a directory
[2017-03-21 08:18:18] [TEXTURE-PACK] WARNING: ignoring lava.png.zip: not a directory
[2017-03-21 08:18:18] [TEXTURE-PACK] WARNING: ignoring shield_tex.png: not a directory
[2017-03-21 08:18:18] [TEXTURE-PACK] WARNING: ignoring shield_tex.png.zip: not a directory
[2017-03-21 08:18:19] [TEXTURE-PACK] WARNING: ignoring lava.png: not a directory
[2017-03-21 08:18:19] [TEXTURE-PACK] WARNING: ignoring lava.png.zip: not a directory
[2017-03-21 08:18:19] [TEXTURE-PACK] WARNING: ignoring shield_tex.png: not a directory
[2017-03-21 08:18:19] [TEXTURE-PACK] WARNING: ignoring shield_tex.png.zip: not a directory
[2017-03-21 08:18:19] [SERVER] using world: TheCapsWorld; ./server-database/thecapsworld/
[2017-03-21 08:18:19] [INIT] Segment Database Path: /Users/greggberkholtz/Library/Application Support/StarMade/./server-database/thecapsworld/DATA; exists? true; is Dir? true; creating dir sucessfull (gives false if exists)? false
[2017-03-21 08:18:19] [LIBLOADER] OS Mac OS X - 10.12.3
[2017-03-21 08:18:19] [LIBLOADER] JAVA Oracle Corporation - 1.7.0_80 - /Applications/starmade-launcher.app/Contents/MacOS/dep/java/jre1.7.0_80.jre/Contents/Home
[2017-03-21 08:18:19] [LIBLOADER] ARCHITECTURE x86_64
[2017-03-21 08:18:19] [LIBLOADER] LOADED MacOS NATIVE LIBRARIES 
[2017-03-21 08:18:19] [LIBLOADER] FastNoiseSIMD Level: 3
[2017-03-21 08:18:19] [LIBLOADER] COMPLETE 
[2017-03-21 08:18:19] [MAIN] CHECKING IF MIGRATION NECESSARY
[2017-03-21 08:18:19] [MAIN] MIGRATION PROCESS DONE
[2017-03-21 08:18:19] [MAIN] STARTING WITH ARGUMENTS: [-force, -port:4242, -auth 85958b78a53259d8ac8052c415db50d099a249791e3ea83de20428be679b4afc]
[2017-03-21 08:18:19] [LANGUAGE] loading language: english; Resolved to english
[2017-03-21 08:18:20] [LANGUAGE] Loading English; Version: 0
[2017-03-21 08:18:20] [LANGUAGE] LOADED FONT PATH/NAME: font/Monda-Regular.ttf
[2017-03-21 08:18:23] [CLIENT][STARTUP] Starting main menu
[2017-03-21 08:18:24] [CLIENT][STARTUP] Starting Graphics
[2017-03-21 08:18:24] [CLIENT][STARTUP] Initialize Open GL
[2017-03-21 08:18:24] [CLIENT][GRAPHCIS] UPDATE DISPLAY MODE
[2017-03-21 08:18:24] [CLIENT][GRAPHCIS] RETRIEVING DEFAULT SCREEN DEVICE
[2017-03-21 08:18:24] [CLIENT][GRAPHCIS] display received
[2017-03-21 08:18:24] [GRAPHICS] set display mode: FULLSCREEN: false; dim: 1280 / 720
[2017-03-21 08:18:24] ARB_SUPPORTED COULD NOT BE RETRIEVED
[2017-03-21 08:18:24] [DISPLAY] Creating MAC OS context for OpenGL 4.1 if possible
[2017-03-21 08:18:24] [DISPLAY] Creating MAC OS successfull
[2017-03-21 08:18:24] [DISPLAY] ViewPort for Resolution: 1280x720: 1280, 720
[2017-03-21 08:18:24] [CLIENT][GRAPHCIS] CHECKING CAPABILITIES
[2017-03-21 08:18:24] FILE CREATED: true
[2017-03-21 08:18:24] [CLIENT][GRAPHCIS] CREATING STACKS
[2017-03-21 08:18:24] [GLFrame] Open-GL initialized
[2017-03-21 08:18:24] Running on thread: main
Adapter: null
Driver Version: null
Vendor: Intel Inc.
OpenGL Version: 4.1 INTEL-10.22.29
Renderer: Intel Iris OpenGL Engine

[2017-03-21 08:18:24] [CLIENT][STARTUP] Initialize Open GL Done
[2017-03-21 08:18:24] [INIT] Creating Loading Screen
[2017-03-21 08:18:24] [INIT] Creating Loading Message
[2017-03-21 08:18:24] [FONT] FONT PATH TO LOAD: font/Monda-Regular.ttf; false; true
[2017-03-21 08:18:24] [FONT] created from font file: /Users/greggberkholtz/Library/Application Support/StarMade/data/font/Monda-Regular.ttf
[2017-03-21 08:18:25] java.lang.IllegalStateException: Function is not supported
[2017-03-21 08:18:25] 	at org.lwjgl.BufferChecks.checkFunctionAddress(BufferChecks.java:58)
[2017-03-21 08:18:25] 	at org.lwjgl.opengl.GL11.glColor4f(GL11.java:893)
[2017-03-21 08:18:25] 	at org.newdawn.slick.opengl.renderer.ImmediateModeOGLRenderer.glColor4f(ImmediateModeOGLRenderer.java:124)
[2017-03-21 08:18:25] 	at org.newdawn.slick.Color.bind(Color.java:182)
[2017-03-21 08:18:25] 	at org.newdawn.slick.font.GlyphPage.loadGlyphs(GlyphPage.java:141)
[2017-03-21 08:18:25] 	at org.newdawn.slick.UnicodeFont.loadGlyphs(UnicodeFont.java:378)
[2017-03-21 08:18:25] 	at org.newdawn.slick.UnicodeFont.loadGlyphs(UnicodeFont.java:327)
[2017-03-21 08:18:25] 	at obfuscated.aHn.a(SourceFile:207)
[2017-03-21 08:18:25] 	at obfuscated.aHn.a(SourceFile:163)
[2017-03-21 08:18:25] 	at obfuscated.aHn.e(SourceFile:237)
[2017-03-21 08:18:25] 	at obfuscated.nD.<init>(SourceFile:45)
[2017-03-21 08:18:25] 	at obfuscated.U.e(SourceFile:1106)
[2017-03-21 08:18:25] 	at org.schema.game.common.Starter.startMainMenu(SourceFile:1455)
[2017-03-21 08:18:25] 	at org.schema.game.common.Starter.main(SourceFile:1000)
lancake changed the task status from Resolved to In Queue.Mar 21 2017, 3:40 PM
Restricted Application removed a project: Quality Assurance. · View Herald TranscriptMar 21 2017, 3:40 PM

yes I read the stackoverlow thread and I used
Display.create(new PixelFormat(), new ContextAttribs(3, 2).withForwardCompatible(true).withProfileCore(true));

The problem might in this case be that it was successful and puts the context to 4.1, which removes some older functions from core. Since starmade is using a lot of fallbacks for older graphics cards, and in this case a library that uses a removed function, the game crashes. We will have to look for some way to set the context to support those functions

schema changed the task status from In Queue to Resolved.Mar 21 2017, 3:53 PM

I'm trying to get it to work by using new ContextAttribs(3, 2).withForwardCompatible(true).withProfileCompatibility(true)

Restricted Application added a project: Quality Assurance. · View Herald TranscriptMar 21 2017, 3:53 PM
AndyP removed a commit: Restricted Diffusion Commit.Mar 21 2017, 4:18 PM

Still crashes on launch, same error as reported earlier, see T2317

lancake changed the task status from Resolved to In Queue.Apr 1 2017, 9:53 AM
Restricted Application edited projects, added QA-Return; removed Quality Assurance. · View Herald TranscriptApr 1 2017, 9:53 AM

https://www.khronos.org/opengl/wiki/Core_And_Compatibility_in_Contexts

Unfortunately MacOS did not provide backwards compatibility from core 3.2. That means that it's impossible to request a context without forward compatibility, which removes fixed function pipeline. This is used by the current text rendering library, and in a few other places, since I always went with backwards compatibility over using the latest openGL without a fallback.

I will have to switch back the context to 2.1 for mac however I can possibly work in a work around for 3.0 compatibility (since you were saying that it works even though a 2.1 context was created).
I will just try to create a 3.2 context, and if that succeeds I set a flag that 3.2 is indeed supported. After that I'll destroy the context and initialize as normal without throwing errors for frame buffer use.

schema added a commit: Restricted Diffusion Commit.Apr 3 2017, 12:08 PM
schema changed the task status from In Queue to Resolved by committing Restricted Diffusion Commit.
Restricted Application edited projects, added Quality Assurance; removed QA-Return. · View Herald TranscriptApr 3 2017, 12:08 PM

Unsure how much it affects FB init w/ macOS...but in older releases, forcing FB on w/ the hotkey caused no crash-related issues that I experienced, and dramatically improved performance.

Well, it doesn't immediately crash at this point, until running into T1525 of-course.

However, the loader screen is broken, the sky is full of black specks, in-game blocks are either black, a solid color, or mostly-transparent, the mouse can no longer look around the screen...but hey, I'm getting over 100FPS now!

I totally get how software development can be taxing at times, I've done it for two decades myself. However, with over 200,000 SM sales on Steam alone...is it really too much to expect that devs have ready access to the most elemental of the three main platforms SM is supposed to run on? At this point, SM hasn't been able to launch w/ a vanilla config on macOS for over a year...but macOS is a "supported" platform...really...supported? Really? This is support? No wonder macOS users are so rare.

It gets old, fast, when you're hysterically laughed while trying to explain that SM runs on macOS, only after you do this, and adjust this, and twist this knob too, and...*crash*...oops, adjust this too...

Also, T2315 is a dupe: same error, same spot.

lancake changed the task status from Resolved to In Queue.Apr 10 2017, 11:11 AM
Restricted Application edited projects, added QA-Return; removed Quality Assurance. · View Herald TranscriptApr 10 2017, 11:11 AM
schema added a comment.EditedApr 10 2017, 12:34 PM

I'm sorry, I'm trying to get a mac here to fix the issue.

I'll do my best to get it fixed. OS X isn't making it exactly easy with their implementation of opengl.

FYI the issue I raised is a duplicate of this one and can be merged/closed:
https://phab.starma.de/T2299

got my hands on a mac and am close to fixing this

schema added a commit: Restricted Diffusion Commit.Apr 11 2017, 10:30 AM
schema changed the task status from In Queue to Resolved by committing Restricted Diffusion Commit.
Restricted Application edited projects, added Quality Assurance; removed QA-Return. · View Herald TranscriptApr 11 2017, 10:30 AM
schema added a comment.EditedApr 11 2017, 12:24 PM

Tested this on a 2014 macbook air. Had the same error before fixing it. Should be good now and can even use integer shader support for more speed.

First: thank you greatly for giving this attention.

On the topic: just did a VERY quick "does it launch" test, and I can no longer replicate the earlier issues. Loader screen looks normal, no sky of black specs, and no more solid-colored (black/opaque) blocks. FPS also still easily sits nicely in the 50-70 range (Late 2014 MacMini w/ 16GB, 2.8Ghz i5 CPU, 1.5GB Intel Iris GPU). A quick run through major menus and the tab wheel, all seem to also behave OK.

[2017-04-11 10:27:25] [VERSION] VERSION: 0.199.514
[2017-04-11 10:27:25] [VERSION] BUILD: 20170411_170659
[2017-04-11 10:27:25] #################### StarMade #######################
[2017-04-11 10:27:25] # version 0.199.514 - build 20170411_170659 #

That's great news! I'll leave it on resolved for a while in case some special case pops up.

lancake closed this task as Closed.Apr 28 2017, 1:24 PM
Restricted Application removed a project: Quality Assurance. · View Herald TranscriptApr 28 2017, 1:24 PM
Restricted Application removed a subscriber: AndyP. · View Herald Transcript