[0.16.51] [MacOS] Crash in SystemUtil::vramSize()

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
TheBloke
Fast Inserter
Fast Inserter
Posts: 123
Joined: Mon Dec 03, 2018 2:48 am
Contact:

[0.16.51] [MacOS] Crash in SystemUtil::vramSize()

Post by TheBloke »

Hi all

I purchased Factorio on Steam today, and unfortunately I can't even open the game.

My system:
  • macOS 10.14.1
  • Hackintosh 'Mac Pro 5.1'
  • Intel Xeon X5670 6-core (Westmere; no integrated GPU.)
  • 48GB DDR3
  • AMD 7970 Ghz Edition (AKA R9 280X), 3GB. Metal capable.
  • 6 x monitors
When I open the game I briefly see a small game window, then I get a crash dialogue. I've tried multiple times, always with the same result.

Log file is attached. The core error appears to be '[OpenGL] glClear in ogl_clear:0: GL_INVALID_FRAMEBUFFER_OPERATION' with 'SystemUtil::vramSize() (in factorio) (SystemUtil.mm:45)' seemingly being relevant, especially as I note that the log doesn't mention VRAM being detected.

I searched the forum for this error and found this post, also on macOS. I see in his log that there should be a line giving the detected GPU VRAM size, at the point where mine instead crashes. His issue is different though, only affecting high-res sprites, where I can't even open the game.

I don't normally mention that I'm running a 'Hackintosh', ie a non-standard macOS install on non-Apple hardware, for fear that developer will immediately ignore any problems and refuse to provide support, despite the fact that normally all software runs just fine. But in this case it seems right to mention it, as I can't rule out that it's somehow a factor in an unusual GPU-related issue. I don't believe it is the problem, because this is the first time I've experienced any problem running GPU-related/OpenGL software (other games work, as do Adobe apps, OpenGL benchmarkers like GeekBench 4 and Guru3d GPUTest, and plenty of other programs.) But I thought it only fair to be upfront and mention it.

I have a second Hackintosh macOS system, and Factorio does load OK on that. Its specs are: macOS 10.14.1; Intel i5-3550; NVidia 760 2GB (using native macOS GPU drivers, not NVidia web drivers); two monitors. This system technically does have an integrated GPU, but it's not supported in macOS 10.14 so it's not being used. So again this is a system with only a discrete GPU, not an integrated one. Key differences seem to be different brand of GPU, different amount of VRAM, and number of connected monitors.

For now I suppose I will have to either run it on my second system, or else dual-boot into Windows to play. Both would be quite an inconvenience, so I would be very grateful if someone could investigate, especially as macOS support was a big factor in my deciding to purchase now.

Perhaps there's some workaround I can use? Like providing a config file which specifies the VRAM I have? I will start trying to investigate this myself.

At the least if someone could confirm that a similar hardware config has been tested (MacPro 2010/2011 with an AMD 7970/R9 280X or similar discrete GPU with 3GB VRAM). If it does seem it could be Hackintosh related I will definitely investigate that angle, but right now my experience of other GPU/OpenGL apps suggests it's unlikely to be that.

Thanks in advance. The game looks incredible - I can't wait to try it!

Here's an extract from the log for convenience, which I think covers the relevant parts:

Code: Select all

   0.008 System info: [CPU: Intel(R) Xeon(R) CPU           X5670  @ 2.93GHz, 12 cores, RAM: 49152 MB]
   0.018 Display options: [FullScreen: 0] [VSync: 1] [UIScale: system (100.0%)] [MultiSampling: OFF] [Screen: 255] [Lang: en]
   0.019 Available display adapters: 6
   0.019  [0]: resolution 3840x2160px at [0,0]
   0.019  [1]: resolution 1920x1080px at [-3840,-240]
   0.019  [2]: resolution 1920x1200px at [-1920,960]
   0.020  [3]: resolution 1920x1200px at [-1920,-240]
   0.020  [4]: resolution 1200x1920px at [5040,0]
   0.020  [5]: resolution 1200x1920px at [3840,0]
   0.020 Create display on adapter 0. Size 1280x720 at position [1270, 702].
   0.224 [OpenGL] glClear in ogl_clear:0: GL_INVALID_FRAMEBUFFER_OPERATION
   0.264 Initialised OpenGL:[0] AMD Radeon HD Tahiti XT Prototype OpenGL Engine; driver: 2.1 ATI-2.2.8
Factorio crashed. Generating symbolized stacktrace, please wait ...
#0  0x0000000100a24342 in Logger::logStacktrace(StackTraceInfo*) (in factorio) (Logger.cpp:521)
#1  0x0000000100a119ed in CrashHandler::writeStackTrace(CrashHandler::CrashReason) (in factorio) (CrashHandler.cpp:173)
#2  0x0000000100a129c4 in CrashHandler::commonSignalHandler(int) (in factorio) (CrashHandler.cpp:524)
#3  0x0000000100a11919 in CrashHandler::SignalHandler(int) (in factorio) (CrashHandler.cpp:537)
#4  0x00007fff65a5db3d in 0x00007fff65a5db3d
#5  0x0000000000000037 in 0x00000037 (in factorio)
#6  0x00007fff6591c1c9 in 0x00007fff6591c1c9
#7  0x00007fff62fa6231 in 0x00007fff62fa6231
#8  0x00007fff62fa63cd in 0x00007fff62fa63cd
#9  0x00007fff647af32f in 0x00007fff647af32f
#10 0x00007fff62fb1dfe in 0x00007fff62fb1dfe
#11 0x00007fff62fb1be2 in 0x00007fff62fb1be2
#12 0x00007fff62fa4bb9 in 0x00007fff62fa4bb9
#13 0x00007fff647ad03c in 0x00007fff647ad03c
#14 0x00007fff3872ec8d in 0x00007fff3872ec8d
#15 0x00007fff386525de in 0x00007fff386525de
#16 0x00007fff38651f98 in 0x00007fff38651f98
#17 0x00007fff385e3ff2 in 0x00007fff385e3ff2
#18 0x0000000100d148a6 in SystemUtil::vramSize() (in factorio) (SystemUtil.mm:45)
#19 0x00000001004114cb in Display::Display(short, short) (in factorio) (Display.cpp:170)
#20 0x00000001003d4bd4 in GlobalContext::loadAllegro() (in factorio) (Display.cpp:0)
#21 0x00000001003d17cb in GlobalContext::init(bool, bool, bool) (in factorio) (GlobalContext.cpp:444)
#22 0x000000010075d0d6 in MainLoop::run(Filesystem::Path const&, Filesystem::Path const&, bool, bool, std::__1::function<void ()>, Filesystem::Path const&, MainLoop::HeavyMode) (in factorio) (MainLoop.cpp:253)
#23 0x0000000100751551 in _al_mangled_main (in factorio) (Main.cpp:1130)
#24 0x0000000100e3b097 in +[AllegroAppDelegate app_main:] (in factorio) (osx_app_delegate.m:230)
#25 0x00007fff3a973014 in 0x00007fff3a973014
#26 0x00007fff65a66339 in 0x00007fff65a66339
#27 0x00007fff65a692a7 in 0x00007fff65a692a7
#28 0x00007fff65a65445 in 0x00007fff65a65445
Stack trace logging done
Attachments
factorio-current.log
(3.73 KiB) Downloaded 165 times

User avatar
TheBloke
Fast Inserter
Fast Inserter
Posts: 123
Joined: Mon Dec 03, 2018 2:48 am
Contact:

Re: [0.16.51] [MacOS] Crash on game open, OpenGL/GPU related - VRAM not detected on dedicated GPU?

Post by TheBloke »

Here's a screenshot from GeekBench, just to show that the GPU is fully detected, including VRAM, in other apps:

Image

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.16.51] [MacOS] Crash on game open, OpenGL/GPU related - VRAM not detected on dedicated GPU?

Post by posila »

