Anonymous Login
2018-12-16 03:47 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001995OpenClonkEnginepublic2018-02-17 19:55
ReporterClonkonaut 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformPCOSWindowsOS Version10
Product Version 
Target Version9.0Fixed in Version 
Summary0001995: CreateObject() does not distinguish between objects and ids
DescriptionIt is possible to pass an object for an id in CreateObject(). There is no warning or error message.

The created object has the passed object as prototype and will horrible break the game as soon as the mother object gets destroyed.
Steps To ReproduceSelect any object and call CreateObject(this);
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0006145

Luchs (administrator)

Should we disallow using objects in CreateObject()? Print a warning? Or remove child objects after the parent object is removed? Or change the child's prototype to the parent object's prototype?

I wonder whether there is any useful application for this.

~0006146

Clonkonaut (developer)

I would suggest disallowing it and print a warning (the standard warning when providing a value of a wrong data type). I don't see any feasible application.
+Notes

-Issue History
Date Modified Username Field Change
2018-02-11 17:48 Clonkonaut New Issue
2018-02-17 17:10 Luchs Note Added: 0006145
2018-02-17 19:55 Clonkonaut Note Added: 0006146
+Issue History