[x3d-public] Problem alert: inconsistent initialization of field values can inadvertently cause many problems

Don Brutzman brutzman at nps.edu
Sat Dec 23 18:09:01 PST 2017


The following patch to Xj3D NPS branch shows a significant general problem.  It looks like many field variables are not reset when a class is initialized (or re-initialized) via the init() method.

Ensuring the ccw fields get reset, in numerous geometry nodes, fixed a variety of puzzling and intermittent bugs.  Thanks Sungmin for your many efforts in that direction.

Further developer distractor is that not all fields are consistently named (ccw has geomCCW and vfCCW, etc.).  Our team has resisted the urge to perform any global refactoring in order to maintain similarity with the original Xj3D codebase wherever possible.

Lack of deliberate field initialization is a major issue that might be the cause of any number of difficulties.  Preliminary examination indicates that a great number of fields are not explicitly set (relying on Java default values) or explicitly reset when initialized, leaving whatever value was in place from prior use.

Thank goodness this implicit issue has been noticed and identified!  Hereby shooting off a "red rocket" that more problems may lurk as a result.

Further Xj3D work is needed to confirm/add correct field initialization.  Contributions always welcome.

On 12/21/2017 9:38 AM, Xj3D SVN repository wrote:
> Subject: [xj3d:code] New commit [r12641] by skwon
> In order to avoid bad initialization of CCW in Appearance, geomCCW(CCW in Geometry) should be initialized as true.
> 
> By skwon on 12/21/2017 17:38
> *View Changes* <https://sourceforge.net/p/xj3d/code/12641/>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
> Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/xj3d/code/
> To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman


More information about the x3d-public mailing list