Event handlers are called while trying to load bad save file

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

Event handlers are called while trying to load bad save file

Postby Player701 » Wed Sep 16, 2020 1:57 am

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
You do not have the required permissions to view the files attached to this post.
User avatar
Player701
 
Joined: 13 May 2009
Location: Russian Federation
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest