Project

General

Profile

Bug #4066

TopicInfo with player->PositionCell in Script Text causes CTD

Added by David Walley 18 days ago. Updated 16 days ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
09/02/2017
% Done:

0%

Reproducibility:
Always
Operating system:
Other
Severity:
Normal

Description

Although the Ring of Teleportation is marked as "working" in the Mod Compatibility testing, I get a consistent CTD with it. Available at http://www.nexusmods.com/morrowind/mods/44642

No crash log, and nothing useful in the openmw.log.

Script text for each destination is of form:
Goodbye
Player->PositionCell -36347, 78901, 1726, 240, "Bal Isra"

Moving the PositionCell out to a separate script is a possible workaround, and eliminates the CTD, but it's clumsy and leaving a potential CTD in place seems like a bad idea.

I don't know why it apparently works for others - possibly OS. I've tested it with/without other mods, and on various versions from 0.38 to recent nightly.

test.omwaddon - npc "tester" to demonstrate problem (921 Bytes) David Walley, 09/02/2017 09:53 PM

crash.log View (33.4 KB) Andrei Kortunov, 09/03/2017 08:14 AM

History

#1 Updated by Miroslav Remák 17 days ago

Are you sure you've linked to the correct mod? The one provided does not use dialogue or the Goodbye instruction.

#2 Updated by David Walley 17 days ago

Apologies - I was testing an older mod of the same name, by mistake. I will try to track down the source for it.

#3 Updated by David Walley 17 days ago

Should be this one - www.nexusmods.com/morrowind/mods/406

I wouldn't recommend it - the system of calling a travel agent, then talking to him, seems far too complicated. But the fact that it apparently causes a CTD is worrying.

At least this explains why I was getting different results...

#4 Updated by David Walley 17 days ago

Here is a very simple example - file test.omwaddon attached

placeatpc tester 1 100 0
select tester in the console and addtopic "Teleport"
select "Teleport" in dialog
"Loading Area"
CTD

#5 Updated by Andrei Kortunov 17 days ago

  • File crash.log View added
  • Status changed from New to Confirmed
  • Priority changed from High to Normal
  • Operating system changed from Windows to Other

Confirmed on Linux. I attached the crash.log.

#6 Updated by scrawl . 16 days ago

Looks like we crash on a mouse button released event for an already deleted widget (the topic button).

  • Mouse button click
  • Close dialogue (deleting the topic name widget), load new cell
  • Mouse button release on deleted widget -> crash

Note that MyGUI, like most GUI's, uses a 'deleteLater' approach to prevent against this in most cases (i.e. widget deletions are queued to run on the start of the next frame), but the loading screen is also a frame and deletes the widget in this case.

I've verified this by commenting out the 'updateTraversal' in loadingscreen.cpp, i.e. no longer calling MyGUI frame update so that the widget is not deleted, this worked around the crash.

This is another one of those cases where I'm wondering if changing cells / starting a loading sequence from any random callstack like we currently do is really a good idea. Instead we could queue up cell changes to be processed at the start of the next frame. But do we risk script compatibility issues with this? How does the original engine do it?

#7 Updated by Chris Robinson 16 days ago

scrawl . wrote:

This is another one of those cases where I'm wondering if changing cells / starting a loading sequence from any random callstack like we currently do is really a good idea. Instead we could queue up cell changes to be processed at the start of the next frame. But do we risk script compatibility issues with this? How does the original engine do it?

Other bug reports and issues seem to concur with queueing a cell change to happen at least one frame later. See:
https://github.com/OpenMW/openmw/pull/1378
https://bugs.openmw.org/issues/3533

Changing the player's location in the middle of an update, whenever a teleport or travel action is triggered, does seem to be a problem waiting to happen since the player and world can change at almost any time behind your back. Having a single point in the update procedure to do it will ensure the player cell and world state change in a controlled manner.

Also available in: Atom PDF