New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Screen goes black #2768
Comments
Put it in zip archive with 7zip |
For what it's worth, it seems that this is happening when the game is saving. I have the game set to save every 10 minutes, because whenever it saves, it stops the world for 10-15 seconds, or longer. Every few times, I get the popup message suggesting that hey, maybe I have an infinite loop in my script and do I want to restart? (I cancel and let the save complete.) I believe (from looking deeper into mislav/hub#1479, that I can't upload my save file because it's too large - it's 55mb zipped. So I uploaded it to my Google Drive - https://drive.google.com/file/d/1CfX-r5yVWu_AU-QKKS119Dk2n9Gw0ybc/view?usp=sharing |
Also, I should say that by "sometimes the screen goes black" I mean "reliably, several times a day." |
I got this too on the steam client & chrome (firefox worked fine, though). Thinking it was memory related, I recently tried |
@uhhhclem can you confirm if this flag helps at all? |
I have been seeing a similar issue for several days now. I tried adding the js-flags to the run arguments for the steam client, but it did not solve the issue. Attached is my save file as well as main.log. This exception appears to be causing the issue:
|
Running into this too, with the steam client. My theory is that it's happening when an auto-save is triggering while a manual save is already running. My saves are now taking a few seconds to run, so it's not that uncommon that auto-save would try to happen while I'm in the middle of saving via the editor |
Nope - disabling 'save game on file save' didn't make this go away, so it's not (only) concurrent save games. |
From discord, someone suggested clearing out large files in my safe, and doing so did get rid of the problem. |
I am using the Steam version and this happens to me frequently, multiple times during the day, in different intervals. It can happen anywhere between 0.5 to 8 hours. It started to happen when I started to use singularity functions to automate crimes, and work for factions. I saw the screen go black a single time with my eyes. A crime was about to be finished, but then the game went black before displaying the crime selection screen. All other times I come back to a black game window, the game is pretty much in the background, or on another screen, so it's not easy to point down when it happens. It is not related to saving, as it also happens when auto save is off. Adding the js-flags argument does not prevent the behaviour. The largest file I have is 200kb, with a total unkompressed save of 4 MB. |
@OriginalRobotWizard could you please try the beta branch "development" in steam to see if it still occurs? (backup your save just incase) there has been some changes around save corruption fixes |
Using Steam version beta "development" ec44c9d, the game window went black after about 7 hours. |
Steam version beta bc95214 still has the issue. |
@OriginalRobotWizard thx for keeping the ticket up to date, did you happen to maybe be working/ commiting crimes and then your script tried to install augmentations by chance? |
i have a pr (#3101) open to fixe a crash related to augmenting when working, and there was a stale reference to the player object when commiting crimes too so fingers crossed that miight be it |
I noticed that after the black game window, and then reloading the game, that then the API Server stopped working. And it can not be made working again by simply disabling and enabling it. The game has to be closed and reopened for the API Server to work again. |
changes look to be merged @OriginalRobotWizard hopefully itll work this time (whenever the dev branch build is updated next) |
Steam version beta ca19e15 still has the issue. Let me know when your changes are live and I will keep this ticket up to date. |
Steam version beat b265d7b still has the issue. It is happening unrelated to installing augmentations. The script is just working for factions and committing crimes. |
damn.... okay lets try this again. so before you said it happens right before crimes finish, is this always the case or does it occur at random times too? how do you handle your scripts are they just simple scripts that loop and wait for conditions or are you using like the more magical methods tail, exec, onExit ect? |
Still happened on the update before f17e685 (I did not take note which commit that was). Not happened on f17e685 for now, presumably because I only installed it a few hours ago. Up until now, I was unable to exactly determine the point of my controller, of what it is actually doing, since when I reload, the last save is loaded and thus logging in gone. So I made an external logging server using NodeJS and ns.wget() to have live external logging. Black screen happened 2 times, since then. Both at the same log entry ("Start do-Faction-Work"). I have extended the logging in that particular part now. So, how do I handle my scripts in that part of my controller? As with any other part where I use singularity, I am using all kind of magical methods to save on RAM on the controller. In this case in particular: In the controller:
In appSingularityWorkForFaction.js:
As I said, I have extended the logging now, so that I may be able to determine further, which of the lines causes the issue. Its worth noting, that the black screen appearance has hours of working game in between, where this particular function called over and over. As I said, I am doing similar things for committing crimes, and all other singularity functions that just do stuff, instead of returning data. I have now extended logging in all those cases and may be able to point down on the ns calls that are made before back screens happen. (Or it magically disappears now, be it by timing of logging, or a new version of this absolutely fantstic game). |
bitburnerSave_1648101328_BN4x2.zip Please find attached a minimal setup save that reproduces the issue. All the save does is, using 2 Scripts:
It will take hours to reach the point of black screen (like in the normal save), but already after a short time the RAM increase is visible in the Task Manager. |
I just started to experience this on Steam version 1.7.0 (00adc2f). I am still early in the game on the first bitnode, no singularity. I was focusing on working for a faction when the screen just went black for no reason. I go to Reloads -> Reload (F5) to reload the game, and it hangs until it tells me I might have an infinite loop and I have to reload and kill scripts to get it back. It has happened 3-4 times now in the past two days. It was stable for me before last week. |
I am observing the same behavior reported by @OriginalRobotWizard , except in my case when Bitburner hits about 4150mb the screen goes black and RAM usage drops down to about 140mb. |
@phyzical I'm seeing this issue and I have a very simple case to demonstrate it. I only started playing a couple of days ago and am using the Steam version @ I have a created a simple environment that autoscales player purchased servers to hack/weaken/grow commercial servers. Each player server runs many copies of 1 single-threaded script that in turn will hack/weaken/grow a single target. When there is enough money to buy a new player server it does so. If we are at the player server limit it will delete a single, smaller server if one exists and replace it with a new, bigger server. As you can imagine this scales very quickly and was great fun to watch... until it wasn't. From a completely cold start, with no active scripts I run my initiator script and RAM usage climbs very quickly. Within a couple of minutes the screen goes black and hitting As observed by others in this issue thread the RAM usage of the exe drops right down to around 150MB when the screen goes black. I have done nothing else in game so far. No factions, no jobs, no gangs. Just NUKE'd all the immediate I can no longer play the game for more than a few minutes. Would a save file help here? My system specs etc? UPDATE: I have just made an interesting observation. Once the game is loaded and the game window remains focused the game runs. But, within 3 - 4 seconds of the window losing focus the game crashes to black screen. UPDATE 2: After more digging it seems I'm hitting the infamous 4GB V8 garbage collection limit. I've tried everything to increase that limt with every |
i want to say i have seen it get above 4gb but this was probably 6 months ago, you could also try googling electron + default limit as it might be an electron specific adjustment. the other option is to just make some calculations to use multi threaded scripts instead of a bazzillion single thread scripts, as you will probably hit the limits again even if you did increase it |
Multi-threading was definitely the way to go. It'll be a while before I hit RAM limits again... 😁 |
Hello,
For me this crashes on both google chrome and steam even in a new save. I hope this helps : ) Ok. I thought I was done, but in the middle of writing this I changed TypeError: Cannot read properties of undefined (reading 'format') (at "Terminal")How did this happen?I ran crash.js which is:
Environment
Savehappens on a fresh save file but here P.S. |
@hydroflame It looks like you closed this issue while I was writing my last comment. I was 8 minutes too late (what a coincidence!) and I think the issue should be reopened. (I don't have the reopen button) |
I dont think this is resolved. I'm getting this on 1.7. I spent a few trillion on upgrading my home ram and now loading my main hacking script it spawns too many scripts and crashes the game. |
Bitburner v1.4.0 [49de4a2]
Can't seem to find any specific cause or trigger for this: Sometimes the whole screen goes black and I have to refresh to continue playing.
Tried to upload a recent save file, but mislav/hub#1479 appears to be blocking.
The text was updated successfully, but these errors were encountered: