Using the structural imager makes you learn an invalid spell that causes a segfault when cast.
Describe the bug
When I used the structural imager on the lastest experimental version, I stumbled upon this bug. While it's not really making the game unplayable, it's filling my spell list with junk that crashes the game. I tried to edit it out with the debug menu, but it also causes a segmentation fault. I tested it on my save as well as on a brand new save.
Attach save file
Steps to reproduce
- Spawn a Structural Imager
- Reload it with a battery
- Use the Imager
Expected behavior
I kinda wish it didn't do that
Screenshots
Versions and configuration
- OS: Windows
- OS Version: 10.0.19045.4291 (22H2)
- Game Version: cdda-experimental-2024-05-13-0447 81ede3c [64-bit]
- Graphics Version: Tiles
- Game Language: English [en]
- Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], Portal Storms Ignore NPCs [personal_portal_storms], Slowdown Fungal Growth [no_fungal_growth], Aftershock [aftershock], Bionic Professions [package_bionic_professions], Magiclysm [magiclysm], Mind Over Matter [mindovermatter], Xedra Evolved [xedra_evolved], No Hope [no_hope], Mythical Martial Arts [MMA], Bombastic Perks [bombastic_perks], Stats Through Kills [stats_through_kills] ]
Additional context
Dealt with this before, forgot to make a bug report so thankfully someone else brought it up.
Its not a Magiclysm issue, its from Aftershock
Following the aforementioned steps leads to the same result.
Doing so again without Magiclysm also led to the same results, further showing it being an Aftershock issue.
/confirm
Using wands from magiclysm also make this bug.
Structural imager is in fact, Aftershock content not Magiclysm. Bit of a mistake on the tags there.
This was introduced by #73325. It should check if the spell is known/exists before trying to get it.
known_magic::get_spell is also returning a reference to a spell that might not exist. Wow, that is also scary!