MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003160VCMIMechanics - Battlespublic2020-12-13 07:582024-01-30 19:17
ReporterSiegfried 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionopen 
PlatformUbuntuOSLinuxOS Versionvarious
Product Version 
Target VersionFixed in Version 
Summary0003160: Crash on some battle actions
DescriptionThe bug is well reproducible, but it takes some time of gameplay to get to it. The bug is: If an experienced stack, that casts some magic before attack, attacks a weak stack, then it may be that this magic casting already kills the stack. Now if then after that magic the original attack takes place, this affects an already dead (aka no more existent) stack. This immediately crashes the game with a memory access violation.
This mostly happens with Gogs and Liches. F.ex. Gogs cast fireball before attacking. If that fireball already kills the stack, then the following original attack crashes the game.
I assume that a stack, that gets killed, is removed (the object is deleted). So the pointer to the object is now invalid. The subsequent attack uses this invalid pointer and so crashes the game.
Suggestion: When killing a stack, after deleting the object, set the pointer to NULL. And then before any action, check for NULL pointer, and if so, just do nothing.
Steps To ReproduceIt takes some time of gameplay to reproduce this. You need an experienced stack of Gogs or Liches. And preferably a big stack. Now take that big experienced stack and attack a weak stack (f.ex. a single level 1 creature). You see the pre-attack magic taking place and killing the stack. Then the subsequent attack crashes the game.
It is not possible to reproduce this bug with a fresh new map on day 1. To reproduce it you need a sufficiently experienced stack. You get easier to a sufficiently experienced stack on big maps.
Additional InformationThis bug seems to not only happen in real battles with at least 1 human player. It seems it also happens in pure AI battles. At least the crash messages and the logs point to this.
TagsNo tags attached.
Attached Files

- Relationships
related to 0002444closedSXX Game crashes when AI wants to fight Mogogs during its turn. 

-  Notes
(0007961)
misiokles (reporter)
2020-12-13 08:46

I can confirm that sometimes it happens.
(0008203)
Povelitel (updater)
2022-03-25 06:49

I tried to reproduce it but couldn't. I suspect the whole thing is in the second shot of the magog, when the creature has already died, and the second shot works.
Or the problem is in the combination of some secondary skills or artifacts.
Do you still repeat this? No matter how hard I tried, I couldn't reproduce it.

- Issue History
Date Modified Username Field Change
2020-12-13 07:58 Siegfried New Issue
2020-12-13 08:46 misiokles Note Added: 0007961
2022-03-25 06:49 Povelitel Note Added: 0008203
2022-03-25 06:49 Povelitel Assigned To => Povelitel
2022-03-25 06:49 Povelitel Status new => feedback
2022-03-28 18:28 Povelitel Relationship added related to 0002444
2022-11-26 14:43 Povelitel Assigned To Povelitel =>
2024-01-30 19:17 Ivan Status feedback => closed

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean