PDA

View Full Version : Lab 3


Petit Suisse
07-30-2015, 11:04 PM
So I have an issue where, when I close down and want to work on my world later, it can't load. I have an additional event and a few whiles in there. This happened yesterday and I thought ok, just make another one. Now my second one won't load, so before I start over on a 3rd version...what could be causing this?

The task is to create a world with a cone and rings falling from the sky, which you catch with the cone. So nothing too crazy.

Petit Suisse
07-31-2015, 12:39 AM
Nooooooooooooooooooooo, I got everything working, closed it and same issue again. Ugh. What is this?




Unable to load world

Alice version: 2.3.5

os.name: Windows NT (unknown)

os.version: 6.2

os.arch: x86

java.vm.name: Java HotSpot(TM) Client VM

java.vm.version: 20.0-b11

user.dir: M:\El Centro College\El Centro Course Files\2015\Semester Summer 2\Programming Logic\Alice2.3\Alice 2.3\Required



Throwable that caused the error:

java.lang.RuntimeException: NoSuchMethodException:class javax.vecmath.Matrix4d

at edu.cmu.cs.stage3.alice.core.Property.getValueOf(P roperty.java:578)

at edu.cmu.cs.stage3.alice.core.Property.decodeObject (Property.java:641)

at edu.cmu.cs.stage3.alice.core.Property.decode(Prope rty.java:656)

at edu.cmu.cs.stage3.alice.core.Element.load(Element. java:1478)

at edu.cmu.cs.stage3.alice.core.Element.load(Element. java:1495)

at edu.cmu.cs.stage3.alice.core.Element.load(Element. java:1495)

at edu.cmu.cs.stage3.alice.core.Element.load(Element. java:1543)

at edu.cmu.cs.stage3.alice.authoringtool.dialog.LoadE lementProgressPane.construct(LoadElementProgressPa ne.java:42)

at edu.cmu.cs.stage3.progress.ProgressPane$2.run(Prog ressPane.java:86)

at java.lang.Thread.run(Thread.java:662)

Petit Suisse
07-31-2015, 12:48 AM
I can't find that in elementdata:

<?xml version="1.0" encoding="UTF-8"?>
<element class="edu.cmu.cs.stage3.alice.core.World" name="world" version="2.001">
<child filename="renderTarget"/>
<child filename="my first method"/>
<child filename="camera"/>
<child filename="light"/>
<child filename="ground"/>
<child filename="cone"/>
<child filename="ring"/>
<child filename="numberText"/>
<child filename="ringCountNr"/>
<child filename="event"/>
<child filename="moveCone"/>
<child filename="ringsDrop"/>
<child filename="event2"/>
<child filename="test"/>
<child filename="event3"/>
<property componentClass="edu.cmu.cs.stage3.alice.core.Sandbox" name="sandboxes">
<item criterionClass="edu.cmu.cs.stage3.alice.core.criterion.InternalRef erenceKeyedCriterion">camera</item>
<item criterionClass="edu.cmu.cs.stage3.alice.core.criterion.InternalRef erenceKeyedCriterion">light</item>
<item criterionClass="edu.cmu.cs.stage3.alice.core.criterion.InternalRef erenceKeyedCriterion">ground</item>
<item criterionClass="edu.cmu.cs.stage3.alice.core.criterion.InternalRef erenceKeyedCriterion">cone</item>
<item criterionClass="edu.cmu.cs.stage3.alice.core.criterion.InternalRef erenceKeyedCriterion">ring</item>
<item criterionClass="edu.cmu.cs.stage3.alice.core.criterion.InternalRef erenceKeyedCriterion">numberText</item>
</property>
<property name="groups"/>
<property name="atmosphereColor">
<red>0.290196</red>
<green>0.490196</green>
<blue>0.8</blue>
<alpha>1.0</alpha>
</property>
<property name="ambientLightColor">
<red>0.2901961</red>
<green>0.2901961</green>
<blue>0.2901961</blue>
<alpha>1.0</alpha>
</property>
<property class="java.lang.Double" name="ambientLightBrightness">1.0</property>
<property class="edu.cmu.cs.stage3.alice.core.FogStyle" name="fogStyle">edu.cmu.cs.stage3.alice.core.FogStyle[NONE]</property>
<property class="java.lang.Double" name="fogDensity">0.1</property>
<property class="java.lang.Double" name="fogNearDistance">1.0</property>
<property class="java.lang.Double" name="fogFarDistance">256.0</property>
<property name="bubbles"/>
<property class="java.lang.Double" name="speedMultiplier">1.0</property>
<property name="eventsStopAscending"/>
<property name="isBoundingBoxShowing">false</property>
<property name="isBoundingSphereShowing">false</property>
<property name="script">java.io.File[script.py]</property>
<property componentClass="edu.cmu.cs.stage3.alice.core.Response" name="responses">
<item criterionClass="edu.cmu.cs.stage3.alice.core.criterion.InternalRef erenceKeyedCriterion"><![CDATA[my first method]]></item>
<item criterionClass="edu.cmu.cs.stage3.alice.core.criterion.InternalRef erenceKeyedCriterion">ringsDrop</item>
<item criterionClass="edu.cmu.cs.stage3.alice.core.criterion.InternalRef erenceKeyedCriterion">test</item>
</property>
<property componentClass="edu.cmu.cs.stage3.alice.core.Behavior" name="behaviors">
<item criterionClass="edu.cmu.cs.stage3.alice.core.criterion.InternalRef erenceKeyedCriterion">event3</item>
<item criterionClass="edu.cmu.cs.stage3.alice.core.criterion.InternalRef erenceKeyedCriterion">event2</item>
<item criterionClass="edu.cmu.cs.stage3.alice.core.criterion.InternalRef erenceKeyedCriterion">event</item>
</property>
<property componentClass="edu.cmu.cs.stage3.alice.core.Variable" name="variables">
<item criterionClass="edu.cmu.cs.stage3.alice.core.criterion.InternalRef erenceKeyedCriterion">ringCountNr</item>
<item criterionClass="edu.cmu.cs.stage3.alice.core.criterion.InternalRef erenceKeyedCriterion">moveCone</item>
</property>
<property name="questions"/>
<property name="textureMaps"/>
<property name="sounds"/>
<property name="geometries"/>
<property name="misc"/>
<property name="isFirstClass">false</property>
<property name="data">
<entry>
<key class="java.lang.String">edu.cmu.cs.stage3.alice.authoringtool.playCount</key>
<value class="java.lang.String">39</value>
</entry>
<entry>
<key class="java.lang.String">edu.cmu.cs.stage3.alice.authoringtool.tabObjects</key>
<value class="java.lang.String"><![CDATA[world.my first method:world.ringsDrop:]]></value>
</entry>
<entry>
<key class="java.lang.String">edu.cmu.cs.stage3.alice.authoringtool.worldOpenTim e</key>
<value class="java.lang.String">6262398</value>
</entry>
<entry>
<key class="java.lang.String">edu.cmu.cs.stage3.alice.authoringtool.saveCount</key>
<value class="java.lang.String">19</value>
</entry>
</property>
</element>

Petit Suisse
07-31-2015, 01:16 AM
Ok, I don't have time to go looking for the error. I'm certain there's a conflict in my events. In this case it's better to start again, and it'll help me learn. I will also only add one event to this version. And if it doesn't work then...I'll come rant on here.

Petit Suisse
07-31-2015, 09:00 PM
Ok, so I emailed our teacher with questions and was given the advice to work on one method at a time, and then to save that as an individual version before I add any other methods, and then do the same with those. That was so helpful to me. I thought my events were causing the run time error, but by working as Tim advised me above, I found out that the trick I was using to keep the ring within the screen, was causing the problem. I had used the property pointofview=position to reset the ring after it dropped so it would always start at the same position. This worked great while the world was open, but then was quite useless, as after closing a world it was no longer accessible. Anyhow after failing what felt like 100 times, I finally have a working version. OH EM GEE!

chickentree
08-02-2015, 01:21 PM
Ok, so I emailed our teacher with questions and was given the advice to work on one method at a time, and then to save that as an individual version before I add any other methods, and then do the same with those. That was so helpful to me. I thought my events were causing the run time error, but by working as Tim advised me above, I found out that the trick I was using to keep the ring within the screen, was causing the problem. I had used the property pointofview=position to reset the ring after it dropped so it would always start at the same position. This worked great while the world was open, but then was quite useless, as after closing a world it was no longer accessible. Anyhow after failing what felt like 100 times, I finally have a working version. OH EM GEE!

Three quick points:

The problem you were having was not you, It was Alice. I am not exactly sure what you were trying to do but Alice should not save a movie and then refuse to open it. I point this out because this type of problem is frustrating and NOT YOUR FAULT.
The best way to get an object back to a specific location is to place a dummy object at the location and then move the original object to the dummy to reset its position.
In this type of environment you must be very careful using '='. If the two values are not exactly the same your = will return false. =<, => or within x of object are much better choices in an interactive environment.

I usually name the dummy objects as if you use more than one or two things start to get confusing.

Petit Suisse
08-07-2015, 02:16 PM
Three quick points:

The problem you were having was not you, It was Alice. I am not exactly sure what you were trying to do but Alice should not save a movie and then refuse to open it. I point this out because this type of problem is frustrating and NOT YOUR FAULT.
The best way to get an object back to a specific location is to place a dummy object at the location and then move the original object to the dummy to reset its position.
In this type of environment you must be very careful using '='. If the two values are not exactly the same your = will return false. =<, => or within x of object are much better choices in an interactive environment.

I usually name the dummy objects as if you use more than one or two things start to get confusing.

Thank you for this chickentree, I appreciate the encouragement. It was indeed in the way I was re-positioning the object and when I deleted that the issue went away - lol of course by then I had recreated the world at least 12 times and was ready to lose it.

Dummy's are great, and was what I used in the end. Thanks for helping our class in these forums. It makes a huge difference.