Jump to content

[X:CE 0.34.2] Loading an in-progress GC save freeze


Policenaut

Recommended Posts

Sometimes when loading an already in-progress ground combat save, the game will either freeze during the initial loading or when you complete the mission and are supposed to get transfered to the Geoscape. This does not happen if you load a save that is in the Geoscape and then play a ground combat mission from start to finish. Randomly reloading the save until you get lucky and the game doesn't freeze works as well. This might be related to the Playground SDK engine itself but perhaps not.

 

Edit: There is a chance this might be related to the ambient sound system X:CE added.

Edited by Policenaut
additional info
Link to comment
Share on other sites

As far as i know this only happens with the autosaves, manual saves have loaded fine for me every single time. Neither has the GC to Geoscape crashed if there hasnt been a save incompability for it.

The autosave load have a felt 50/50 chance of success, so you will get throught eventually.

Link to comment
Share on other sites

Just for information, I managed to solve it in the following way.

After the start of the game I first load the any save on the global map, and then load problem ground combat save.

 

Additional note. After continue this way to global map, I can't push any button by mouse cursor.

I saved game once more. Restart Xenonauts and loaded any good global map savegame. And after that - loaded last savegame.

Edited by Axiomatic
additional note
Link to comment
Share on other sites

@Solver maybe this helps you in your fight against the quicksave bug ?

29 minutes ago, Subcode said:

Hey guys,

as I have pretty the same problem, with the quicksave games. But here is a little "trick" which I use when the game start to crash... I quit the game and do the step 5 of the installation guide on the first page "5. Delete your C:\Users\Username\AppData\Roaming\Goldhawk Interactive\Xenonauts\internal folder " afterwards I restart the game and load the (prior "broken") quicksave game, which runs then quite stable for a longer time. I know it does not fix the problem, but sometimes it is quite useful e.g if you are in end of a mission and the game always freezes e.g. at mission end screen and doesn't change to the geoscape screen.

At least I was so able to finish some of my crash sites missions, maybe it helps some of you, too.

 

Edited by Charon
Link to comment
Share on other sites

1 minute ago, Solver said:

I'll check it out, although quicksaves were broken since before the "internal" modmerging folder was even made, so I doubt this will help.

You dont have to do it. We are just trying to help out since we have the largest concentrated community feedback at the time. I dont think X-Division needs functioning quicksaves. So either you can put up a warning somewhere about them or deactivate them altogether if they are buggy, i prefere the latter since it looks easier to me. No use in using something which is broken.

Link to comment
Share on other sites

Hey I replicated this issue with manual saves not just quick-saves, additional mods = X-Division and Ultimate Ambient Sounds (by pedr0), everything else is XCE defaults. So this isn't quick save specific.

Attempting to load manual save from inside ground combat, it makes the click sound and then freezes on the list of games to load from randomly. Also crashes when attempting to load manual save from main menu randomly.

What did X:CE change about the ambient sound system? I was playing X-division for a good 13+ hours without issues, adding Xenonauts fix pack and Ultimate Ambient Sounds is when the issues started, I'm doing testing now minus UAS mod and will see if things improve. Is Pedr0 on here? Might be worth looking into for him if testing points at that mod.

Edited by Sectiplave
Link to comment
Share on other sites

I've seen an engine crash with one save recently that might be related to sounds, but of course I don't have the source code for that, so I wasn't able to figure out too much of that. Though the Ambient Sounds mod is very interesting in this context, I guess it could be triggering some underlying issue.

Link to comment
Share on other sites

Just now, Solver said:

I've seen an engine crash with one save recently that might be related to sounds, but of course I don't have the source code for that, so I wasn't able to figure out too much of that. Though the Ambient Sounds mod is very interesting in this context, I guess it could be triggering some underlying issue.

but why now?

Link to comment
Share on other sites

