I finally found the Nasal memory corruption bug this morning. I was right that it was triggered by garbage collection, but it wasn't in the Nasal code. The FGBinding implementation was holding a SGPropertyNode* and assuming that its callees would never try to use the SGPropertyNode_ptr interface to refcount it. Nasal did, which caused the node to be prematurely freed. Trivial fix; horrific debugging effort. :(
So I've started checking in my Nasal control/input changes. The keyboard bindings are first, because they're easier to test. I'll get to the joystick bindings as soon as I can. With one or two exceptions, nothing should be visibly different to the user. Notable changes: + The v/V bindings for stepping through views are no longer hardcoded in the XML, and pop up a nice eye-candy label to tell you what view you have selected. I'll leave it to someone else to come up with a translation of "Chase View wo yaw" :) + Flap steppings are now settable per-aircraft. You can have as many as you like; the up/down flaps bindings do the right thing. I set up a sample in the 747-yasim-set.xml configuration. The syntax is very simple (I have no idea if these values are right, though): <flaps> <setting>0.00</setting> <setting>0.01</setting> <setting>0.02</setting> <setting>0.05</setting> <setting>0.10</setting> <setting>0.33</setting> <setting>0.67</setting> <setting>1.00</setting> </flaps> There is compatibility code in place so that aircraft without a "/sim/flaps[n]" declaration will get the old 0.0/0.33/0.66/1.0 steppings. Note that only the *keyboard* bindings are currently using this code. + Engine settings automatically detect and set properties for the correct number of engines. No more need to duplicate XML bindings for a "maximum" number. The XML files are a *lot* smaller for this. + The "popup tip label" used for the zoom and (now) view change code is available for general use as "gui.popupTip('My tip message');". + There is a "slewProp()" implementation that handles realtime-based motion of property values. This will eliminate the framerate dependencies of trim and view direction changes for joystick handlers. Note that this is *not* used by the keyboard handlers, becuase the OS generates its own key repeats that we'll have to turn off first. I've tried to test this, but something probably slipped through. Let me know if I broke something. I'll hopefully have a chance to work on the joystick bindings tonight. Andy _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel