View Issue Details

IDProjectCategoryView StatusLast Update
0000345Gameplay + OpenGL[All Projects] Bugpublic2017-02-27 09:51
ReporterZZYZX 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSWindowsOS Version7
Summary0000345: Serializer doesn't check for ZScript class compatibility
DescriptionThere should be something similar to ACS bytecode compatibility check in ZScript, since right now incompatible classes cause various problems (from undefined behavior to crashing), while expected behavior would be "fatal: can't unserialize incompatible zscript entity %classname%".
Steps To Reproduce1. Load ZTEST02.wad
2. summon TestActor
3. Save the game
4. Load ZTEST01.wad

It will crash.
TagsNo tags attached.

Relationships

Activities

ZZYZX

ZZYZX

2017-02-27 05:35

reporter   ~0000798

Last edited: 2017-02-27 05:49

View 2 revisions

Note that this situation (with similarly named classes with completely different hierarchy/contents/whatever) is quite real for a large mod that updates frequently, like D4D, and even GZDoom's own classes should they ever be altered in the future.

ZZYZX

ZZYZX

2017-02-27 05:54

reporter  

ZTEST01.wad (327 bytes)
ZTEST02.wad (417 bytes)
Graf Zahl

Graf Zahl

2017-02-27 07:55

administrator   ~0000799

This problem has been present in one form or another since ZDoom was created. I see no urgency that suddenly has developed now.
Graf Zahl

Graf Zahl

2017-02-27 08:16

administrator   ~0000800

Fixed this particular crash which wasn't lack of handling in the serializer but the inability of the C runtime to handle an exception being called from within a destructor.
ZZYZX

ZZYZX

2017-02-27 09:01

reporter   ~0000801

Last edited: 2017-02-27 09:07

View 2 revisions

>This problem has been present in one form or another since ZDoom was created. I see no urgency that suddenly has developed now.

ZScript was added. With DECORATE, the worst thing that could happen with altered class is messing up the states of the actor, while in ZScript it means that completely different objects are tried to be serialized with unpredictable effects on the mod logic.

This really needs to be handled on the GZDoom side rather than making people remember that savegames+different ZScript mod versions=nono.

Graf Zahl

Graf Zahl

2017-02-27 09:51

administrator   ~0000802

Maybe. I think there needs to be some hash over the actor defaults that gets stored in the savegame as well. But like I said: That has been an even worse problem with the old binary savegame format than it is now.

Issue History

Date Modified Username Field Change
2017-02-27 05:34 ZZYZX New Issue
2017-02-27 05:35 ZZYZX Note Added: 0000798
2017-02-27 05:49 ZZYZX Note Edited: 0000798 View Revisions
2017-02-27 05:54 ZZYZX File Added: ZTEST01.wad
2017-02-27 05:54 ZZYZX File Added: ZTEST02.wad
2017-02-27 07:55 Graf Zahl Note Added: 0000799
2017-02-27 08:16 Graf Zahl Note Added: 0000800
2017-02-27 08:17 Graf Zahl Status new => resolved
2017-02-27 08:17 Graf Zahl Resolution open => fixed
2017-02-27 09:01 ZZYZX Note Added: 0000801
2017-02-27 09:07 ZZYZX Note Edited: 0000801 View Revisions
2017-02-27 09:51 Graf Zahl Note Added: 0000802