<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="" style="word-wrap:break-word">There is a bug in “Turn to face.” It occurs when the object turns to face the direction it’s already facing, but it only occurs when the object is facing a certain direction relative to the world. It appears to be
 when the object is turned at an angle anywhere between 90 and 135 degrees, to the right or to the left. The position of the object doesn’t matter, just the orientation relative to the world.
<div class=""><br class="">
</div>
<div class="">See attached a2w file for an example. The penguin is to the left and slightly behind the monkey. The monkey repeatedly turns to face the penguin. Run the program and wait for it. The monkey’s orientation is unstable and eventually blows up. One
 time the transformation matrix ended up full of NaNs and an “Error during simulation" occurred; I am pasting the stack trace below as well.</div>
<div class=""><br class="">
</div>
<div class="">Thanks.</div>
<div class=""><br class="">
</div>
<div class="">James<br class="">
<div class="">
<div class="" style="color:rgb(0,0,0); letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px; word-wrap:break-word">
—<br class="">
James Vanderhyde<br class="">
Assistant Professor, Computer Science<br class="">
Program Director, Master of Applied Computer Science<br class="">
Saint Xavier University<br class="">
3700 W. 103rd St.<br class="">
Chicago, IL 60655<br class="">
773-298-3454</div>
</div>
<br class="">
<div class="">
<div class="">Error during simulation.</div>
<div class=""><br class="">
</div>
<div class=""></div>
</div>
</div>
</div>
<div class="" style="word-wrap:break-word">
<div class="">
<div class="">
<div class=""></div>
<div class="">Alice version: 2.4.3</div>
<div class="">os.name: Mac OS X</div>
<div class="">os.version: 10.12.4</div>
<div class="">os.arch: x86_64</div>
<div class="">java.vm.name: Java HotSpot(TM) 64-Bit Server VM</div>
<div class="">java.vm.version: 20.65-b04-468</div>
<div class="">user.dir: /Applications/Alice 2.4.app/Contents/Required</div>
<div class=""><br class="">
</div>
<div class="">Throwable that caused the error:</div>
<div class="">javax.vecmath.SingularMatrixException: cannot invert matrix</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at javax.vecmath.Matrix4d.invertGeneral(Matrix4d.java:1996)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at javax.vecmath.Matrix4d.invert(Matrix4d.java:1951)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.scenegraph.Transformable.getInverseAbsoluteTransformation(Transformable.java:121)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.scenegraph.ReferenceFrame.getTransformation(ReferenceFrame.java:58)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.scenegraph.ReferenceFrame.getTransformation(ReferenceFrame.java:69)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.scenegraph.Transformable.getTransformation(Transformable.java:152)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.scenegraph.ReferenceFrame.getPosition(ReferenceFrame.java:72)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.scenegraph.ReferenceFrame.getPosition(ReferenceFrame.java:75)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.scenegraph.Transformable.calculatePointAt(Transformable.java:237)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.core.Transformable.calculatePointAt(Transformable.java:480)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.core.response.AbstractPointAtAnimation$RuntimeAbstractPointAtAnimation.getTargetMatrix33(AbstractPointAtAnimation.java:76)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.core.response.AbstractPointAtAnimation$RuntimeAbstractPointAtAnimation.getTargetQuaternion(AbstractPointAtAnimation.java:80)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.core.response.OrientationAnimation$RuntimeOrientationAnimation.update(OrientationAnimation.java:64)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.core.response.AbstractPointAtAnimation$RuntimeAbstractPointAtAnimation.update(AbstractPointAtAnimation.java:86)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.childUpdate(DoInOrder.java:58)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.update(DoInOrder.java:101)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.childUpdate(DoInOrder.java:58)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.update(DoInOrder.java:101)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.core.response.CallToUserDefinedResponse$RuntimeCallToUserDefinedResponse.update(CallToUserDefinedResponse.java:88)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.core.behavior.TriggerBehavior.internalSchedule(TriggerBehavior.java:69)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.core.Behavior.schedule(Behavior.java:235)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.core.Sandbox.scheduleBehaviors(Sandbox.java:70)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.core.World.scheduleBehaviors(World.java:457)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.core.World.schedule(World.java:499)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.core.clock.DefaultClock.schedule(DefaultClock.java:99)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool$7.run(AuthoringTool.java:723)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.authoringtool.util.DefaultScheduler.simulateOnce(DefaultScheduler.java:117)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.authoringtool.util.DefaultScheduler.run(DefaultScheduler.java:78)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.scheduler.AbstractScheduler.run(AbstractScheduler.java:45)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventQueue.access$400(EventQueue.java:82)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventQueue$2.run(EventQueue.java:676)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventQueue$2.run(EventQueue.java:674)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.security.AccessController.doPrivileged(Native Method)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:205)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.Dialog$1.run(Dialog.java:1049)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.Dialog$3.run(Dialog.java:1101)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.security.AccessController.doPrivileged(Native Method)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.Dialog.show(Dialog.java:1099)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.Component.show(Component.java:1615)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.Component.setVisible(Component.java:1567)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.Window.setVisible(Window.java:846)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.Dialog.setVisible(Dialog.java:984)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.swing.DialogManager.showModalDialog(DialogManager.java:66)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.swing.DialogManager.showDialog(DialogManager.java:136)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool.play(AuthoringTool.java:5587)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at edu.cmu.cs.stage3.alice.authoringtool.Actions$16.actionPerformed(Actions.java:181)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.Component.processMouseEvent(Component.java:6414)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.Component.processEvent(Component.java:6179)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.Container.processEvent(Container.java:2084)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.Component.dispatchEventImpl(Component.java:4776)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.Container.dispatchEventImpl(Container.java:2142)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.Component.dispatchEvent(Component.java:4604)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4279)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4209)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.Container.dispatchEventImpl(Container.java:2128)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.Window.dispatchEventImpl(Window.java:2492)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.Component.dispatchEvent(Component.java:4604)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventQueue.access$400(EventQueue.java:82)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventQueue$2.run(EventQueue.java:676)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventQueue$2.run(EventQueue.java:674)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.security.AccessController.doPrivileged(Native Method)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventQueue$3.run(EventQueue.java:690)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventQueue$3.run(EventQueue.java:688)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.security.AccessController.doPrivileged(Native Method)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)</div>
<div class=""><span class="x_Apple-tab-span" style="white-space:pre"></span>at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)</div>
<div class=""><br class="">
</div>
<div class="">Alice version: 2.4.3</div>
<div class="">os.name: Mac OS X</div>
<div class="">os.version: 10.12.4</div>
<div class="">os.arch: x86_64</div>
<div class="">java.vm.name: Java HotSpot(TM) 64-Bit Server VM</div>
<div class="">java.vm.version: 20.65-b04-468</div>
<div class="">user.dir: /Applications/Alice 2.4.app/Contents/Required</div>
<div class=""><br class="">
</div>
<div class="">cannot invert: NaN, NaN, NaN, NaN</div>
<div class="">NaN, NaN, NaN, NaN</div>
<div class="">NaN, NaN, NaN, NaN</div>
<div class="">NaN, NaN, NaN, NaN</div>
<div class=""><br class="">
</div>
</div>
</div>
</div>
</body>
</html>