Project

General

Profile

Bug #3898

(mod) PositionCell in dialogue results closes dialogue window

Added by rot tor 4 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
GUI
Target version:
Start date:
06/01/2017
% Done:

100%

Reproducibility:
Always
Operating system:
Other
Severity:
Normal

Description

When using PositionCell to move the player to a different result, the dialogue window gets closed. The drawback is that whatever dialogue line did this can't be read.

(in 0.41. May 04 nightly)


Related issues

Related to OpenMW - Bug #4004: Manis Virmaulese attacks without saying anything Closed 08/06/2017

Associated revisions

Revision b3b7d6aa (diff)
Added by Andrei Kortunov about 1 month ago

Do not make target reference unavailable on cell change (bug #3898)

History

#1 Updated by Andrei Kortunov about 1 month ago

  • Related to Bug #4004: Manis Virmaulese attacks without saying anything added

#2 Updated by Andrei Kortunov about 1 month ago

  • Operating system changed from Windows to Other

This behaviour was added to fix #290. I am not sure if we will change it.

#3 Updated by scrawl . about 1 month ago

Ah yes, another one with an interesting history.

check if the player has changed cell (might completely invalidate any Container/NPC-Ptr the GUI still has)

There was once an idea to implement a garbage collection for MW objects (#357) that would run for example when the player leaves a cell, in order to reclaim memory for MW objects that have been deleted. Therefore, it was declared that any code holding a Ptr to instances in in-active cells should be deemed as unsafe. However, this policy was not really documented and not enforced well, and it was easy to make a mistake anyway, or run into a game mechanic that just plain required using a Ptr to an inactive cell or else have to go through ridiculous hoops.

We are now stuck with many examples of such "unsafe" code, so if we just added the GC now in the way originally intended, I am sure we would have to deal with many difficult to find crashes.

Arguably, that GC isn't really needed because we already have a "GC" that happens when you save and reload the game, and the memory for an object instance is pretty much negligble anyway. The only potential issue I could see is if a mod for some reason created and deleted new instances every single frame, but then again that's not actually resolved by just running GC on a cell change as proposed. If we were to eventually implement a way of reclaiming memory for deleted MW objects (not suggesting nor rejecting that we should), I would probably go for a safer strategy like ref-counting / SharedPtr.

Anyway, TL;DR:

This behaviour was added to fix #290. I am not sure if we will change it.

Yes, we can change it. #290 was for something that's not really relevant anymore, or never was actually.

#4 Updated by Andrei Kortunov about 1 month ago

  • Category set to GUI
  • Status changed from New to Resolved
  • Assignee set to Andrei Kortunov
  • Target version set to openmw-0.43

#5 Updated by Andrei Kortunov about 1 month ago

  • % Done changed from 0 to 100

#6 Updated by Alexei Dobrohotov about 1 month ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF