Fractal Softworks Forum

Starsector => Bug Reports & Support => Bug Reports & Support (modded) => Topic started by: Titann on June 11, 2019, 03:12:49 AM

Title: CTD when saving
Post by: Titann on June 11, 2019, 03:12:49 AM
Code
544124 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Saving stage 1
544124 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Saving stage 2
544124 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Saving stage 3
544884 [Thread-14] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Saving progress: 0.0

Classic saving error

First of all my computer;
8 GB Ram
Nvidia GTX 550 TI 1 GB
i7-2600 3.4Ghz
Windows 10

Active mods;
Audio Plus
Blackrock Drive Yards
Dassault-Mikoyan Engineering
GraphicsLib
JP_RC
LazyLib
Legacy of Arkgneisis
MagicLib
Nexerelin
SCY
Shadowyards
Ship and Weapon Pack
slyphon
tahlan
Underworld

I tried;
+4gb on vmparams
+completely disabled graphicslib settings
+small galaxy size
+compatibility mode - windows 7
+run as admin

I dont remember what else i did but ill try other stuff if you guys can help me... It was working fine when Dassault Mikoyan Engineering and Blackrock Drive Yards wasnt active, but both bringing very good contents to game i really like them so i dont want to deactive them as well as other mods that is active. These mods are my fav and also there is more mods to activate but this damn crash taking them away from me.

Can someone help me out?

Title: Re: CTD when saving
Post by: Alex on June 11, 2019, 08:38:32 AM
Can you give the solutions in this thread a try? The OP lists a bunch of the things to try, although setting compatiblity mode is what ultimately helped them out.

http://fractalsoftworks.com/forum/index.php?topic=15545.0
Title: Re: CTD when saving
Post by: Titann on June 11, 2019, 11:22:02 AM
same crash again it doesnt even open the campaign it crashes right after loading "Finished" and starts to saving so it crashes before it says "Saving"

Code
162854 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Saving stage 1
162855 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Saving stage 2
162855 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Saving stage 3
163760 [Thread-12] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Saving progress: 0.0

Title: Re: CTD when saving
Post by: Kreuzberger on June 12, 2019, 05:17:21 AM
I have the same problem.

Tried running it in windows 7 compatibility as stated in the other thread, but no...right with first try to save it crashed to desktop.
Title: Re: CTD when saving
Post by: Alex on June 12, 2019, 07:47:30 AM
The linked thread has a number of other things to try that did not work for the OP but have worked for the same issue for others in the past:

My modlist is in the following image: https://puu.sh/DAG4C/b1a7af8ab7.png
As recommended in another thread, I've attached an hs_error_pid***.log to the post.

Attempted fixes:
  • Changing memory allocation to 4 or 6 GB - Didn't work.
  • Setting "processMessagesWhileSavingOrLoading" to false in data/config/settings.json - No dice.
  • Disabling GraphicsLib through its config - Nope.
  • Running as admin - Nada.
  • Changing resolution from 1920*1080 to 1600*900 - Narp.
  • Updating graphics drivers - Negative, Ghostrider.
  • Run in compatibility mode - Bingo!

If you've got an hs_err*.pid file generated by the crash, btw, it might make sense to post it up.
Title: Re: CTD when saving
Post by: Kreuzberger on June 12, 2019, 08:30:47 AM
I try as good as I can.
This is my log, the ending is the same as the ending of the threadstarter.

243595 [Thread-4] WARN  exerelin.utilities.ExerelinConfig  - Faction config ae_ixbattlegroup not found, using default
243595 [Thread-4] WARN  exerelin.utilities.ExerelinConfig  - Faction config ae_ixbattlegroup not found, using default
243595 [Thread-4] WARN  exerelin.utilities.ExerelinConfig  - Faction config ae_ixbattlegroup not found, using default
243595 [Thread-4] WARN  exerelin.utilities.ExerelinConfig  - Faction config ae_ixbattlegroup not found, using default
243595 [Thread-4] WARN  exerelin.utilities.ExerelinConfig  - Faction config ae_ixbattlegroup not found, using default
243595 [Thread-4] WARN  exerelin.utilities.ExerelinConfig  - Faction config ae_ixbattlegroup not found, using default
243797 [Thread-4] INFO  data.scripts.campaign.KadurBlueprintStocker  - Interval elapsed, calling stockKadurBlueprints method
243797 [Thread-4] INFO  data.scripts.campaign.KadurBlueprintStocker  - Starting stockKadurBlueprints scan
245011 [Thread-4] INFO  com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent  - Added admin at mairaath, 20 total available
247431 [Thread-4] INFO  com.fs.starfarer.api.impl.campaign.intel.ProcurementMissionIntel  - Created ProcurementMissionIntel: red_water to Ming Yue
247481 [Thread-4] WARN  exerelin.utilities.ExerelinConfig  - Faction config ae_ixbattlegroup not found, using default
250947 [Thread-4] INFO  com.fs.starfarer.api.impl.campaign.intel.AnalyzeEntityMissionIntel  - Created AnalyzeEntityMissionIntel: Derelict Ship, faction: Reparations Society
252498 [Thread-4] WARN  exerelin.utilities.ExerelinConfig  - Faction config ae_ixbattlegroup not found, using default
253949 [Thread-4] INFO  com.fs.starfarer.api.impl.campaign.intel.ProcurementMissionIntel  - Created ProcurementMissionIntel: hmi_crystal to Ilm
257497 [Thread-4] WARN  exerelin.utilities.ExerelinConfig  - Faction config ae_ixbattlegroup not found, using default
258015 [Thread-4] INFO  com.fs.starfarer.api.impl.campaign.intel.SurveyPlanetMissionIntel  - Created SurveyPlanetMissionIntel: Guaya, faction: independent
258196 [Thread-4] INFO  com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent  - Removed officer from limboplanet, 40 total available
258481 [Thread-4] INFO  com.fs.starfarer.api.impl.campaign.fleets.EconomyFleetRouteManager  - Added trade fleet route from Fuyutsuki to Glory
259814 [Thread-4] INFO  exerelin.campaign.fleets.MiningFleetManagerV2  - Trying mining fleet for market Chicomoztoc
262513 [Thread-4] WARN  exerelin.utilities.ExerelinConfig  - Faction config ae_ixbattlegroup not found, using default
265497 [Thread-4] INFO  com.fs.starfarer.api.impl.campaign.intel.SurveyPlanetMissionIntel  - Created SurveyPlanetMissionIntel: Alpha Sidor VI, faction: pirates
268139 [Thread-10] INFO  sound.oo0O  - Creating streaming player for music with id [faction_hegemony_market_03_friendly_var01.ogg]
268139 [Thread-10] INFO  sound.null  - Playing music with id [faction_hegemony_market_03_friendly_var01.ogg]
335335 [Thread-4] WARN  exerelin.utilities.ExerelinConfig  - Faction config ae_ixbattlegroup not found, using default
335555 [Thread-8] INFO  sound.oo0O  - Cleaning up music with id [faction_hegemony_market_03_friendly_var01.ogg]
335729 [Thread-10] INFO  sound.null  - Playing music with id [Stellar_Rust.ogg]
335781 [Thread-4] INFO  com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent  - Added officer at agreus, 40 total available
336270 [Thread-4] INFO  exerelin.campaign.DiplomacyManager  - Starting diplomacy event creation
336271 [Thread-4] INFO  exerelin.campaign.DiplomacyManager  - Factions are: Sindrian Diktat, P.A.C.K.
336271 [Thread-4] INFO  exerelin.campaign.DiplomacyManager  - Dominance factor: 0.02973396
336271 [Thread-4] INFO  exerelin.campaign.DiplomacyManager  - Trying event: Diplomatic Blunder
336271 [Thread-4] INFO  exerelin.campaign.DiplomacyManager  - Transmitting event: Diplomatic Blunder
339499 [Thread-4] INFO  exerelin.plugins.ExerelinModPlugin  - Before game save
339499 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Saving to ..\\saves/save_VictorKhruul_1577892099505893896...
339499 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Saving stage 1
339500 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Saving stage 2
339500 [Thread-4] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Saving stage 3
339854 [Thread-15] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Saving progress: 0.0


