Project

General

Profile

Bug #4111

Crash when mouse over soulgem with a now-missing soul

Added by Dark Locq 8 months ago. Updated 3 months ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Game Mechanics
Target version:
Start date:
09/18/2017
% Done:

100%

Reproducibility:
Always
Operating system:
Other
Severity:
Critical

Description

Conditions:
  • Install a creature mod.
  • Soul trap a creature from that mod.
  • Save and shut down the game.
  • Remove the mod.
  • Restart the game.
  • Mouse over a soul gem with that creature's soul in it, in inventory (personal or container). Might also happen if the gem is on the ground.
Result:
  • Crash to desktop with a pop-up error dialog like: OpenMW: Fatal error Creature '[id of creature here]' not found, as soon as the game tries to show the "tooltip" giving the name of what's in the soul gem.
This is REALLY not graceful. Expected behavior range would be any of the following:
  • Auto-remove soul gems with souls that can no longer be identified.
  • Replace them with empt soul gems of the same type.
  • Keep them as-is (same point value), except replace the creature ID with a dummy ID, and a dummy creature name like "[unknown]".
  • Convert to nearest available match (rounding down), e.g. a 71000-point "Foo Monster" no longer available might convert to a 70000-point Spriggan, if you have Bloodmoon installed.
  • Several other possibilities.

Extracting oneself from this situation is problematic. It seems the only way to do it is to remove one soul gem (or stack thereof) at a time, then save if the game doesn't crash after each removal, restart the game if it does, and do this again and again, until you are finally down to only the glitched one(s) in inventory or in the container, then use the Console to remove the remaining soul gem(s) from inventory (not even sure that will work), or use the Console to delete the container and re-create an empty one. For a big stockipile of gems, this could take hours.

I first noticed this in March, and forgot about it, but it just happened again today with a nightly build from a few days ago. I've listed reproducibility as "Sometimes", since I'm not sure of all the conditions which might trigger this crash. I doubt this is Mac-specific, but I listed it as Operating system: MacOS, since that's what I'm using.


Related issues

Related to OpenMW - Bug #2772: Non-existing class freezes the game Confirmed 07/14/2015

Associated revisions

Revision 870c6585 (diff)
Added by scrawl . 3 months ago

Remove missing souls, remove some runaway exceptions (Fixes #4111)

History

#1 Updated by Andrei Kortunov 8 months ago

  • Status changed from New to Confirmed
  • Reproducibility changed from Sometimes to Always
  • Operating system changed from MacOS to Other

How does original Morrowind behave in this case?

A note: you can just use At_Galbedir.omwsave from #4032 to reproduce this bug.

#2 Updated by scrawl . 8 months ago

How does original Morrowind behave in this case?

Is that really relevant here? Removing a mod is not something that happens during gameplay, anyway.

Our normal policy is on loading saves the engine checks for any no-longer existing references, prints a warning then replaces with a null reference. (From OP's list, that would be 'Replace them with empt soul gems of the same type.'. The other options aren't really possible because the point value isn't stored with the soul gem, it's derived from the creature which we no longer know).

Here and here is where objects are loaded and the 'soul exists' check could be added.

I'd also suggest the tooltip code should be updated to not fail, because a non-existing soul could still happen if bad content files are loaded.

#3 Updated by scrawl . 8 months ago

  • Related to Bug #2772: Non-existing class freezes the game added

#4 Updated by Dark Locq 3 months ago

It's gotten much worse in 0.43; now the game is apt to just crash to desktop without opening inventory/container with such a soul gem, but right at the attempt to open a savegame.

Quick test case: Install the very simple three-room dungeon Halls of Destiny a.k.a. TheDungeon v1.0 [TB+BM] by Demon_Xen (http://mw.modhistory.com/download-31-12337) which is just a demo. Enter to left of the door to the Tribunal Temple in Mournhold. Soultrap some of the mish-mash critters in there. Leave. Quit the game, remove the mod. It will probably CTD on you. If it does not, it should do so as soon as you try to get into your Misc. inventory where the soulgems with the missing creatures are, and attempts to use one directly should definitely do it. I got about a dozen crashes this way, and the only solution was to reinstall the mod, then use up or Disable every such soul gem.

This is a more serious problem than it sounds, since someone might play a mod for a day, think "ho hum", remove it with no such soul gems in inventory, then crash out a week later when opening a merchant, because they sold them one of the soul gems and forgot. They would likely have no idea why it was crashing.

We need to have OpenMW replace the missing creatures with some kind of dummy, default entry (and preferably retain the soul value, since the player did the work to get it and we don't like wasting soul gems, most especially if not running Tribunal where that guy sells you as many as you want – in the bare vanilla game, the higher-end soul gems are actually rather rare).

PS: After taking a break from this game I came back to it after the release of 0.43. Under that, the soul gem chest I had, with missing mod creatures in it – the original cause of this bug report being opened – was no longer usable at all. I had to just Disable the entire chest, at the cost of 100+ soul gems (fortunately, the Golden Saints and Ascended Sleepers were in a different box!). My experience with Halls of Destiny came later; I forgot I'd soul-trapped anything in there before removing the mod.

#5 Updated by scrawl . 3 months ago

  • Priority changed from Normal to High
  • Severity changed from Normal to Critical

#6 Updated by scrawl . 3 months ago

  • Target version set to openmw-0.44

I couldn't see any crash. The crash was probably a side effect of the issue already fixed in d9d8de306192a21c216d3dfdab6baadc693eaa05 .

The latest commit removes the exception that caused the crashes (or after d9d8de306192a21c216d3dfdab6baadc693eaa05 , the spam in the log file). Also, when loading a save game, souls that no longer exist will be removed and a warning will be printed. Like I said earlier, it's not possible to add a dummy creature with the same value because the value is only stored in the creature itself which we no longer know.

#7 Updated by scrawl . 3 months ago

  • Status changed from Confirmed to Closed
  • % Done changed from 0 to 100

#8 Updated by Dark Locq 3 months ago

I'll look for a new Mac nightly and give that a shot.

I understand now what you mean about "not possible to add a dummy creature with the same value because the value is only stored in the creature itself". Will assume "souls that no longer exist will be removed" will deal with it. I wonder about "a warning will be printed", and what will happen with the affected soul gems. I guess I'll see soon enough!

#9 Updated by Alexei Dobrohotov 3 months ago

  • Assignee set to scrawl .

#10 Updated by scrawl . 3 months ago

I wonder about "a warning will be printed", and what will happen with the affected soul gems.

Like I said, it removes the soul. You can then capture a new soul with the gem.

Also available in: Atom PDF