Alice Community  

Go Back   Alice Community > Alice 2 > Bugs and Troubleshooting

Reply
 
Thread Tools Display Modes
"Export As A Web Page" not working
Old
dang
Guest
 
Status:
Posts: n/a
Unhappy "Export As A Web Page" not working - 03-23-2007, 06:26 PM

I'm trying to allow our students to post their Alice projects on their web pages using "File -> Export As A Web Page..." and am having zero luck with it actually working on the client side. I've tried roughly all combinations I can manage in our computer lab and I get either:
a) a black area where the applet should be showing or
b) the "downloading..." / "extracting..." progress bars march across the screen... and never go away (exception from console below...)
c) the browser crashes while attempting to run the applet

I've tried combinations of the following on our lab machines which are running Windows XP Professional Service Pack 2, all getting either a) or b) or c) above when trying to view any/all of the sample alice worlds exported as a web page:
- Java SE 5, Java SE 6
- Java3D 1.3.1 for DirectX, Java3D 1.3.1 for GL, Java3D 1.5.0
- Java Media Framework 2.1.1e
- Firefox 1.5, Firefox 2.0, IE 6, IE 7, Sea Monkey 1.0, Sea Monkey 1.1

I like the idea of having the students being able to put their projects on thei r web pages for other to see, but I'll need some coaching on what works and what doesn't work using the above software and versions without getting a), b) or c) behavior.

When option b) happens, the Java console shows something like this....

"Exception in thread "Thread-6" javax.media.j3d.BadTransformException: non-congruent transform above ViewPlatform
at javax.media.j3d.TransformGroupRetained.setLive(Tra nsformGroupRetained.java:607)
at javax.media.j3d.GroupRetained.childDoSetLive(Group Retained.java:2153)
at javax.media.j3d.GroupRetained.doSetLive(GroupRetai ned.java:2208)
at javax.media.j3d.BranchGroupRetained.setLive(Branch GroupRetained.java:168)
at javax.media.j3d.GroupRetained.childCheckSetLive(Gr oupRetained.java:2160)
at javax.media.j3d.GroupRetained.checkSetLive(GroupRe tained.java:1542)
at javax.media.j3d.GroupRetained.checkSetLive(GroupRe tained.java:1465)
at javax.media.j3d.GroupRetained.doAddChild(GroupReta ined.java:494)
at javax.media.j3d.GroupRetained.addChild(GroupRetain ed.java:467)
at javax.media.j3d.Group.addChild(Group.java:271)
at edu.cmu.cs.stage3.alice.scenegraph.renderer.java3d renderer.ContainerProxy.onChildAdded(ContainerProx y.java:38)
at edu.cmu.cs.stage3.alice.scenegraph.renderer.java3d renderer.ContainerProxy.initialize(ContainerProxy. java:52)
at edu.cmu.cs.stage3.alice.scenegraph.renderer.Abstra ctProxyRenderer.getProxyFor(AbstractProxyRenderer. java:56)
at edu.cmu.cs.stage3.alice.scenegraph.renderer.Abstra ctProxyRenderer.createNecessaryProxies(AbstractPro xyRenderer.java:88)
at edu.cmu.cs.stage3.alice.scenegraph.renderer.Abstra ctProxyRenderTarget.addCamera(AbstractProxyRenderT arget.java:39)
at edu.cmu.cs.stage3.alice.scenegraph.renderer.java3d renderer.OnscreenRenderTarget.addCamera(OnscreenRe nderTarget.java:92)
at edu.cmu.cs.stage3.alice.core.RenderTarget.commit(R enderTarget.java:96)
at edu.cmu.cs.stage3.alice.core.World.setRenderTarget Factory(World.java:353)
at edu.cmu.cs.stage3.alice.player.AbstractPlayer.load World(AbstractPlayer.java:61)
at edu.cmu.cs.stage3.alice.player.AbstractPlayer.load World(AbstractPlayer.java:83)
at edu.cmu.cs.stage3.alice.player.PlayerApplet$2.run( PlayerApplet.java:231)
at java.lang.Thread.run(Unknown Source)"

Thanks in advance.

Best regards,

-- DanG

Last edited by dang; 03-23-2007 at 06:32 PM.
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 03-23-2007, 07:34 PM

Even when "export to web page" works, the browser can take a very long time to load the applet - I'm talking a half hour or more for (what I thought was) a very simple page. I only discovered that the particular page would actually load when I left it running while I was doing something else - forgot about it and came back quite a while later. Surprise - the applet had actually loaded.

See the bug list on the main Alice page for a list of (some of the) bugs with the export to web page option. (There is also a list of the software that has to be present on the machine there but it sounds like you've covered that.)

Found a working file and attached it. Just tried it and it did work once it finally loaded - never did figure out how to fix the font problem.

Note: As of 7/25/07 this file no longer seems to work - see later post.
Attached Files
File Type: zip Bee+Test.zip (3.89 MB, 599 views)

Last edited by DrJim; 07-25-2007 at 10:15 PM. Reason: Comment on file no longer working.
   
Reply With Quote
Old
dang
Guest
 
Status:
Posts: n/a
Default 03-24-2007, 07:21 AM

Thanks, Dr. Jim! The Bee+Test world export eventually did come up after a whopping long pause -- is the applet code open sourced so that we could throw a profiler on and check out what takes the majority of the time? Maybe look at the exceptions that cause a world not to load and so on? We've structured our class so that whatever the students do, they can add it to their web page... I didn't check this thoroughly with Alice, so I hope I'm not in a situation where we'll have to bail out on that part with a "mostly doesn't work" scenario. Thanks for any suggestions or feedback on how to debug what's going on.

Best regards,

-- DanG
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 03-24-2007, 10:49 AM

Quote:
Originally Posted by dang View Post
-- is the applet code open sourced so that we could throw a profiler on and check out what takes the majority of the time?
I assume that the "aliceapplet.jar" file is the applet code - don't really know enough about the details of Java applets to comment any further. To create the applet, all I did was use the "Export as Web Page" option after loading the .a2w file into Alice - I then edited the .html code manually.

Quote:
.... bail out on that part with a "mostly doesn't work" scenario.
That's the option I've chosen, but this is primarily a hobby for me - I'm not teaching any classes. The killer for me is you never know when a web page will just stop because you have exceeded an (undocumented) memory limit, even when (or, by Murphy's Law, just after) you have found workarounds for all of the other problems.

