Modified Perk With Conditions: Instant Crash - Why?

Post » Sun Feb 17, 2013 10:44 am

Someone reported an issue with SkyUI that their game was crashing when they opened the inventory when they had their own mod active as well. I debugged it and found it was happening around where EPMagic_SpellHasKeyword is checked. Tracked it down to a perk the user had changed, namely Novice Alteration.

So anyway, I extracted the modified perk, and added it to a new ESP with TES5Edit, CrashMe.esp which can be found http://www.mediafire.com/download.php?j5ln65gc9m2km6d.

If you're interested, you can reproduce the crash as follows:
Spoiler

1) Start a new game (or load an existing save) with http://www.mediafire.com/download.php?j5ln65gc9m2km6d enabled

2) Run the following:
player.addperk F2CA6   ; Novice Alterationplayer.additem 3EB2E 1 ; Blacksmith's Potion

3) Open Inventory, Click Potions, Hover over Blacksmith's Potion (or any other Alteration Potion, I'd assume).
4) The game will crash.

NB: For SkyUI this will crash immediately up on opening the Inventory this isn't the issue here. This is because, on open, we run the function which is called when you hover over an item, for each item in the inventory, so we can request and store the data shown on the ItemCard

Now, I know /very/ little about making changes like this...

TES5Edit says that the file is fine:
[00:00] Checking for Errors in [01] CrashMe.esp[00:00] All Done!

Can anyone see anything obvious that is wrong with the perk modification?
Is EPMagic_SpellHasKeyword the wrong thing to use?
Are you not meant to have keyword checks on perks?

Any comments would be helpful, thanks!

CrashMe.esp can be found http://www.mediafire.com/download.php?j5ln65gc9m2km6d.

(I did find a while ago, someone had modified the BullsEye perk to have, I think,several weapon keyword checks, and again, this caused the game to crash. Is part of the perk system broken that modders should be made aware of?)
User avatar
Blessed DIVA
 
Posts: 3408
Joined: Thu Jul 13, 2006 12:09 am

Return to V - Skyrim