Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

Using the structural imager makes you learn an invalid spell that causes a segfault when cast.

Open AmeNyaa opened this issue 1 year ago • 2 comments

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

Pandora-trimmed.tar.gz

Steps to reproduce

  1. Spawn a Structural Imager
  2. Reload it with a battery
  3. Use the Imager

Expected behavior

I kinda wish it didn't do that

Screenshots

image image image image image image

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

crash.log debug.log

AmeNyaa avatar May 13 '24 16:05 AmeNyaa

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

Amnestasia avatar May 13 '24 22:05 Amnestasia

Using wands from magiclysm also make this bug.

Cupidatis avatar May 14 '24 01:05 Cupidatis

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!

RenechCDDA avatar May 15 '24 09:05 RenechCDDA