Jim
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 03-28-2007, 10:23 PM

Here is a partial explanation of what appears to be the root of the problem.

The file named aliceapplet.jar does contain the compiled class files for the applet.

First a few words about class files. To begin with, they are essentially machine languge files for a computer that doesn't exist (the so-called Java virtual machine). In and of themselves, they are not too meaningful to most humans. However, there are decompiler programs available on the web that can recover something that looks a lot like Java source code from a compiled Java class file. (There are also programs typically called obfsucators available that Java developers use to defeat the decompilers in an attempt to keep others from stealing their ideas by decompiling their class files. I doubt that the Alice team at Canegie was concerned about that.) If there were only two or three, or perhaps a dozen class files involved, it might be useful to look at the contents of the jar file using a decompiler.

Now for the bigger problem. The aliceapplet.jar file is an archive file that can be opened using a program like WinZip. (There are also Java utility programs that can open a jar file, but I believe they are all command-line utilities, so I prefer to use WinZip.)

For the sample program with the bee from Dr. Jim, the jar file contains about 1122 separate class files. Looking at the names of the files, it looks like a huge Java class library is encapsulated in the jar file, in addition to the actual class files that are peculiar to the particular application. My guess is that this constitutes an Alice-specific class library that is required in addition to Java SE, Java 3D, JMF, etc.

In all liklihood, this is what causes the applet to take so long to load into a browser. This is an extraordinary number of class files. Normally an applet makes use of the standard class libraries on the local machine and it isn't necessary to package thousands of library files in the jar file.

By the way, there is a program available from Sun named appletviewer.exe that can be used to view applets without brand-specific browser characteristics being involved, but it didn't fare any better on Dr.Jim's sample than Firefox. I was able to get the applet to load and run in IE 7 in four or five minutes but I'm still waiting for it to load and run in both Firefox and the appletviewer.

Now for the possible good news. If, in fact, the bulk of the class files in the jar file constitute a Java class library, it may be possible to extract those files from the jar file just once and use them to build a Java class library on the local machine, with appropriate classpath support, etc., and then strip them out of the jar file before attempting to load the jar file. The problem is that a great deal of information about the class files would be required in order to pull this off.

For whatever it's worth -
Dick Baldwin
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 03-30-2007, 08:04 PM

It explains a lot, for those not familiar with jar files.
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 03-31-2007, 12:14 PM

Quote:
Originally Posted by lanceA View Post
It explains a lot, for those not familiar with jar files.
As one who fits in that group, I couldn't agree more.

Thanks, Dick.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 03-31-2007, 01:48 PM

You are welcome Jim. And thank you for routinely providing an incredible amount of good technical information and advice to folks like me who are new to Alice.

Dick Baldwin
   
Reply With Quote
APPLET still wont play
Old
technomustang
Guest
 
Status:
Posts: n/a
Exclamation APPLET still wont play - 07-24-2007, 01:37 PM

Quote:
Originally Posted by DrJim View Post
Even when "export to web page" works, the browser can take a very long time to load the applet - I'm talking a half hour or more for (what I thought was) a very simple page. I only discovered that the particular page would actually load when I left it running while I was doing something else - forgot about it and came back quite a while later. Surprise - the applet had actually loaded.

See the bug list on the main Alice page for a list of (some of the) bugs with the export to web page option. (There is also a list of the software that has to be present on the machine there but it sounds like you've covered that.)

Found a working file and attached it. Just tried it and it did work once it finally loaded - never did figure out how to fix the font problem.

This file opened for me - downloaded and extracted quickly..

After 45 min never made any attempt to play.

I am configuring a master for ghosting a lab - any ideas what else I might need.

Got Pentium D 3.0GHZ
1024 Ram
128MB Video (Radeon)
java 6.02
newest JMF
newest JAVA3d
ActiveX 9.0
IE 7.0

Went thru IE security issues - think everything needed is enabled or set for prompt.

The simplest barking dog I exported never even downloaded and extracted
regardless of time left.

This is brand new XP install so at a loss for what else to try.

Applets like games from applet sites...work fine first time.

Grateful for any help

Louis
   
Reply With Quote
Wep page version has stopped working.
Old
DrJim
Guest
 
Status:
Posts: n/a
Thumbs down Wep page version has stopped working. - 07-25-2007, 10:24 PM

I had the same experience as technomustang with both the version of the file downloaded from the web and with a backup copy of the file I had on my hard disk.

Wasn't using my computer today so tried leaving the file loading for a long period of time - almost three hours in the case of the backup.

Nothing has obviously changed except for a couple of Java and IE updates - and the file is the same one that did run in March. But apparently something in my system changed enough to kill things completely.

Looks like the web page applet versions of Alice worlds are the worst kind of buggy software - programs that stop working without any indication or obvious reason.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.