ESM effects with invalid indices are not handled gracefully

Issue Description

The game starts, shows Bethesda opening, shows a splash screen with all my esps loading at the bottom, then crashes and gives me this error message. Still works perfectly when I try it on .50. Couldn't find anything else about it online.

Screenshot 2026-04-16 000604.png

Steps to Reproduce

Launching the game through openmw.exe or openmw-launcher.exe

System Information

  • OpenMW Version:

    .51 RC1

  • Operating System & Version:

    Windows 11 ver 25H2 OS Build 26200.8246

  • GPU:

    NVIDIA GeForce RTX 3050 4GB Laptop GPU

  • Morrowind Version:

    GOG

  • Language:

    English

  • Addons:

    Tribunal, Bloodmoon

Mods

  • Are you using mods? Yes
  • Are you using any shader mods? Yes
  • Does it happen in a clean vanilla install? Untested

Logs and Settings

settings.cfg

openmw.cfg

openmw.log