This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I've found two scenarios when setting value to self-reference is causing StackOverflowException: 1. setting self-reference to self, ie: entity.EntityOwner = entity; 2. setting self-reference cycle entityA.EntityOwner = entityB; entityB.EntityOwner = entityA; In my opinion, this two scenarios should either work, or throw some exception (ie. InvalidOperationException). I've attached test solution (references to Mindscape binaries have to be set correctly), look at two tests in LightSpeedTests1.cs: - SettingRelationToSelf - SettingRelationsCycleToSelf I've checked this problem on 4.0.646.18138 and nightly build from 2011-08-25
|
|
|
Thanks for alerting us to this. I've committed a fix to throw a LightSpeedException in the case of setting an entity to be its own parent (we might be able to remove even this exception in future but I can't promise anything). Unfortunately we believe that there is an efficiency impact to doing the same checking for the grandparent case so I have logged a bug for it but do not expect to fix it immediately. Sorry. |
|