Author Topic: Brutal-OXCE 9.1.4  (Read 58209 times)

Offline donk

  • Sergeant
  • **
  • Posts: 37
    • View Profile
Re: Brutal-OXCE 8.1.1
« Reply #180 on: January 17, 2024, 05:30:00 pm »
I've found a new crash. It has only happened on this mission so I'm not sure if it's XCF or BAI or a combination of the 2 that's the issue, but it happens often enough to post it. I can't replicate it, but it happens more and more frequent the further the mission goes on. So I'll just post the save and if you keep playing it should eventually crash during the enemy turn. For me it crashed when I finished the current turn but it's not guarantied, probably depending on your actions during the turn.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: Brutal-OXCE 8.1.1
« Reply #181 on: January 17, 2024, 09:12:40 pm »
I've found a new crash. It has only happened on this mission so I'm not sure if it's XCF or BAI or a combination of the 2 that's the issue, but it happens often enough to post it. I can't replicate it, but it happens more and more frequent the further the mission goes on. So I'll just post the save and if you keep playing it should eventually crash during the enemy turn. For me it crashed when I finished the current turn but it's not guarantied, probably depending on your actions during the turn.
Oof, this looks like another tough one.

Code: [Select]
[Inline Frame] OpenXcom.exe!OpenXcom::?A0xb83b7f39::getBlockDir(const OpenXcom::TileEngine::VisibilityBlockCache &) Line 273 C++
> [Inline Frame] OpenXcom.exe!OpenXcom::TileEngine::calculateLineTile::__l2::<lambda_1>::operator()(OpenXcom::Position) Line 4556 C++
  OpenXcom.exe!OpenXcom::`anonymous namespace'::calculateLineHelper<`OpenXcom::TileEngine::calculateLineTile'::`2'::<lambda_1>,`OpenXcom::TileEngine::calculateLineTile'::`2'::<lambda_2>>(const OpenXcom::Position & origin, const OpenXcom::Position & target, OpenXcom::TileEngine::calculateLineTile::__l2::<lambda_1> posFunc, OpenXcom::TileEngine::calculateLineTile::__l2::<lambda_2> driftFunc) Line 117 C++
  OpenXcom.exe!OpenXcom::TileEngine::calculateLineTile(OpenXcom::Position origin, OpenXcom::Position target, std::vector<OpenXcom::Position,std::allocator<OpenXcom::Position>> & trajectory) Line 4574 C++
  OpenXcom.exe!OpenXcom::AIModule::hasTileSight(OpenXcom::Position from, OpenXcom::Position to) Line 6424 C++
  OpenXcom.exe!OpenXcom::AIModule::tuCostToReachPosition(OpenXcom::Position pos, const std::vector<OpenXcom::PathfindingNode *,std::allocator<OpenXcom::PathfindingNode *>> nodeVector, OpenXcom::BattleUnit * actor, bool forceExactPosition, bool energyInsteadOfTU) Line 4376 C++
  OpenXcom.exe!OpenXcom::AIModule::brutalThink(OpenXcom::BattleAction * action) Line 3117 C++
  OpenXcom.exe!OpenXcom::AIModule::think(OpenXcom::BattleAction * action) Line 307 C++
  OpenXcom.exe!OpenXcom::BattlescapeGame::handleAI(OpenXcom::BattleUnit * unit) Line 343 C++
  OpenXcom.exe!OpenXcom::BattlescapeGame::think() Line 238 C++
  OpenXcom.exe!OpenXcom::BattlescapeState::think() Line 865 C++
  OpenXcom.exe!OpenXcom::Game::run() Line 336 C++
  OpenXcom.exe!SDL_main(int argc, char * * argv) Line 127 C++

It crashes in some code that checks tile-visibility. The positions from where to where it checks were both valid for me when it crashed, so not something similar to the last one. It's also called by an AI-function I call all the time. And in general this should be called a lot. So it's not obvious why it's crashing.

It then gets into this part of C++ I have difficulty understanding. With the Lambdas. For reasons I don't understand I can hover over some of the parameters to see their values but not all of them.

It could very well be another one of these problems that are caused somewhere else and only crash later due to some memory-corruption. :(

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Brutal-OXCE 8.1.1
« Reply #182 on: January 18, 2024, 12:14:46 am »
It then gets into this part of C++ I have difficulty understanding. With the Lambdas. For reasons I don't understand I can hover over some of the parameters to see their values but not all of them.
I meet problems like this when compiler optimalize out variable I like to look on. some times `volatile` to keep compiler hands away from it.

Offline Belcanzor

  • Sergeant
  • **
  • Posts: 48
    • View Profile
Re: Brutal-OXCE 8.2.0
« Reply #183 on: January 30, 2024, 11:47:38 am »
Question: I got a save where, in enemy turn, I answer fire  (if survive) with that "Hadriex gun" game crash but not always.
Its a heavily modded game.

[30-01-2024_06-45-54]   [FATAL]   A fatal error has occurred: invalid vector subscript
[30-01-2024_06-45-54]   [FATAL]   0x7fefcd0a460 RaiseException
[30-01-2024_06-45-54]   [FATAL]   0x7fefa376690 CxxThrowException
[30-01-2024_06-45-54]   [FATAL]   0x7fef795b530 std::_Xout_of_range
[30-01-2024_06-45-54]   [FATAL]   ??
[30-01-2024_06-45-54]   [FATAL]   ??
[30-01-2024_06-45-54]   [FATAL]   ??
[30-01-2024_06-45-54]   [FATAL]   ??
[30-01-2024_06-45-54]   [FATAL]   ??
[30-01-2024_06-45-54]   [FATAL]   ??
[30-01-2024_06-45-54]   [FATAL]   ??
[30-01-2024_06-45-54]   [FATAL]   ??
[30-01-2024_06-45-54]   [FATAL]   ??
[30-01-2024_06-45-54]   [FATAL]   ??
[30-01-2024_06-45-54]   [FATAL]   ??
[30-01-2024_06-45-54]   [FATAL]   ??
[30-01-2024_06-45-54]   [FATAL]   ??
[30-01-2024_06-45-54]   [FATAL]   ??
[30-01-2024_06-45-54]   [FATAL]   0x76ad6520 BaseThreadInitThunk
[30-01-2024_06-45-54]   [FATAL]   0x76d0c500 RtlUserThreadStart

Again; very modded game, perhaps bug not yours. (X-Files and others mods)

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: Brutal-OXCE 8.2.0
« Reply #184 on: January 30, 2024, 02:41:12 pm »
Well, crashes during gameplay and not right at the start almost certainly are an issue with the engine and not the mods you use. If the mods somehow create scenarios that otherwise don't happen which then lead to crashes, it would still be the responsibility of the engine to find out about that.

Unfortunately all of the things that could help are replaced by "??".

In order to reproduce it I probably need your mods-folder and your options.cfg.

We could also see if the next version fixes it. I'll likely be removing a rather messy part that is relatively new. Before it's introduction I didn't see issues like that.

Offline Belcanzor

  • Sergeant
  • **
  • Posts: 48
    • View Profile
Re: Brutal-OXCE 8.2.0
« Reply #185 on: January 31, 2024, 12:07:11 pm »
No big deal, I reload until it work. This mod worth it.
Edit: If you want the save plus the mod list and personal changes I upload all that.

Offline Belcanzor

  • Sergeant
  • **
  • Posts: 48
    • View Profile
Re: Brutal-OXCE 8.2.0
« Reply #186 on: February 02, 2024, 12:46:21 pm »
There is a way to make stun aliens wait for the next turn (vanilla) once they wake up?
 They wake up and shoot or run immediately and capture them is extremely hard and annoying.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: Brutal-OXCE 8.2.0
« Reply #187 on: February 02, 2024, 09:09:37 pm »
There is a way to make stun aliens wait for the next turn (vanilla) once they wake up?
 They wake up and shoot or run immediately and capture them is extremely hard and annoying.
Since player units also could act immediately when they woke up from stun, I thought it was only fair to allow the AI to do the same. It is one of the arbitrary limitations I removed from the AI.

It would be possible to add this behavior back as an option.

Without code-changes what you can do as a player is to take away their weapon while they are stunned, so they can't pick it up again immediately.

Offline krakp

  • Captain
  • ***
  • Posts: 66
    • View Profile
Re: Brutal-OXCE 8.2.1
« Reply #188 on: February 08, 2024, 01:43:23 am »
Getting a weird crash on 8.2.1. Repro:

1. Start a vanilla game.
2. Sell the Skyranger -> CRASH

The error points to Base.cpp, line 2842
            fac=*(_facilities.end()); // Craft has been found; no more search at facilities

It seems not to be liking something about this pointer - anyone else can repro?

I hope it is not due to my code :-) (I am playing with research at the moment, so I would be quite surprised.... https://openxcom.org/forum/index.php/topic,11805.msg161714.htm)
« Last Edit: February 08, 2024, 02:11:19 am by krakp »

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Brutal-OXCE 8.2.1
« Reply #189 on: February 08, 2024, 02:00:31 am »
Code: [Select]
fac=*(_facilities.end());
This code never can be correct, `end()` is always invalid pointer and you can't deference it.

Offline krakp

  • Captain
  • ***
  • Posts: 66
    • View Profile

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: Brutal-OXCE 8.2.1
« Reply #191 on: February 08, 2024, 10:32:44 am »
Thanks for the report. Yeah, this code is from one of the contributors. Apparently noone has stress-tested it before like this so that bug went under the radar. I'm gonna see if I can fix it this afternoon.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: Brutal-OXCE 8.2.1
« Reply #192 on: February 08, 2024, 07:23:09 pm »
I don't get a crash when selling the Skyranger.

Offline krakp

  • Captain
  • ***
  • Posts: 66
    • View Profile
Re: Brutal-OXCE 8.2.1
« Reply #193 on: February 08, 2024, 07:46:32 pm »
Are you running the release version? Or debug?

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: Brutal-OXCE 8.2.1
« Reply #194 on: February 08, 2024, 08:12:14 pm »
Are you running the release version? Or debug?
I run it right from VS usually.