View Issue Details

IDProjectCategoryView StatusLast Update
0006489The Dark ModCodingpublic24.02.2024 17:51
ReporterBaal Assigned Tostgatilov  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
OSArch linux 
Target VersionTDM 2.12Fixed in VersionTDM 2.12 
Summary0006489: Volta 2 crashes on mission completion
DescriptionThe mission "Volta 2" crashes before the success screen. There is an unconscious NPC that has to transported to the end of the mission via an elevator. If the NPC is not shouldered but put down on the elevator while it is going up, the mission crashes before the "Mission complete" screen. Savefile provided.
Steps To Reproduce1. Start mission
2. setviewpos -5727 974 292 24 -57 0
3. Wait for new objective
4. setviewpos 3795 5676 -3164 18 160 0
5. Wait for objective complete
6. Shoulder body
7. setviewpos -1643 3574 -1903 4 180 0
8. Drop body on elevator platform
9. Press elevator button
(Displays "MISSION COMPLETED" twice and crashes.)
TagsNo tags attached.
Attached Files
cauldron_end.zip (3,726,499 bytes)

Activities

stgatilov

stgatilov

17.02.2024 09:47

administrator   ~0016514

Last edited: 17.02.2024 10:20

I can't get new objective at Belero.
He falls down but the new objective does not come.

If I still finish the rest of the steps despite no objective, everything finishes fine.
UPDATE: It does not happen if I put the body, trigger the lift but remain downwards.
If I remain on the moving lift, then it crashes.

I'm pretty sure double triggering of "mission success" causes the crash.
stgatilov

stgatilov

17.02.2024 10:26

administrator   ~0016515

Ok, there are two objectives:
  3: If Bellero is alive, get him back to the City. (mandatory)
  11: DUMMY Is player at an exit? (NOT mandatory)

When me and Belero are both on the lift, first objective 3 is marked complete.
At this point CMissionData::Event_ObjectiveComplete checks all the objectives, sees that all mandatory ones are finished and calls Event_MissionComplete.
Soon afterwards objective 11 is marked complete.
CMissionData::Event_ObjectiveComplete again rechecks all objectives, sees that again all mandatory ones are finished and calls Event_MissionComplete again.

It seems after when mission is finished, there is a few seconds of gameplay time.
If some other objective (optional one) gets complete at this moment, then the "win" is triggered second time, which can cause this crash.
stgatilov

stgatilov

17.02.2024 11:02

administrator   ~0016516

Fixed in svn rev 10646.

I simply blocked Event_MissionFailed and Event_MissionComplete if either of them has been called before.
The sad consequence is that it you win a mission but then quickly lose (e.g. kill when you are not allowed to), you'll still get the win outcome.
I think that's OK in general =)

Now the interesting part.
I noticed that sometimes the win objectives don't trigger while lift is moving up.
Usually I can achieve it this way:
  1) Load savegame where player is near the elevator and Belero is lying nearby.
  2) Kill Belero with sword, check that mission is failed.
  3) Load savegame again.
  4) Shoulder Belero, go to elevator, drop body, trigger elevator, move up along with Belero's body.
  5) Elevator is on top and stop moving, no objective has triggered during the lift movement.

Now if I try to move down on the lift, the game crashes (something wrong with locations).
But if I kill Belero with my sword, then I get a lot of objectives triggered!
The first ones are objectives 3 and 11, i.e. the win objectives that were missed while the lift was moving.
The failed objective of killing Belero comes next.
So with my new fix, I still get the Mission Success afterwards =)
Daft Mugi

Daft Mugi

17.02.2024 20:56

developer   ~0016524

I made a mistake with step 5 in the steps-to-reproduce section. I just changed it from "new objective" to "objective complete".

Issue History

Date Modified Username Field Change
16.02.2024 18:39 Baal New Issue
16.02.2024 18:39 Baal File Added: cauldron_end.zip
16.02.2024 21:30 Daft Mugi Steps to Reproduce Updated
17.02.2024 00:51 Daft Mugi Steps to Reproduce Updated
17.02.2024 09:47 stgatilov Note Added: 0016514
17.02.2024 10:20 stgatilov Note Edited: 0016514
17.02.2024 10:26 stgatilov Note Added: 0016515
17.02.2024 11:02 stgatilov Note Added: 0016516
17.02.2024 20:54 Daft Mugi Steps to Reproduce Updated
17.02.2024 20:56 Daft Mugi Note Added: 0016524
24.02.2024 10:29 stgatilov Product Version SVN =>
24.02.2024 10:29 stgatilov Target Version => TDM 2.12
24.02.2024 17:51 stgatilov Fixed in Version => TDM 2.12
24.02.2024 17:51 stgatilov Assigned To => stgatilov
24.02.2024 17:51 stgatilov Status new => resolved
24.02.2024 17:51 stgatilov Resolution open => fixed