Not now. Quicksaves have had the problem since the beginning, which could be sound-related. Some other saves have also at times crashed with X:CE unfortunately, and even now it's not in 100% of cases. So it's hard to say. I don't even think X:CE changed too much there, it was mostly allowing to load ambient sounds from XML instead of just having a bunch of hardcoded ones. Still worth looking at.

Link to comment
Share on other sites

  • 3 weeks later...

I've been experiencing this issue consistently when either Ultimate Ambient Sounds is enabled or (most notably) on the Tropical/Swamp tileset, which has integrated ambient sounds. I've kept Ultimate Ambient Sounds turned off for my current campaign, but from my testing, save type does not seem to matter. Autosaves, quicksaves, and manual saves on a tropical/swamp map all manage to load the first time fairly consistently (sometimes it freezes on initial load, but this seems to thankfully be rare); It is when attempting to load *any* save while *on* the map, or when you would otherwise transfer to the Geoscape (mission success, mission abort, team wipe) that the game freezes for me.

One minor workaround that's been mentioned is to load a save that is on the Geoscape, THEN load the GC mission on the tropical/swamp map, and then attempt to finish the mission without attempting to reload any saves.

Also, the game appears to freeze under certain conditions that I think relate to suppression that I've been unable to fully discern while on tropical/swamp maps (and I presume, ALL maps when you have Ultimate Ambient Sounds enabled); it seems to happen most consistently if using a weapon with large bursts, like vehicle-mounted MG or an LMG, though I've also seen it happen with rockets or in circumstances where more than one unit (friendly and enemy, and including already suppressed units) *might* have become suppressed (impossible to be sure because... well, the game freezes!).

Fortunately, I think I just now managed to discover a workaround for the Tropical/Swamp maps at least! I went ahead and renamed the 'sounds_gc.xml' file in Xenonauts\assets\mods\Tropical and Swamp Tileset to try to disable the ambient sounds and it appears to have made all of the above issues disappear. Saves now load from tropical/swamp maps, game correctly transfers to Geoscape and the suppression freezes I've described appear to have disappeared as well. I'm still doing some testing to see if this might introduce other issues on tropical and swamp maps, but so far I've not encountered any.

Hope this helps anyone else experiencing this incredibly frustrating issue.

Link to comment
Share on other sites

12 hours ago, SNAFU said:

I've been experiencing this issue consistently when either Ultimate Ambient Sounds is enabled or (most notably) on the Tropical/Swamp tileset, which has integrated ambient sounds. I've kept Ultimate Ambient Sounds turned off for my current campaign, but from my testing, save type does not seem to matter. Autosaves, quicksaves, and manual saves on a tropical/swamp map all manage to load the first time fairly consistently (sometimes it freezes on initial load, but this seems to thankfully be rare); It is when attempting to load *any* save while *on* the map, or when you would otherwise transfer to the Geoscape (mission success, mission abort, team wipe) that the game freezes for me.

One minor workaround that's been mentioned is to load a save that is on the Geoscape, THEN load the GC mission on the tropical/swamp map, and then attempt to finish the mission without attempting to reload any saves.

Also, the game appears to freeze under certain conditions that I think relate to suppression that I've been unable to fully discern while on tropical/swamp maps (and I presume, ALL maps when you have Ultimate Ambient Sounds enabled); it seems to happen most consistently if using a weapon with large bursts, like vehicle-mounted MG or an LMG, though I've also seen it happen with rockets or in circumstances where more than one unit (friendly and enemy, and including already suppressed units) *might* have become suppressed (impossible to be sure because... well, the game freezes!).

Fortunately, I think I just now managed to discover a workaround for the Tropical/Swamp maps at least! I went ahead and renamed the 'sounds_gc.xml' file in Xenonauts\assets\mods\Tropical and Swamp Tileset to try to disable the ambient sounds and it appears to have made all of the above issues disappear. Saves now load from tropical/swamp maps, game correctly transfers to Geoscape and the suppression freezes I've described appear to have disappeared as well. I'm still doing some testing to see if this might introduce other issues on tropical and swamp maps, but so far I've not encountered any.

