Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / How are functions removed from proplists during Reloading?
- By Foaly [de] Date 2019-05-07 13:57
I'm currently trying to fix 0001428: Definition reloading crashes often

It appears that the problem is that references to some functions don't get removed properly.
However, for some it works.

For example, in Objects.ocd/Environment.ocd/Ambience.ocd, there is an effect that calls a function through a reference stored in a proplist.
This reference is (properly) removed during reloading (although it would properly be better to replace it).

Thus, after reloading, the effect fails:
by: Object(3)->ExecutePlayer(0,[{change_delay = 0, is_active = false}, {change_delay = 0, is_active = true}, {change_delay = 0, is_active = false}, {change_delay = 0, is_active = true}]) (/media/philip/SHARED/Gears/Code/openclonk/planet/Objects.ocd/Environment.ocd/Ambience.ocd/Script.c:184)
by: Object(3)->Execute() (/media/philip/SHARED/Gears/Code/openclonk/planet/Objects.ocd/Environment.ocd/Ambience.ocd/Script.c:166)
by: Object(3)->FxIntScheduleCallTimer(Object(3),effect {Function = Ambience.Execute, Name = "IntScheduleCall", NoStop = true, Pars = [], Repeats = -336}) (/media/philip/SHARED/Gears/Code/openclonk/planet/System.ocg/Schedule.c:95)
ERROR: '->': no function "CheckPlayer" in object "{change_delay = 0, is_active = false}"
Removing effect {Function = Ambience.Execute, Name = "IntScheduleCall", NoStop = true, Pars = [], Repeats = -336}


Now my question is:
Where in the code does this removal happen? I can't seem to find it.

I hope this could give me a clue to finding out, why Objects.ocd/HUD.ocd/ControllerLibrary.ocd/Script.c::Reset() crashes. (In particular, the call to Construction() within Reset crashes).
It is called via a ScheduleCall, which (as far as I understand) should not happen, because the function is already removed.
But it seems the reference stored in the effect is not removed here...

I hope someone can help me here.
Up Topic Development / Developer's Corner / How are functions removed from proplists during Reloading?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill