Closed bytetronic closed 2 months ago
I'm a bit confused by the description. Are you saying that when the game shows a black screen, it will always show the black screen, no matter how you restart it until you delete some files in the "GPU folder"?
The game will show a black screen when the memory usage is over the limit (on Chromium-based browsers). This is the usual cause of the black screen problem. The solution is to restart the game. If it still shows a black screen after you restart the game, it's a different problem.
I've also stumbled across this issue, and only restarting Electron fixed it. Ideally, you should be able to recover without needing to close the game, or Electron should close itself in this scenario. The current soft-crash behavior is a bit confusing.
@bytetronic, did you try to just restart the game window? Or did your modifications with the GPU folders allow you to reload the game without a full restart, using just the menu?
I've also stumbled across this issue, and only restarting Electron fixed it.
Can you reproduce this? That also seems like a bug to me, but I've yet to see a case where reloading inside electron didn't fix it.
Sadly not, I believe it mostly happened randomly during long (12h+) game sessions, where I let the game run in the background. It seems like Black Screens may happen when Chrome(ium) runs out of memory or vram. That's just one possible cause though and a wild guess, and I haven't ever watched the game for increased memory usage or leaks.
Black screens absolutely happen because of Chromium running out of memory. I can trivially create a black screen whenever I want to with a small script that just eats memory. The question I was asking was, can you reproduce the state where you get a black screen and selecting reload from the menu doesn't fix it?
Haha I just wrote one, was not successfull with a ram script (just stopped allocating at 16gb), but a vram script did it. But no, I currently don't know how to replicate that special case without starting new daylong sessions. I've noticed there are different bitburner processes. Maybe depending on where the out of memory happens, it has a different effect?
Electron has the same architecture as Chromium. On my machine, there are 3 processes, one of those is the main (game) process, which is currently 1GB for me (go go batchers), the other two are 30MB. I'm pretty sure one of those is the overall browser process, and the other is the internal Electron API process. Neither should be able to cause a black screen, since they don't actually render. (If the browser process blew up, it should just be a straight-up crash or not-responding.)
I've also stumbled across this issue, and only restarting Electron fixed it. Ideally, you should be able to recover without needing to close the game, or Electron should close itself in this scenario. The current soft-crash behavior is a bit confusing.
@bytetronic, did you try to just restart the game window? Or did your modifications with the GPU folders allow you to reload the game without a full restart, using just the menu?
Some additional Info: I run the game from steam, don't know where electron resides in this case. The game window was intact all the time, but it started always with the black screen and stayed that way, regardless whatever I tried, regardless of fullscreen or reduced size mode. I had stopped the game from the game's window menu by selecting quit, then deleted the GPU cache files and after that it started with the regular screen. Maybe it's worth to mention that I did some changes in the view a few hours before the black screen happend, like zooming out and theme changes.
I'll clarify some terminologies and the potential root cause of this problem.
At first, Bitburner is a web application. It needs to be run in a browser environment. [1]
In layman's terms, the Steam app is just a browser that runs the "Bitburner web application". We use Electron to do that. The Steam app's window is just a window of a custom Chromium browser.
When the game launches, it spawns many processes:
There are many processes [2]:
--type
. If you close it, the game quits.gpu-process
, utility
, crashpad-handler
, etc. We mostly don't care about them.Many things can crash the renderer process, but, in our case, it's very likely caused by the memory limit. "Memory limit" is not your RAM. Even if you have 128GB RAM (in your real machine, not the in-game home PC), the game will still crash when the renderer process reaches ~4GB. This is the limit of the V8 engine [3], so we cannot do anything. [4]
The memory usage can be increased continuously for many reasons. Some common ones are:
When it happens, you can:
I had stopped the game from the game's window menu by selecting quit, then deleted the GPU cache files and after that it started with the regular screen.
With the description above, I think what fixes the problem is the normal "just restart it" trick, not the deletion of those GPU files.
Note: [1]: Technically, you can run Bitburner in a non-browser environment. For example, you can run it in the headless mode with NodeJs, Deno, etc. This is irrelevant for most people, though. [2]: This is not an exhaustive list of all types of processes. [3]: V8 is a Javascript engine: https://en.wikipedia.org/wiki/V8_(JavaScript_engine). [4]: I simplified a lot of things here.
Just to clarify again: all regular steps I already tried without any result, it stayed black when I:
The screen stayed black and therefore I started examining the bitburner config/ logs and solved the problem as described above. I had the game installed on 2024-09-08 and since then I think there was no update, which could have caused the problem. What I described was my situation and I thought it might help others to find the issue or solve the same problem for some of us. I'm sorry when my frist description was insufficient to give you an idea of the whole process I was going through. It'll be a lection for me to carefully think about my description before posting problems.
Closing the issue, because of @catloversg's explanation it might simply be a mem issue, which can't be solved at he moment.
Thanks for the clarification. If you restart the game and it still shows the black screen, but it works after deleting those files, there is a chance the deletion of those files actually helps. I'll take note of this specific case, just in case someone else has the same problem in the future.
The Search I was away for some time from the computer hence I can't tell what was happening when the black screen appeared. after fiddling around with all advices like 'load old save', 'reload/kill all scripts' I looked up the bitburner config folder, searched all logs, but didn't find a hint except it was running and stopped when I closed the game.
The Solution The GPU folder then caught my attention because there where 4 'data_x' files, all the same date of the latest game start, except 'data_3': it had the date of the initial start 2024-09-08. I then deleted 'data_0, _1, _2' and renamed 'data_3' to 'data_0'.
Et voilà: bitburner started with the normal screen!
This might be a hint, what is causing the problem and put as temporary solution for some of us to the FAQ.
My system: Operating System: openSUSE Leap 15.6 KDE Plasma Version: 5.27.11 KDE Frameworks Version: 5.115.0 Qt Version: 5.15.12 Kernel Version: 6.4.0-150600.23.17-default (64-bit) Graphics Platform: X11 Processors: 4 × Intel® Core™ i5-3230M CPU @ 2.60GHz Memory: 7.7 GiB of RAM Graphics Processor: Mesa Intel® HD Graphics 4000 Manufacturer: LENOVO Product Name: 2182 System Version: Lenovo G780