[archived content]
Dfl /

The Drag/Drop Bug

What: Somehow, when using drag and drop support in DFL, the program will crash randomly.

Cause: I was finally able to trace it back to an object being garbage collected too early. Possibly the dfl.data.IDataObject passed to Control.doDragDrop().

Solution: Prevent the garbage collector from being triggered into a collection cycle while drag and drop operations may be in action or finalizing.

At the very least you could disable Application.autoCollect by setting it to false.

Note that std.gc.disable() appears to let manually triggered collections (e.g. std.gc.fullCollect()) bypass the disabled state and perform a collection cycle.

Note that this is a temporary workaround until a better fix is devised.

Page last modified on February 05, 2007, at 11:23 PM