PS:   
So far I did/have these things:
    Changing memory allocation to 4 or 6 GB
    Setting "processMessagesWhileSavingOrLoading" to false in data/config/settings.json 
    Changing resolution from 1920*1080 to 1600*900
    Run in compatibility mode

And only changing the resolution worked so far, I could play for a longer time without save crash. But I don´t understand this, before everything worked just fine....and I really would like to play on max resolution.

PSS:

Also: do you have an hs_errXXX.pid file somewhere in the Starsector folder, or possibly in starsector-core? XXX would be a number; could be a different number of digits. If you have that, then seeing the contents of the file might help.

Also: some software can interfere with the game. Are you running MSI Afterburner? That's known to cause problems. An antivirus could conceivably cause issues as well.

---->No file, no MSI Afterburner and antivirus was never a thing before.
Title: Re: CTD when saving
Post by: Alex on June 12, 2019, 09:40:00 AM
Hmm - if you don't specifically mention what you've tried, that makes it very difficult to figure out what else to suggest or what else might help.

Also: do you have an hs_errXXX.pid file somewhere in the Starsector folder, or possibly in starsector-core? XXX would be a number; could be a different number of digits. If you have that, then seeing the contents of the file might help.

On the face of it, this looks like it's probably a graphics driver crash (hence the list of suggestions), but it's hard to be sure.

Also: some software can interfere with the game. Are you running MSI Afterburner? That's known to cause problems. An antivirus could conceivably cause issues as well.
Title: Re: CTD when saving
Post by: MesoTroniK on June 12, 2019, 09:54:45 PM
Video card with only 1gb of vram...

Edit: And only 8gb of system ram on top of it for double the pain.
Title: Re: CTD when saving
Post by: Kreuzberger on June 13, 2019, 10:20:58 AM
PS: I experimented a bit more and changing to 1680x1050 resolution worked too so far.

PPS: Nope. Today it crashed.
Title: Re: CTD when saving
Post by: Shad on June 14, 2019, 05:58:23 AM
Same issue. Tried the things on the list of suggestions. Crashes on saving now no longer occur every time, but still frequent. I never had anything like this in 0.8 or 0.9.0a versions.

[attachment deleted by admin]
Title: Re: CTD when saving
Post by: Kreuzberger on June 14, 2019, 07:51:07 AM
@Shad, are you by chance an owner of a Nvidia graphic card too?
Title: Re: CTD when saving
Post by: Alex on June 14, 2019, 08:06:59 AM
Same issue. Tried the things on the list of suggestions. Crashes on saving now no longer occur every time, but still frequent. I never had anything like this in 0.8 or 0.9.0a versions.

Took a look at the hs_err log (thank you for attaching it!) and this also looks like a driver crash. Since it sounds like you've updated to the latest version of the drivers, I'd recommend trying an earlier driver version instead (maybe going back half a year or so?) - it seems pretty likely that the most recent driver version introduced a bug.
Title: Re: CTD when saving
Post by: Shad on June 14, 2019, 08:55:53 AM
@Shad, are you by chance an owner of a Nvidia graphic card too?
Yes.

Same issue. Tried the things on the list of suggestions. Crashes on saving now no longer occur every time, but still frequent. I never had anything like this in 0.8 or 0.9.0a versions.

Took a look at the hs_err log (thank you for attaching it!) and this also looks like a driver crash. Since it sounds like you've updated to the latest version of the drivers, I'd recommend trying an earlier driver version instead (maybe going back half a year or so?) - it seems pretty likely that the most recent driver version introduced a bug.
Thing is, I had an older version of the driver before. I upgraded to the latest version trying to resolve crashes.


