Anonymous Login
2021-09-29 01:10 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001798OpenClonkEngine - C4Scriptpublic2016-08-27 06:04
Assigned ToSven2 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformVisual C++ 2008OSWindowsOS Version 
Product Version 
Target VersionFixed in Versiongit master 
Summary0001798: Saving references to dynamic proplists created in Definition()
DescriptionWhen proplists (or arrays?) are assigned in Definition(), they are still dynamic proplists and will be saved as such in savegames. When such a savegame is resumed, the proplist is re-created as a copy and the reference is lost. E.g. consider this object script:

''func Definition(def) { = {}; };
func Initialize() { =; AddTimer(this.Timer); }
func Timer() { Log("%v", ==; }''

This will log "true" in the timer, but will switch to "false" when a savegame is resumed.

This is problematic because editor-made sequences in the new qteditor use this exact same paradigm to store and resume progress in sequences.

My proposed solution would be to iterate over the whole proplist+array tree in all definitions after the Definition() calls, freeze them and assign static names (i.e.: Convert them to static proplists+arrays).
TagsNo tags attached.
Attached Files




Sven2 (developer)

Note that if this bug is fixed, default value assignment in enum delegates needs to be changed to do a deep copy. It currently relies on Format("%v", foo) creating a non-frozen copy, which would no longer work if proplists created in Definition() were static.

-Issue History
Date Modified Username Field Change
2016-07-23 14:55 Sven2 New Issue
2016-07-23 14:55 Sven2 Summary Saving references to dynamic proplists containing names => Saving references to dynamic proplists created in Definition()
2016-07-25 03:53 Sven2 Note Added: 0005208
2016-08-27 05:12 Sven2 Assigned To => Sven2
2016-08-27 05:12 Sven2 Status new => assigned
2016-08-27 06:04 Sven2 Status assigned => resolved
2016-08-27 06:04 Sven2 Resolution open => fixed
2016-08-27 06:04 Sven2 Fixed in Version => git master
+Issue History