OpenXcom Forum

Modding => Released Mods => Topic started by: Cmander on September 19, 2022, 09:19:17 am

Title: Crash: Segmentation Fault
Post by: Cmander on September 19, 2022, 09:19:17 am
Hello,
OpenXCOM crashes whenever I try to initiate a crash site or a landing site mission. It happened before and waiting a few ingame hours before starting the mission "fixes" it but I don't want to keep relying on that workaround.
Does not seem to have anything to do with the type of craft used, launching Landing Site 31(North coast of Northern America, near Canada I think, close to Barrow) from the ground craft Lumbridge, Big Sky or Airgame doesn't matter and it crashes anyways.
Version used: Open XCOM Extended 7.7(2022-08-24)
Mods used:
Log File
Quote
[19-09-2022_08-14-59]   [INFO]   Loading begins...
[19-09-2022_08-14-59]   [INFO]   Pre-loading rulesets...
[19-09-2022_08-14-59]   [INFO]   Loading vanilla resources...
[19-09-2022_08-14-59]   [INFO]   Loading rulesets...
[19-09-2022_08-15-01]   [INFO]   Loading rulesets done.
[19-09-2022_08-15-01]   [INFO]   Loading fonts... Font.dat
[19-09-2022_08-15-01]   [INFO]   Lazy loading: 1
[19-09-2022_08-15-01]   [INFO]   Loading custom palettes from ruleset...
[19-09-2022_08-15-01]   [INFO]   Making palette backups...
[19-09-2022_08-15-01]   [INFO]   After load.
[19-09-2022_08-15-01]   [INFO]   Supressed Error for 'STR_MIBTANK_TERRORIST': This unit has a corresponding item to recover, but still isn't recoverable. Reason: (the first 'corpseBattle' item of the unit's armor is marked with 'recover: false'). Consider marking the unit with 'liveAlien: ""'.
[19-09-2022_08-15-01]   [INFO]   Supressed Error for 'STR_MIB_PSI_OPS': This unit has a corresponding item to recover, but still isn't recoverable. Reason: (the first 'corpseBattle' item of the unit's armor is marked with 'recover: false'). Consider marking the unit with 'liveAlien: ""'.
[19-09-2022_08-15-01]   [INFO]   Loading ended.
[19-09-2022_08-15-01]   [INFO]   Data loaded successfully.
[19-09-2022_08-15-01]   [INFO]   Loading language...
[19-09-2022_08-15-01]   [INFO]   Language loaded successfully.
[19-09-2022_08-15-01]   [INFO]   OpenXcom started successfully!
[19-09-2022_08-15-01]   [INFO]   Using software scaling routine. For best results, try an OpenGL filter.
[19-09-2022_08-15-37]   [FATAL]   A fatal error has occurred: Segmentation fault.
[19-09-2022_08-15-37]   [FATAL]   0x5cf040 OpenXcom::CrossPlatform::stackTrace(void*)
[19-09-2022_08-15-37]   [FATAL]   0x5cfeb0 OpenXcom::CrossPlatform::crashDump(void*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[19-09-2022_08-15-37]   [FATAL]   0x41c7f0 signalLogger(int)
[19-09-2022_08-15-37]   [FATAL]   0xa03870 OpenXcom::UfopaediaStartState::think()
[19-09-2022_08-15-37]   [FATAL]   0x7ffcc21fc720 _C_specific_handler
[19-09-2022_08-15-37]   [FATAL]   0x7ffcc2212240 _chkstk
[19-09-2022_08-15-37]   [FATAL]   0x7ffcc21c1070 RtlRaiseException
[19-09-2022_08-15-37]   [FATAL]   0x7ffcc2210e60 KiUserExceptionDispatcher
[19-09-2022_08-15-37]   [FATAL]   0x7b7740 OpenXcom::MapBlock::getSizeX() const
[19-09-2022_08-15-37]   [FATAL]   0x51a440 OpenXcom::BattlescapeGenerator::addBlock(int, int, OpenXcom::MapBlock*, OpenXcom::RuleTerrain*)
[19-09-2022_08-15-37]   [FATAL]   0x51de90 OpenXcom::BattlescapeGenerator::addLine(OpenXcom::MapDirection, std::vector<SDL_Rect*, std::allocator<SDL_Rect*> > const*, OpenXcom::RuleTerrain*, int, int, int)
[19-09-2022_08-15-37]   [FATAL]   0x51de90 OpenXcom::BattlescapeGenerator::addLine(OpenXcom::MapDirection, std::vector<SDL_Rect*, std::allocator<SDL_Rect*> > const*, OpenXcom::RuleTerrain*, int, int, int)
[19-09-2022_08-15-37]   [FATAL]   0x5208f0 OpenXcom::BattlescapeGenerator::generateMap(std::vector<OpenXcom::MapScript*, std::allocator<OpenXcom::MapScript*> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, OpenXcom::RuleStartingCondition const*)
[19-09-2022_08-15-37]   [FATAL]   0x5252a0 OpenXcom::BattlescapeGenerator::run()
[19-09-2022_08-15-37]   [FATAL]   0x6d09d0 OpenXcom::ConfirmLandingState::btnYesClick(OpenXcom::Action*)
[19-09-2022_08-15-37]   [FATAL]   0x5ec390 OpenXcom::InteractiveSurface::handle(OpenXcom::Action*, OpenXcom::State*)
[19-09-2022_08-15-37]   [FATAL]   0x6aa120 OpenXcom::State::handle(OpenXcom::Action*)
[19-09-2022_08-15-37]   [FATAL]   0x5e79c0 OpenXcom::Game::run()
[19-09-2022_08-15-37]   [FATAL]   0x41c950 SDL_main
[19-09-2022_08-15-37]   [FATAL]   0xa053a0 console_main
[19-09-2022_08-15-37]   [FATAL]   0xa054c0 WinMain
[19-09-2022_08-15-37]   [FATAL]   ??
[19-09-2022_08-15-37]   [FATAL]   ??
[19-09-2022_08-15-37]   [FATAL]   0x7ffcc1a57020 BaseThreadInitThunk
[19-09-2022_08-15-37]   [FATAL]   0x7ffcc21c2680 RtlUserThreadStart
[19-09-2022_08-15-40]   [FATAL]   OpenXcom has crashed: Segmentation fault.

Save game: Attached.
To reproduce:

Thanks!

EDIT: I just realized there's a similarly reported issue and it seems to be an issue with FMP. I'm not too experienced with this forum, how do I transfer the subform to that instead?
Title: Re: Crash: Segmentation Fault
Post by: Meridian on September 19, 2022, 10:56:29 am
moved to the "Released mods" subforum
Title: Re: Crash: Segmentation Fault
Post by: Solarius Scorch on September 19, 2022, 02:58:54 pm
Bug reproduced on my end. Sadly, I have no idea what is wrong - it's probably another terrain exception...
Title: Re: Crash: Segmentation Fault
Post by: Meridian on September 19, 2022, 06:14:04 pm
It's the same thing again as with terrains PLAINS_ARBOREAL and MOUNTBD_ARBOREAL before.

This time it is terrain MOUNTBD_ERODED.

Please check all the terrains, or modify the mapscript.
Title: Re: Crash: Segmentation Fault
Post by: Solarius Scorch on September 19, 2022, 06:33:55 pm
It's the same thing again as with terrains PLAINS_ARBOREAL and MOUNTBD_ARBOREAL before.

This time it is terrain MOUNTBD_ERODED.

Please check all the terrains, or modify the mapscript.


Thanks; this is what I expected, but I didn't know which terrain would be the offender. I should check them all by hand, but it's a real pain.

I'll release a fix soon.

EDIT: fix version 3.2.1 released. I also caught and removed two other such errors.
Title: Re: Crash: Segmentation Fault
Post by: Cmander on September 19, 2022, 07:34:34 pm
3.2.1 is not showing the crash. Thank you for the quick fix.