#983 UG sometimes passes EntityPointers to DataHandle instead of Entities
Metadata
Property | Value |
---|---|
Reported by | Steffen Müthing (steffen.muething@iwr.uni-heidelberg.de) |
Reported at | Nov 30, 2011 17:53 |
Type | Bug Report |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Last edited by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) |
Last edited at | Dec 16, 2011 13:02 |
Closed by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) |
Closed at | Dec 16, 2011 13:02 |
Closed in version | Unknown |
Resolution | Fixed |
Comment | patch merged into trunk |
Description
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.