Closed capdevon closed 9 months ago
The class is performing some reflection on the VehicleWheel class. A particular method for getAxle exists, but it takes a Vector3f. I assume there used to be one that didn't, but somehow Minie works differently. Is it safe to just remove this (getAxle), or should it be handled differently?
The code in question:
set.put(makeProperty(obj, Vector3f.class, "getAxle", "Axis"));
I've checked the other methods that the class calls (JmeVehicleWheel), and they still exist in VehicleWheel.
Edit: Some extra context: What this method does is create the "properties" panel with editable fields.
Edit: On closer inspection, getDirection also uses the same pattern.
Edit 3: Nevermind, I found netbeans has some helper methods for this use case. Will fix.
@stephengold Can you shed some light on this? (Sorry for ping)
In jme3-jbullet, VehicleWheel.getAxle()
takes no argument and returns a reference to the internal vector. Returning internal vectors is a common JME practice that looks very efficient but often leads to bugs.
In Minie I long ago changed VehicleWheel.getAxle()
to copy the value of the vector. The Minie version requires a storeResult
argument, which may be null
. I made dozens of similar changes, but in many cases I left a no-arg version in place with a javadoc comment that the version is "for compatibility"---even though the Minie version doesn't behave exactly like the jme3-jbullet version.
I spent some time making a wrapper but it didn't work out. So I've just removed them. They were just getters anyway and doesn't make sense to have in properties?
NPE when the VehicleWheel node is selected in the scene element view tree. If you try to close and re-open the j3o model afterwards, the model view will always be completely black and you will have to restart the SDK.
Stacktrace: