alice-teacher One last Alice 2 bug

Vanderhyde, James vanderhyde at sxu.edu
Thu Apr 27 16:40:03 EDT 2017


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.

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.

Thanks.

James
—
James Vanderhyde
Assistant Professor, Computer Science
Program Director, Master of Applied Computer Science
Saint Xavier University
3700 W. 103rd St.
Chicago, IL 60655
773-298-3454

Error during simulation.

Alice version: 2.4.3
os.name: Mac OS X
os.version: 10.12.4
os.arch: x86_64
java.vm.name: Java HotSpot(TM) 64-Bit Server VM
java.vm.version: 20.65-b04-468
user.dir: /Applications/Alice 2.4.app/Contents/Required

Throwable that caused the error:
javax.vecmath.SingularMatrixException: cannot invert matrix
at javax.vecmath.Matrix4d.invertGeneral(Matrix4d.java:1996)
at javax.vecmath.Matrix4d.invert(Matrix4d.java:1951)
at edu.cmu.cs.stage3.alice.scenegraph.Transformable.getInverseAbsoluteTransformation(Transformable.java:121)
at edu.cmu.cs.stage3.alice.scenegraph.ReferenceFrame.getTransformation(ReferenceFrame.java:58)
at edu.cmu.cs.stage3.alice.scenegraph.ReferenceFrame.getTransformation(ReferenceFrame.java:69)
at edu.cmu.cs.stage3.alice.scenegraph.Transformable.getTransformation(Transformable.java:152)
at edu.cmu.cs.stage3.alice.scenegraph.ReferenceFrame.getPosition(ReferenceFrame.java:72)
at edu.cmu.cs.stage3.alice.scenegraph.ReferenceFrame.getPosition(ReferenceFrame.java:75)
at edu.cmu.cs.stage3.alice.scenegraph.Transformable.calculatePointAt(Transformable.java:237)
at edu.cmu.cs.stage3.alice.core.Transformable.calculatePointAt(Transformable.java:480)
at edu.cmu.cs.stage3.alice.core.response.AbstractPointAtAnimation$RuntimeAbstractPointAtAnimation.getTargetMatrix33(AbstractPointAtAnimation.java:76)
at edu.cmu.cs.stage3.alice.core.response.AbstractPointAtAnimation$RuntimeAbstractPointAtAnimation.getTargetQuaternion(AbstractPointAtAnimation.java:80)
at edu.cmu.cs.stage3.alice.core.response.OrientationAnimation$RuntimeOrientationAnimation.update(OrientationAnimation.java:64)
at edu.cmu.cs.stage3.alice.core.response.AbstractPointAtAnimation$RuntimeAbstractPointAtAnimation.update(AbstractPointAtAnimation.java:86)
at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.childUpdate(DoInOrder.java:58)
at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.update(DoInOrder.java:101)
at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.childUpdate(DoInOrder.java:58)
at edu.cmu.cs.stage3.alice.core.response.DoInOrder$RuntimeDoInOrder.update(DoInOrder.java:101)
at edu.cmu.cs.stage3.alice.core.response.CallToUserDefinedResponse$RuntimeCallToUserDefinedResponse.update(CallToUserDefinedResponse.java:88)
at edu.cmu.cs.stage3.alice.core.behavior.TriggerBehavior.internalSchedule(TriggerBehavior.java:69)
at edu.cmu.cs.stage3.alice.core.Behavior.schedule(Behavior.java:235)
at edu.cmu.cs.stage3.alice.core.Sandbox.scheduleBehaviors(Sandbox.java:70)
at edu.cmu.cs.stage3.alice.core.World.scheduleBehaviors(World.java:457)
at edu.cmu.cs.stage3.alice.core.World.schedule(World.java:499)
at edu.cmu.cs.stage3.alice.core.clock.DefaultClock.schedule(DefaultClock.java:99)
at edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool$7.run(AuthoringTool.java:723)
at edu.cmu.cs.stage3.alice.authoringtool.util.DefaultScheduler.simulateOnce(DefaultScheduler.java:117)
at edu.cmu.cs.stage3.alice.authoringtool.util.DefaultScheduler.run(DefaultScheduler.java:78)
at edu.cmu.cs.stage3.scheduler.AbstractScheduler.run(AbstractScheduler.java:45)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:205)
at java.awt.Dialog$1.run(Dialog.java:1049)
at java.awt.Dialog$3.run(Dialog.java:1101)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:1099)
at java.awt.Component.show(Component.java:1615)
at java.awt.Component.setVisible(Component.java:1567)
at java.awt.Window.setVisible(Window.java:846)
at java.awt.Dialog.setVisible(Dialog.java:984)
at edu.cmu.cs.stage3.swing.DialogManager.showModalDialog(DialogManager.java:66)
at edu.cmu.cs.stage3.swing.DialogManager.showDialog(DialogManager.java:136)
at edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool.play(AuthoringTool.java:5587)
at edu.cmu.cs.stage3.alice.authoringtool.Actions$16.actionPerformed(Actions.java:181)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6414)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6179)
at java.awt.Container.processEvent(Container.java:2084)
at java.awt.Component.dispatchEventImpl(Component.java:4776)
at java.awt.Container.dispatchEventImpl(Container.java:2142)
at java.awt.Component.dispatchEvent(Component.java:4604)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4279)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4209)
at java.awt.Container.dispatchEventImpl(Container.java:2128)
at java.awt.Window.dispatchEventImpl(Window.java:2492)
at java.awt.Component.dispatchEvent(Component.java:4604)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:690)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Alice version: 2.4.3
os.name: Mac OS X
os.version: 10.12.4
os.arch: x86_64
java.vm.name: Java HotSpot(TM) 64-Bit Server VM
java.vm.version: 20.65-b04-468
user.dir: /Applications/Alice 2.4.app/Contents/Required

cannot invert: NaN, NaN, NaN, NaN
NaN, NaN, NaN, NaN
NaN, NaN, NaN, NaN
NaN, NaN, NaN, NaN

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20170427/b2c5dd96/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: turn to face.a2w
Type: application/octet-stream
Size: 1139884 bytes
Desc: turn to face.a2w
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20170427/b2c5dd96/attachment-0001.obj>


More information about the alice-teachers mailing list