ID:2323352
 
Resolved
del(image) did not call the image's Del() proc.
BYOND Version:512.1397
Operating System:Windows 7 Pro 64-bit
Web Browser:Chrome 62.0.3202.94
Applies to:Dream Daemon
Status: Resolved (512.1399)

This issue has been resolved.
Test Environment: http://files.byondhome.com/FKI/Test%20Environment_src.zip

Descriptive Problem Summary:

When using del() on an image object referenced by an improper type-cast, the image object's Del() procs are not called, though it is properly deleted. Example:

var/image/i = new(loc = some_atom, icon = some_ioon)
sleep(1)
var/atom/a = i
del(a)


This may be a deeper issue, as I'm noticing image/Del() is sometimes not called at all, not related to any type-cast issue.

In the reverse case (deleting an atom object type-casted improperly), this does not happen.

Expected Results: For image/Del() to be called when deleted regardless of how it was referenced.

Actual Results: image/Del() is not called when referenced as a non-image.

Does the problem occur:
Every time? Or how often? Every time.
In other games? Yes.
Calling ref.Del(), where ref is an image, calls the correct procs, but the delete is not actually carried out.

This is not a big issue for me personally and I wouldn't rank it as too important. Just thought I would report since it made double-checking object deletions confusing, expecting certain output 'n all.
Type casting has absolutely zero effect on del(). When del() is called it's called on the value stored in that var, not on the var itself. The type of the var isn't anything the engine knows or cares about at that point. Therefore something else has to be going on here.

Cursory examination of your code shows you didn't call ..() in Del(), which is very very bad.

However with that error fixed, there is in fact a bug here. The bug is that image objects don't call Del() properly when the del() instruction is used on them.
Lummox JR resolved issue with message:
del(image) did not call the image's Del() proc.