← Back to team overview

yade-dev team mailing list archive

[Bug 495437] [NEW] crash querying base class indices, if the top-level indexable did a createIndex()

 

Public bug reported:

Material used to call both REGISTER_INDEX_COUNTER(Material) and called
createIndex() in the constructor. The Indexable::getBaseClassIndex
however relies on the fact the that top-level Indexable (Material,
Shape, InteractionGeometry, InteractionPhysics) has negative index
(default), which is violated by createIndex().

it can be fixed by requiring that top-level indexables don't use
createIndex(), but it must be documented somewhere.

** Affects: yade
     Importance: Wishlist
         Status: Confirmed

** Changed in: yade
   Importance: Undecided => Wishlist

** Changed in: yade
       Status: New => Confirmed

-- 
crash querying base class indices, if the top-level indexable did a createIndex()
https://bugs.launchpad.net/bugs/495437
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.

Status in Yet Another Dynamic Engine: Confirmed

Bug description:
Material used to call both REGISTER_INDEX_COUNTER(Material) and called createIndex() in the constructor. The Indexable::getBaseClassIndex however relies on the fact the that top-level Indexable (Material, Shape, InteractionGeometry, InteractionPhysics) has negative index (default), which is violated by createIndex().

it can be fixed by requiring that top-level indexables don't use createIndex(), but it must be documented somewhere.





Follow ups

References