Open ghost opened 7 years ago
It unfortunately can happen (rarely) because of the terrain random generation. But restarting through the options menu would solve it.
Without -a and without sounds I was able to complete the mission and continue to play for a while after it, so apparently it doesn't crash in this case.
That's good to hear :) So the crashes you were having initially were probably due to the sounds (or something else that was fixed, but sadly I don't think that's likely). The remaining asserts are probably triggered by non-critical issues, which is some relief at least.
So, I've played scenarios a bit again, and here's the situation:
I think it's safe to say there aren't anymore segfaults when sound effects are disabled
The game still segfaults with sound effects (not always giving any output)
The "ploploploploploploplop" sound with a flood of "ALSA lib pcm.c:8306:(snd_pcm_recover) underrun occurred" still happens randomly. It might correspond to a buffering issue or some sort of audio lag since the music also sound like it "slows down" when this happens.
Thank you for the further information :)
It's pretty helpful that we have narrowed the issue down to the sounds, but I still am not sure what could be causing this. Maybe the game is using the wrong sound library version when compiling? Perhaps the reason this sound issue doesn't crop up under Windows is because virtually everybody playing it with Windows aren't compiling the game themselves, but use the executable I compile with the proper libraries.
Here is the output of my last dwarven campaign with sounds enabled : ftp://ftp1.rhizogen.es/ac/bugs/wyrmsun/wyrmsun-output.txt
Thank you! That's very interesting - all sounds that are giving an error for you have a project rate of 11025 Hz. I increased the rate of those files to 44100, let's see if that prevents them from giving an error.
Hum now I had four segfaults with the dwarven campaign, sounds activated, without any error on the output. Maybe there was two bugs and the one that generated the error message was fixed, and the other one wasn't ?
Yes, that's possible. Do you get any asserts if you run the campaign with -a in the command line?
I don't get anything more with -a when it crashes
I managed to reproduce a sound error a few days ago (the one which KroArtem reported in another issue). It happened after a very long time playing a map (over an hour), and the error triggered when the step sound was played. It seems to be an error in the way the original engine set up the sounds, but which became much more probable to happen with Wyrmsun since it adds step sounds (which are played whenever a unit moves a tile). I've committed a potential fix to the issue.
Yesterday I was able to finish the dwarven campaign with sounds enabled, but I wanted to do more testing before considering the issue solved. Here is what I got today when it crashed (dwarven campaign, sounds enabled):
Assertion failed at /mnt/ac/games2test/amd64/wyrmsun/wyrmsun-git/Wyrmgus/src/unit/unit.cpp:408: RefsIncrease: Refs && !Destroyed
(also the game freezes when I try to exit from the menu, I have to kill it from the terminal)
The issue seems to be that corpse units sometimes aren't entirely removed from the game after their animation ends. It doesn't seem to be causing crashes without -a enabled, though.
Is the freeze when exiting always happening to you now?
Hum, I got a weird bug, I finished a campaign objective (from the objectives list in the top left corner), got a dialog line from a hero and clicking on "continue" didn't do anything : the game kept running but I couldn't use the GUI. I think it's because one of the heroes died at the same time (probably the one that was talking to me).
That's possibly the case, yes; which dialogue/objective was that, in particular?
I don't recall
Can a unit die from bleeding ? I remember I had a hero who was very low on health but I garrisoned him in a tower.
Yes, but only if the unit has the "Bleeding" status effect (depicted by a blood drop icon).
ok now there's a crash x)
Assertion failed at /mnt/ac/games2test/amd64/wyrmsun/wyrmsun-git/Wyrmgus/src/unit/unit_save.cpp:352: SaveUnit: unit.Resource.Active == 0
That error keeps happening (sounds enabled):
Sound effect error; Index: 235, Voice: -1, Origin: "", Sample Length: 27648, Sample Filename: "../../Wyrmsun/sounds/misc/burning.wav" Assertion failed at /mnt/ac/games2test/amd64/wyrmsun/wyrmsun-git/Wyrmgus/src/sound/sound_server.cpp:244: MixSampleToStereo32: !(index & 1)
Assertion failed at /mnt/ac/games2test/amd64/wyrmsun/wyrmsun-git/Wyrmgus/src/unit/unit.cpp:408: RefsIncrease: Refs && !Destroyed
it seems it's always the same errors that cause crashes
Do those crashes also happen without the -a option being used in the command line?
without -a there doesn't seem to be any problem
Attached is a savegame file from the 4th quest for Earth that causes a crash about a second after it's loaded: game-crash.sav.gz
I tried playing around with the sound/video settings but none affected it. The log file created is not very helpful either (this is in Windows, I don't know if I can get better logs trying it on Linux). log_of_stratagus_0.log
@Ferk Thank you for the bug report, and for providing a save game! This looks like a quest-specific issue. I intend to (finally) transpose all "quests" into "scenarios" for the next release. That is, make them use the big Earth/Nidavellir maps, with potential for side-quests and so on. With that being done, those quest-specific issues should disappear.
Every time I try to play a solo campaign I never get to the end of the match because wyrmsun or its engine segfaults. It's totally reproducible, the dwarven campaign doesn't last more than a minute or two, and the erala campaign lasts maybe five minutes before segfaulting. I don't know what in the game is causing the segfault.
I'm using the git version (regularly updated, I pull and recompile before every test) on debian testing amd64. I haven't tried the stable release but I've had these problems for month already.