Page MenuHomePhabricator

C# bindings: eo-intro tutorial has an ERROR on shutdown
Closed, ResolvedPublic


Once the eo-intro C# tutorial is fixed (D6505), it can be built and run, but shows and invalid object ERROR on shutdown:

Creating Root...
DBG<67487>:eo lib/eo/eo_base_class.c:2147 _efl_object_constructor() 0x4000000072e1 - Efl.Model_Item.

Creating Child1...
DBG<67487>:eo lib/eo/eo_base_class.c:2147 _efl_object_constructor() 0x4000000076e2 - Efl.Model_Item.

Creating Child2...
DBG<67487>:eo lib/eo/eo_base_class.c:2147 _efl_object_constructor() 0x400000007ae3 - Efl.Model_Item.

Deleting Root...
DBG<67487>:eo lib/eo/eo_base_class.c:2162 _efl_object_destructor() 0x4000000072e1 - Efl.Model_Item.

Deleting Child2...
DBG<67487>:eo lib/eo/eo_base_class.c:2162 _efl_object_destructor() 0x400000007ae3 - Efl.Model_Item.

ERR<67487>:eo lib/eo/eo.c:1888 efl_unref() Eo ID 0x4000000076e2 is not a valid object. Current thread: 0x7fcefea3b700. This ID has probably been deleted or this was never a valid object ID. (domain=0, current_domain=2, local_domain=2, available_domains=[  1 2  ], generation=2e2, id=1d, ref=1)

This tutorials creates a Root object and attaches two children named Child1 and Child2, keeping an extra reference to Child2. It then deletes Root and then Child2.
It can be seen from the log file that Child1 (object 0x4000000076e2) is being deleted too many times.

This does not happen in the equivalent C tutorial, so it seems this is a C# bindings problem.

segfaultxavi triaged this task as TODO priority.

More info: This happens as the C# wrappers are kept alive by the GC and actually deleted only after the call to efl.All.Shutdown().

Once we sort out the interface details we can tackle this.

felipealmeida closed this task as Resolved.Jan 12 2019, 12:09 AM

Duplicate of T7524