Hope this helps anyone else experiencing this incredibly frustrating issue.

I will upload an update to the tropical/swamp tileset without ambient sounds and put them in the UAS instead. I will also add some fixes to the UAS Charon pointed out. They might not fix the crashing but at least reduce it. Lastly I'm going to test if putting the ambient sounds in group="1" (used for all sounds except music) does something. At the moment they use group="2" (music) because that's what the instructions for the ambient sounds system said to use, but it might be that the music group of the sound system gets overloaded when it's supposed to switch to geoscape music.

Link to comment
Share on other sites

13 hours ago, Charon said:
14 hours ago, SNAFU said:

I've been experiencing this issue consistently when either Ultimate Ambient Sounds is enabled or (most notably) on the Tropical/Swamp tileset, which has integrated ambient sounds. I've kept Ultimate Ambient Sounds turned off for my current campaign, but from my testing, save type does not seem to matter. Autosaves, quicksaves, and manual saves on a tropical/swamp map all manage to load the first time fairly consistently (sometimes it freezes on initial load, but this seems to thankfully be rare); It is when attempting to load *any* save while *on* the map, or when you would otherwise transfer to the Geoscape (mission success, mission abort, team wipe) that the game freezes for me.

One minor workaround that's been mentioned is to load a save that is on the Geoscape, THEN load the GC mission on the tropical/swamp map, and then attempt to finish the mission without attempting to reload any saves.

Also, the game appears to freeze under certain conditions that I think relate to suppression that I've been unable to fully discern while on tropical/swamp maps (and I presume, ALL maps when you have Ultimate Ambient Sounds enabled); it seems to happen most consistently if using a weapon with large bursts, like vehicle-mounted MG or an LMG, though I've also seen it happen with rockets or in circumstances where more than one unit (friendly and enemy, and including already suppressed units) *might* have become suppressed (impossible to be sure because... well, the game freezes!).

Fortunately, I think I just now managed to discover a workaround for the Tropical/Swamp maps at least! I went ahead and renamed the 'sounds_gc.xml' file in Xenonauts\assets\mods\Tropical and Swamp Tileset to try to disable the ambient sounds and it appears to have made all of the above issues disappear. Saves now load from tropical/swamp maps, game correctly transfers to Geoscape and the suppression freezes I've described appear to have disappeared as well. I'm still doing some testing to see if this might introduce other issues on tropical and swamp maps, but so far I've not encountered any.

Hope this helps anyone else experiencing this incredibly frustrating issue.

After reading this i just want to throw this out there.

I made a quick glance over the sounds_gc.xml to find some obvious bugs and ... i there seemed to be more than, a lot. Not obvious straight ones you know but - a lot which can cause something.

Policenaut1.png

and

Policenaut2.png

 

All in all i believe it would be a wonder if this wouldnt cause problems.

 

>>> Please dont code sloppy <<<

 

Like someone else said the sound system in xenonauts is a "half ass baked shit" which breaks at any given moment, dont put more pressure on it than it can carry. The modmerge system is not user bug free either.

 

 

2 hours ago, Policenaut said:

You can post it if you want. I have a version of the tropical tileset without the ambient sounds that I'm probably going to upload and I'll update the UAS to include them instead.

The modmergeattribute="name" without a modmerge="" were added because the game would complain otherwise, from what I get it just automatically adds an modmerge="insert" when you don't specify it. I'll add modmerge="insert" to avoid problems though.

About the repeattime="0-0" I don't know if changing it to repeattime="0" will make it crash less. I was just following the structure of the other repeattime entries which is repeat randomly between x and y seconds and since I want the sound to loop I put 0-0 there. Changing it to only have one number could break it. Worth experimenting with though.

The last one is similar to the first. Without it wouldn't work and complain so I added that and it worked. I'll change it to modmerge="insert" instead.

