OpenXcom Forum

OpenXcom => Troubleshooting => Topic started by: Surrealistik on August 06, 2013, 08:55:06 am

Title: Chryssalid Crash
Post by: Surrealistik on August 06, 2013, 08:55:06 am
Game seems to crash after a trooper survives being attacked by a Chryssalid, then kills it with reaction fire.
Title: Re: Chryssalid Crash
Post by: Danny on August 06, 2013, 09:01:34 am
Lol, I guess Chrysalids don't want to be nerfed so they just crash your game... XD
Title: Re: Chryssalid Crash
Post by: Surrealistik on August 06, 2013, 09:13:27 am
Lol, I guess Chrysalids don't want to be nerfed so they just crash your game... XD

My thoughts exactly.
Title: Re: Chryssalid Crash
Post by: Warboy1982 on August 06, 2013, 10:48:54 am
got a saved game i can use to replicate it?
Title: Re: Chryssalid Crash
Post by: Surrealistik on August 06, 2013, 06:40:08 pm
This happened during a quick battle unfortunately.
Title: Re: Chryssalid Crash
Post by: Warboy1982 on August 07, 2013, 08:24:15 am
you can still save during a quick battle, but i'll try to look at this if i can set it up
Title: Re: Chryssalid Crash
Post by: Nikwuz on September 26, 2013, 06:13:30 pm
I think I have the same problem. But my game always crashes when a Chrysalid is killed or stunned.
Reloading from a previous game state before the mission is even available doesn't help.

OS: Windows 7 x64
XCom version: 1.4, patched from 1.2/1.0 with files from www.strategycore.co.uk
OpenXcom versions: 0.9 and nightly 2013_09_26_1659

Should I upload any files?
Title: Re: Chryssalid Crash
Post by: kevL on September 26, 2013, 06:48:25 pm
i got a crash too..

If anyone wants to play around with chryssalids and zombies, here they are (attached)


 :o
Title: Re: Chryssalid Crash
Post by: redv on September 26, 2013, 11:50:59 pm
kevL, this savegame crashes because ruleset don't have armor "SNAKEMAN_ARMOR3". May be you use modified ruleset.
Title: Re: Chryssalid Crash
Post by: kevL on September 27, 2013, 01:40:16 am
sorry bout that,

I removed the snakes from the .Sav -- hopefully that'll do it.
Title: Re: Chryssalid Crash
Post by: Nikwuz on September 27, 2013, 09:11:15 am
FYI, I didn't modify any rulesets. And I noticed, the game does not crash if the Chrysalid dies from an explosion. Thought I'd tested that already... Something to do with the death animation?
Title: Re: Chryssalid Crash
Post by: kevL on September 27, 2013, 03:07:38 pm
Could be. When a unit dies from an explosion it's coded not to play the collapsing animation and instead goes quickly to STATUS_DEAD. then handles it from there

it may have something to do with Status (which relates closely to animation during the death sequence, and beyond that once the animation is done),

or perhaps the variables that pass around information about infections & transformations (https://youtu.be/SmrdcEmHQ0Q) (vid).
Title: Re: Chryssalid Crash
Post by: Nikwuz on October 10, 2013, 02:42:46 am
I found the solution to my particular problem, finally. It seems I have messed up when patching the original Xcom files from version 1.0 to 1.2. I am surprised the game ran at all.

My Solution:
Check if the file "%OPENXCOMFOLDER%\data\units\chrys.pck" has a size of 23504 bytes. The file should be 24897 bytes large when including the death sprites. Redo all the patches if the file is smaller and copy the needed folders into your "%OPENXCOMFOLDER%\data" folder again, voila.

tl;dr:
After some debugging I found out that the Chrysalid SurfaceSet only had 224 frames and that OpenXcom attempted to recover the death animation frames above that value causing an unhandled exception at UnitSprite.cpp line:1088:
Code: [Select]
void UnitSprite::drawRoutine7()
{
...
torso = _unitSurface->getFrame(die + _unit->getFallingPhase());
torso->blit(this); https:// torso == NULL
...
}
Bomb Bloke's X-Com Toolkit (https://www.strategycore.co.uk/files/bbs-toolkit/) helped to extract the sprites from the .pck files to verify that things were missing.

Sneaky Chrysalids... lets finish this!  8)
Title: Re: Chryssalid Crash
Post by: Warboy1982 on October 10, 2013, 09:42:43 am
interesting, i didn't realize 1.0 had quite so many problems. glad to hear it's all sorted out.
Title: Re: Chryssalid Crash
Post by: viktorcech on October 29, 2013, 08:03:02 pm
ok... solution?
Title: Re: Chryssalid Crash
Post by: SupSuper on October 29, 2013, 09:02:43 pm
You're using an old original UFO version, you need to apply 1.2 and 1.4 patches, in that order: https://www.strategycore.co.uk/files/ufo-enemy-unknown/patches/
Title: Re: Chryssalid Crash
Post by: viktorcech on October 29, 2013, 10:50:14 pm
NO..
not working

again........

SOLUTION?
Title: Re: Chryssalid Crash
Post by: reshacker on March 16, 2014, 09:31:26 pm
It seems to help me copying both files from the patch 1.2 posted in this thread before (UFO1-2/Units/chrys.pck, chrys.tab) into openxcom folder/data/units... Hope its not a solution only for me ;) Enjoy..