Event handlers are called while trying to load bad save file

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Player701
 
 
Posts: 1640
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Contact:

Event handlers are called while trying to load bad save file

Post by Player701 »

The title of this thread is yet another unfortunate victim of the character limit.
The proper title should be: "GZDoom calls event handlers while trying to load a save file with unknown classes".

While attempting to load a save file that has references to unknown class types, GZDoom will try to call local event handlers that are present in the save file. This can lead to unexpected ZScript errors popping up because these handlers don't seem to be initialized properly.

Steps to reproduce:
  1. Download test1.wad and run it with Doom II MAP01.
  2. Save the game and quit.
  3. Download test2.wad and run GZDoom with it.
  4. Load the save file that was made on step 2. GZDoom will print some messages to the console, and the last line will be "OnRegister". This message is produced by the TestEventHandler that is present in the save file. Note that GZDoom will also crash, though it is probably due to a different issue.
Tested with GZDoom g4.5pre-140-ge74b9f195
Attachments
test2.wad
(251 Bytes) Downloaded 21 times
test1.wad
(295 Bytes) Downloaded 19 times
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Event handlers are called while trying to load bad save

Post by Graf Zahl »

It now performs a proper abort of the loading process when the object deserializer fails.
Post Reply

Return to “Closed Bugs [GZDoom]”