Thanks for sharing this but I personally believe changing these won't eliminate the crashing, but it's still worth doing to put less stress on the engine. I will upload fixed versions to steam/nexus as soon as I can. You can quote this message as well.

Cheers.

 

Just now, Charon said:
2 hours ago, Policenaut said:

The modmergeattribute="name" without a modmerge="" were added because the game would complain otherwise, from what I get it just automatically adds an modmerge="insert" when you don't specify it. I'll add modmerge="insert" to avoid problems though.

This is the problem i pointed out.

The game is buggy about automatically adding more than 1 single command. So my guess is that if you automatically want to use 2 different commands in the same file, .. its not optimal, because ... it has problems to automatically use 2 commands.
I think you know this but the possible commands for automatical adding are "insert" and "update", non excel xml files dont really automatically use "replace".
So if you have a file which automatically only "update"s OR "insert"s it should be fine (like the gameconfig which doesnt need a command anywhere since it can only "update" existing code anyway )

Anyway, always try to use manual commands to tell the game what it should be doing.

2 hours ago, Policenaut said:

About the repeattime="0-0" I don't know if changing it to repeattime="0" will make it crash less. I was just following the structure of the other repeattime entries which is repeat randomly between x and y seconds and since I want the sound to loop I put 0-0 there. Changing it to only have one number could break it. Worth experimenting with though.

There is not a single example of this in ANY vanilla files.

This is why i pointed it out.

Here are some example which you should use.

sound.xml


  <Sound name="AirCombatMusic" volume="0.7" repeattime="0" group="2" comment="Played while the air combat lasts.">
      <Wave>audio/music/Air Combat 1.ogg</Wave>
      <Wave>audio/music/Air Combat 2.ogg</Wave>
  </Sound>

sound_gc.xml

... and theres not a single example for a repeattime="" in the GC file. This could be another bug source. Heres an example of an correct one, which supposely loops on its own.


    <Sound name="GC Music" volume="0.7" group="2" comment="Music played during the GC missions">
      <Wave>audio/music/Ground Combat Day 1.ogg</Wave>
      <Wave>audio/music/Ground Combat Day 2.ogg</Wave>
     <Wave>audio/music/Ground Combat Day 3.ogg</Wave>

... and no sign of any repeattime. Much less than a 0-0.

 

2 hours ago, Policenaut said:

The last one is similar to the first. Without it wouldn't work and complain so I added that and it worked. I'll change it to modmerge="insert" instead.

Sometimes the log doesnt report an error anymore because its a bug it cant catch. Dont trust the logerror too much to ultimately correct to show ALL bugs. There are a lot of errors which dont get reported namely the "additional code line" error and the "Matching not found" error.

2 hours ago, Policenaut said:

Thanks for sharing this but I personally believe changing these won't eliminate the crashing, but it's still worth doing to put less stress on the engine. I will upload fixed versions to steam/nexus as soon as I can. You can quote this message as well.

Im not saying your mod is broken per se, im saying that the game seems to break over it at one point. Maybe on weaker pcs or something like that. And all of this has to do with sloppy coding.

 

Link to comment
Share on other sites

@Solver

I think I found the cause of crashing. It is the group="2" element in the ambient sounds entries that marks them as "music". Since the game is only supposed to play one music file at a time adding more might cause a memory leak. I tried changing them to use group="1" which is used for all non music sounds. This seemed to fix the crashing and also the bug that made Geoscape music not play after GC missions in the experimental xenonauts.exe you posted in the 0.34.2 thread.

I will update my mods with this fix and I suggest that the ambience forest mod included with X:CE gets this fix as well and that the ambient sounds commentary in sounds_gc.xml is updated.

*Edit: The geoscape music bug still happens, scratch that. I can't seem to replicate the crashing on the laptop I'm using now though so I will do some further testing on the PC which I actually experienced the crashing on, before I upload this potential fix.

Edited by Policenaut
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...