Hi, the GL_INVALID_FRAMEBUFFER_OPERATION error is not great, but it is not cause of the crash and shouldn't crash.

It crashes in VRAM size detection code (which uses macOS API calls, not OpenGL) which should be unrelated to the OpenGL error.
For now you can disable VRAM detection code by setting skip-vram-detection=true in config.ini. Since the game didn't launch sucessfully yet, your config.ini won't exist.

Download attached config.ini and save it to

Code: Select all

~\Library\Application Support\factorio\config\config.ini
Attachments
config.ini
(209 Bytes) Downloaded 174 times

User avatar
TheBloke
Fast Inserter
Fast Inserter
Posts: 123
Joined: Mon Dec 03, 2018 2:48 am
Contact:

Re: [0.16.51] [MacOS] Crash on game open, OpenGL/GPU related - VRAM not detected on dedicated GPU?

Post by TheBloke »

posila wrote:
Mon Dec 03, 2018 1:52 pm
Hi, the GL_INVALID_FRAMEBUFFER_OPERATION error is not great, but it is not cause of the crash and shouldn't crash.

It crashes in VRAM size detection code (which uses macOS API calls, not OpenGL) which should be unrelated to the OpenGL error.
For now you can disable VRAM detection code by setting skip-vram-detection=true in config.ini. Since the game didn't launch sucessfully yet, your config.ini won't exist.

Download attached config.ini and save it to

Code: Select all

~\Library\Application Support\factorio\config\config.ini
Awesome! Thanks so much for the fast reply and the workaround. I've tested as far as starting the first Campaign and everything seems fine.

Let me know if I can do any debugging in terms of why I get this error - happy to run a test build or provide further diagnostic info or whatever might help.

Thanks again, much appreciated.

Image
Last edited by TheBloke on Mon Dec 03, 2018 5:27 pm, edited 1 time in total.

User avatar
TheBloke
Fast Inserter
Fast Inserter
Posts: 123
Joined: Mon Dec 03, 2018 2:48 am
Contact:

Re: [0.16.51] [MacOS] Crash in SystemUtil::vramSize()

Post by TheBloke »

PS. Here's my latest factorio-current.log, in case it's of any interest - I noticed that the OpenGL error went away when the vramSize crash was fixed by disabling VRAM detection. Don't know if that's useful info or not:

Code: Select all

   0.000 2018-12-03 16:45:47; Factorio 0.16.51 (build 36654, mac, steam)
   0.000 Operating system: macOS 10.14.1
   0.001 Program arguments: "/Users/tomj/SteamLibrary/steamapps/common/Factorio/factorio.app"
   0.001 Read data path: /Users/tomj/SteamLibrary/steamapps/common/Factorio/factorio.app/Contents/data
   0.001 Write data path: /Users/tomj/Library/Application Support/factorio [182416/500586MB]
   0.001 Binaries path: /Users/tomj/SteamLibrary/steamapps/common
   0.009 System info: [CPU: Intel(R) Xeon(R) CPU           X5670  @ 2.93GHz, 12 cores, RAM: 49152 MB]
   0.017 Display options: [FullScreen: 0] [VSync: 1] [UIScale: system (100.0%)] [MultiSampling: OFF] [Screen: 255] [Lang: en]
   0.017 Available display adapters: 6
   0.017  [0]: resolution 3840x2160px at [0,0]
   0.018  [1]: resolution 1920x1080px at [-3840,-240]
   0.018  [2]: resolution 1920x1200px at [-1920,960]
   0.018  [3]: resolution 1920x1200px at [-1920,-240]
   0.018  [4]: resolution 1200x1920px at [5040,0]
   0.018  [5]: resolution 1200x1920px at [3840,0]
   0.018 Create display on adapter 0. Size 1280x720 at position [1270, 702].
   0.248 Initialised OpenGL:[0] AMD Radeon HD Tahiti XT Prototype OpenGL Engine; driver: 2.1 ATI-2.2.8
   0.248   Video memory size: skipped
   0.703 Graphics settings preset: medium
   0.703 Graphics options: [Graphics quality: high] [Video memory usage: high] [Light scale: 25%] [DXT: false] [Shader: 1]
   0.703                   [Parallel sprite loading: 1] [Max texture size: 0/8192] [Bmp cache: 0] [Sprite slicing: 1] [Low quality rotation: 0]
   0.767 Loading mod core 0.0.0 (data.lua)
   0.795 Loading mod base 0.16.51 (data.lua)
   0.955 Loading mod base 0.16.51 (data-updates.lua)
   1.029 Checksum for core: 840319042
   1.029 Checksum of base: 3323233190
   1.192 Loading sounds...
   1.254 Info PlayerData.cpp:67: Local player-data.json unavailable
   1.254 Info PlayerData.cpp:70: Cloud player-data.json available, timestamp 1543808847
   1.382 Loaded shader file /Users/tomj/SteamLibrary/steamapps/common/Factorio/factorio.app/Contents/data/core/graphics/shaders/game.glsl
   1.385 Loaded shader file /Users/tomj/SteamLibrary/steamapps/common/Factorio/factorio.app/Contents/data/core/graphics/shaders/zoom-to-world.glsl
   1.387 Loaded shader file /Users/tomj/SteamLibrary/steamapps/common/Factorio/factorio.app/Contents/data/core/graphics/shaders/alpha-mask.glsl
   1.402 Crop bitmaps.
  11.440 Initial atlas bitmap size is 16384
  11.442 Created atlas bitmap 16384x13052 [none]
  11.443 Created atlas bitmap 16384x3018 [shadow]
  11.443 Created atlas bitmap 16384x2104 [decal]
  11.443 Created atlas bitmap 8192x5568 [mipmap]
  11.443 Created atlas bitmap 8192x800 [mipmap, smoke]
  11.446 Created atlas bitmap 8192x8192 [linear-minification, mipmap, terrain]
  11.446 Created atlas bitmap 8192x1104 [linear-minification, mipmap, terrain]
  11.446 Created atlas bitmap 8192x2092 [no-crop, trilinear-filtering, icon, light]
  11.447 Created atlas bitmap 8192x924 [alpha-mask]
  30.000 Sprites loaded
  30.000 Convert atlas 8192x5568 to: mipmap
  30.545 Convert atlas 8192x800 to: mipmap
  30.679 Convert atlas 8192x8192 to: min-linear
  31.541 Convert atlas 8192x1104 to: min-linear
  31.731 Convert atlas 8192x2092 to: trilinear-filtering
  31.936 Convert atlas 8192x924 to: alpha-mask
  32.016 Custom inputs active: 0
  32.068 Factorio initialised
  65.883 Applying migration: Base Mod: 2018-01-09_Factorio_0.16.27.lua
  66.038 Loading Level.dat: 197096 bytes.
  66.038 Info Scenario.cpp:136: Map version 0.16.51-0
  66.060 Checksum for script /Users/tomj/Library/Application Support/factorio/temp/currently-playing/control.lua: 3355732008
 145.705 Info BlueprintShelf.cpp:628: Saving blueprint storage.
 146.769 Info GlobalContext.cpp:696: Waiting for child processes to exit:
 147.308 Steam API shutdown.
 147.309 Goodbye
 

jiri
Former Staff
Former Staff
Posts: 8
Joined: Sun Jul 30, 2017 9:48 pm
Contact:

Re: [0.16.51] [MacOS] Crash in SystemUtil::vramSize()

Post by jiri »

This should be fixed in 0.17 :)

User avatar
TheBloke
Fast Inserter
Fast Inserter
Posts: 123
Joined: Mon Dec 03, 2018 2:48 am
Contact:

Re: [0.16.51] [MacOS] Crash in SystemUtil::vramSize()

Post by TheBloke »

Awesome, thanks so much! In the meantime the workaround is working absolutely fine :)

Thanks for the great support!

Post Reply

Return to “Resolved Problems and Bugs”