EDIT: Tried running game with integrated graphics. Performance obviously went through the floor, but there were no crashes in a few hours.
Title: Re: CTD when saving
Post by: Kreuzberger on June 15, 2019, 07:57:13 AM
Can you please explain, how you do run the game like that? I am not that adept as I should be to run this game. I am just a person, who wants to drive the car, not a mechanician like you guys.... :(
Title: Re: CTD when saving
Post by: Shad on June 15, 2019, 08:12:06 AM
Can you please explain, how you do run the game like that? I am not that adept as I should be to run this game. I am just a person, who wants to drive the car, not a mechanician like you guys.... :(
Right click the icon and check if you have an option like in the screenshot.

If you have a laptop, you often have 2 graphics cards: one integrated (Intel HD or something similar), one proper (like Nvidia).

[attachment deleted by admin]
Title: Re: CTD when saving
Post by: Kreuzberger on June 16, 2019, 11:57:21 AM
No, there is no option like this.
Title: Re: CTD when saving
Post by: Titann on June 21, 2019, 08:33:11 AM
i was playing fine with tahlan and shadowyards disabled untill i see imperium mod is released lmao

getting save crash again... Maybe game developers needs to take look at this issue or I should upgrade my computer, untill then i'll play on 1024x768

P.S: doesnt work even 1024x768 doesnt work wth

Title: Re: CTD when saving
Post by: Kreuzberger on June 23, 2019, 09:44:07 AM
My situation hasn´t changed either.
Title: Re: CTD when saving
Post by: CynicJester on June 26, 2019, 02:25:34 PM
Setting "processMessagesWhileSavingOrLoading" to false in data/config/settings.json

If you're like me, you probably set this one and promptly left it on false as you went on to try a shitton of other troubleshooting steps. What eventually let me use lots of mods without crashing on saving was turning this back to true after disabling Shaderlib.
Title: Re: CTD when saving
Post by: Alex on June 26, 2019, 02:37:41 PM
(Just a quick note here: if this is set to "false", then windows may report that the game has stopped responding etc, but that's actually not true, and if you wait it out, it should finish whatever it was doing. Just in case you were interpreting "stopped responding" as a crash. Basically, the only reason the processMessages thing is there at all is to stop windows from saying the game has stopped responding, it doesn't have any function beyond that.)
Title: Re: CTD when saving
Post by: CynicJester on June 26, 2019, 02:49:34 PM
I was getting Java crashes on the initial save after generating the sector with it set to false provided my modlist was long enough. Setting it to true stopped those crashes, nor have I had any save related crashes since.
Title: Re: CTD when saving
Post by: Kreuzberger on June 26, 2019, 04:13:28 PM
Ok, trying that the days ahead. thanks.
Title: Re: CTD when saving
Post by: CynicJester on June 26, 2019, 04:34:16 PM
Seems I was a bit quick on the trigger, after making lots of characters in a single session with no crashes, it's back to crashing on initial save after generating the sector. Cutting down on the mod list removes the crashing on save. In game, GraphicsLib on or off, the game runs at a steady 63 frames except in the most saturated of battles. Try to save with lots of mods and you'll likely crash. Why saving causes the graphics driver to crash is beyond me though, if anything, I'd imagine an intense battle to be more likely to send it crashing.

Attached the err.log in case it might help.

[attachment deleted by admin]
Title: Re: CTD when saving
Post by: Alex on June 26, 2019, 09:17:04 PM
Yeah, from the hs_err file, this looks like a driver crash. Maybe it's running out of VRAM or something? That could explain why paring down the mod list slightly gets around it.
Title: Re: CTD when saving
Post by: CynicJester on June 27, 2019, 02:27:03 AM
It's a janky card, so that's certainly possible, but why would saving, whether on initial creation of the sector or in-game, be the straw the busts the camel? I've had no crashes in any other situation except saving, even in the instances where I managed to get in game with a large mod-list.
Title: Re: CTD when saving
Post by: Alex on June 27, 2019, 08:33:38 AM
When saving, the game hands the graphics context off to another thread (so that it can render an updated progress bar while the main thread is saving - the actual saving *has* to be on the main thread), and then hands it back when done saving. I've gone over that code a number of times and am pretty sure (as sure as one can be with any code) that it's done correctly, but apparently it can still give some drivers trouble under some set of circumstances.

... but, you know what, just thought of a way to do the rendering on the main thread as well. <about an hour later> alright, that looks like it works, performs just about the same, and should hopefully bypass the issue. Unless, of course, it's crashing on save for *another* reason.
Title: Re: CTD when saving
Post by: CynicJester on June 27, 2019, 04:34:19 PM
I did some testing today to see if I could get some more data points.

For reference, I'm running on a GT710 I ripped out of my media PC after my primary card died, so it's sitting on 1 GB of VRAM and is all sorts of not great for gaming.

If I launch Starsector as soon as my computer launches windows, I have a lot of leeway in the number of mods I can use and even with saving every time the autosave mod pokes me, I can play for hours without crashing on a save. Now that I think about it, if I manage to save a couple of times, I've never crashed after that.

On the other hand, if Starsector has already been played on the current boot, even if it ran fine, launching it again seems to make things iffy. I still only crash on saving mind you, but I do so almost every time I try, be it creating a new character or loading and saving an existing one. If I remove literally every faction mod, I no longer run into this.

Having GraphicsLib active or not does not seem to impact it at all, which feels weird.
Title: Re: CTD when saving
Post by: Alex on June 27, 2019, 04:38:06 PM
That sounds more and more like some sort of driver-side persistent state thing... just guesswork on my part, of course. Hopefully what I changed will get around it entirely for the next release.

At what point does it crash, btw? Just as you start to save? Partway through the progress bar? As it's finishing?
Title: Re: CTD when saving
Post by: CynicJester on June 27, 2019, 05:11:58 PM
There are two types of crashes I see, both occurring at the same time according to starsector.log (Saving progress: 0.0). Either it just shuts down, no error messages but it leaves a hs_err file, or I get the java error pop-up. Both happen just prior to when the progress bar for saving should pop up. If I'm creating a new character, it crashes when the "Finishing(?)" bar completes.
Title: Re: CTD when saving
Post by: Alex on June 27, 2019, 05:13:35 PM
Aha, thank you! This is encouraging as that would line up with the changes indeed fixing the issue, as what's changed is happening at the time of the crashes. Cool!
Title: Re: CTD when saving
Post by: CynicJester on June 28, 2019, 12:04:16 PM
Any rough timeline on when you'll do the release? No faction mods makes Cynic a dull boy.

Edit: And let me know if you need the fix tested.
Title: Re: CTD when saving
Post by: Alex on June 28, 2019, 12:33:58 PM
Any rough timeline on when you'll do the release? No faction mods makes Cynic a dull boy.

Ahh, sorry - "when it's ready".

I do wonder what about the faction mods is causing this, since in theory it shouldn't do anything it's not already doing in vanilla. You've got MagicLib as well, right? Is there an option to try turning that off, similar to graphics lib? It's got to be *something* graphics-related so that's naturally a potential suspect. Another alternative would be trying a faction mod that doesn't require MagicLib.

Edit: And let me know if you need the fix tested.

Thank you - it's not in a good state for that, since I'm knee-deep in some other changes right now, so it's nothing resembling "playable" at the moment, and not even entirely mod-compatible API wise.
Title: Re: CTD when saving
Post by: CynicJester on July 02, 2019, 07:43:50 AM
There's no option to disable MagicLib, at least that I can see.

Messing around a bit, with disabled GraphicsLib and Nex+4 faction mods+regular fullscreen, I can get up to a couple of hours of playtime before crashing on save, with me saving whenever the mod reminds me to(every 15 minutes or so).

If you need me to test the fix when it's ready, just shoot me an e-mail to my username at gmail as I don't check these forums all that often.
Title: Re: CTD when saving
Post by: Alex on July 02, 2019, 07:47:34 AM
Sorry about the trouble; glad you've at least got something sort-of-playable going.

If you need me to test the fix when it's ready, just shoot me an e-mail to my username at gmail as I don't check these forums all that often.

Thank you! That'll probably be a bit after the next release, when the mods update as well.