#983 UG sometimes passes EntityPointers to DataHandle instead of Entities
|Reported by||Steffen Müthing (email@example.com)|
|Reported at||Nov 30, 2011 17:53|
|Version||Git (pre2.4) [autotools]|
|Operating System||Unspecified / All|
|Last edited by||Christian Engwer (firstname.lastname@example.org)|
|Last edited at||Dec 16, 2011 13:02|
|Closed by||Christian Engwer (email@example.com)|
|Closed at||Dec 16, 2011 13:02|
|Closed in version||Unknown|
|Comment||patch merged into trunk|
In the UGMessageBuffer implementations for the new codim 1 communication support in UGGrid, face entities are generated by calling element.subEntity() and passed on to the DataHandle to determine the size of the communication buffer. Unfortunately, subEntity() does not (as the name suggests) return an entity, but an EntityPointer, which needs to be dereferenced before passing it to the DataHandle, as that does in turn expect an Entity reference.
The attached patch fixes the problem.
PS: I hadn't yet thought about that counter-intuitive behavior of subEntity(), but I think this problem makes another good argument for ref-counted, copyable Entity handle objects.