Anonymous Login
2020-08-15 17:37 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001776OpenClonkEngine - C4Scriptpublic2016-07-06 13:02
Assigned ToIsilkor 
PlatformLinux, WindowsOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001776: Crash on calling global func F defined in a definition that is overloaded to not define F (under certain circumstances)
DescriptionThe crash may be reproduced by the attached scenario folder.

The folder contains a definition Zu, which is overloaded in the scenario Test.ocs. The Zu located in the folder defines global func Foo, while Zu in the scenario has an empty script.
The scenario contains a second definition Zz, which can be renamed to be actually loaded and then alters the crash behavior.
Steps To Reproduce1. Start Test.ocf/Test.ocs and get a crash. If not, go to A.
- Rename Test.ocf/Test.ocs/Zz.ocd_ to Zz.ocd
- Start the scenario and do not experience a crash. A script error may be reported that tells that a function Foo contained in Zz.ocd did not return.
- Type LocateFunc("Foo"). It may report it to be located in Zz.
3. Rename Zz.ocd to Zz.ocd_, comment the call to Foo in the scenario script
4. Start the scenario and type LocateFunc("Foo"), it may crash. Same for a call to Foo.

A. If you did not experience a crash, LocateFunc("Foo") reports any random location.
Additional Information36aa83b12865
Tested on Linux and Windows
TagsNo tags attached.
Attached Files




Isilkor (developer)

Overloading a definition unloads the old C4Def, which destroys the C4ScriptHost, but does not remove any global functions created by that C4ScriptHost.


occ (reporter)

Hi! There's been a check-in that references this bug. For more information you can visit the repository browser at this address:

Changeset 7ff8c4f by Nicolas Hake <>
Remove references to functions defined in unloading defs (0001776)


Isilkor (developer)

Last edited: 2016-07-06 13:02

View 2 revisions

Fixed by deleting references to global functions belonging to an unloaded definition.


-Issue History
Date Modified Username Field Change
2016-07-04 20:29 Flinti New Issue
2016-07-04 20:29 Flinti File Added:
2016-07-04 20:57 Isilkor Note Added: 0005179
2016-07-04 20:57 Isilkor Status new => confirmed
2016-07-06 12:59 occ Note Added: 0005181
2016-07-06 13:01 Isilkor Note Added: 0005182
2016-07-06 13:01 Isilkor Status confirmed => resolved
2016-07-06 13:01 Isilkor Resolution open => fixed
2016-07-06 13:01 Isilkor Assigned To => Isilkor
2016-07-06 13:02 Isilkor Note Edited: 0005182 View Revisions
+Issue History