SUGGESTED FIX
RepaintArea.java
*** /tmp/geta12997 Wed May 15 14:05:05 2002
--- /tmp/getb12997 Wed May 15 14:05:05 2002
***************
*** 138,146 ****
}
RepaintArea ra = this.cloneAndReset();
- subtract(ra.paintRects[UPDATE], ra.paintRects[HORIZONTAL]);
- subtract(ra.paintRects[UPDATE], ra.paintRects[VERTICAL]);
- subtract(ra.paintRects[UPDATE], ra.paintRects[HORIZONTAL]);
if (!subtract(ra.paintRects[VERTICAL], ra.paintRects[HORIZONTAL])) {
subtract(ra.paintRects[HORIZONTAL], ra.paintRects[VERTICAL]);
--- 138,143 ----
|
EVALUATION
Here are the results of the investigation.
1. even though the applets don't work from
zone.msn.com they (sometimes) work when run
from the original website http://www.gamehouse.com/casino.html
The applets usually work when the jar/images
plugin cache is emptied prior to running the applet.
Even when the applet is running fine, starting another
instance w/o while the first one is running never works.
2. running the applet with or without ddraw
(-Dsun.java2d.noddraw=true) didn't make any
difference.
3. When the applet doesn't work, it shows a blank area
filled with background color. Running the vm
with 2D tracing turned on (-Dsun.java2d.trace=log and
hidden console) revealed that the only primitives
being called in this case are
FillRect()
Blit()
When the application works fine the tracing shows
much more primitives being called.
This suggests that the application is clearing the
backbuffer by doing a fillRect with background
color and then copying the backbuffer to the screen.
These operations work fine so the applet are is being
repainted (filled with background color).
Apparently, the applicaton don't render to the backbuffer
for some reason. Since sometimes it does
work it might be some kind of synchronization
issue in the application.
4. When I created the following html file which runs
the applet directly (I basically copied the <APPLET ..>
clause from http://zone.msn.com/casinoroulette/casinogame.asp
page, the applet worked every time with no problems.
<html>
<body>
<APPLET MAYSCRIPT
name=Craps
code="gamehouse.SuperApplet.class"
codebase="http://a819.g.akamai.net/7/819/3570/0007/fdl.msn.com/zone/games/CASINO/GH"
height=400 width=552 archive=crapink.zip VIEWASTEXT>
<PARAM NAME="CABBASE" VALUE="crapink.cab">
<PARAM NAME="datafile" VALUE="craps.dat">
<PARAM NAME="canvas" VALUE="craps.CrapsCanvas">
<PARAM NAME="CONFIG" VALUE="craps.cfg">
<PARAM NAME="USERCLASS" VALUE="Boomerang.msft.BoomUser">
</APPLET>
</body>
</html>
The fact that it doesn't work when run from .asp page suggests
some kind of plugin issue.
Based on this findings I don't believe this is a 2D issue
and reassigning the bug to the plugin team for future evaluation.
###@###.### 2002-01-24
Committed bug to hopper.
###@###.### 2002-03-20
###@###.### 2002-04-30
After extensive tests, here are the problems we found:
1. The ASP page in zone.msn.com is trying to load the applet totally offscreen, then use javascript to move it back to the center of screen after 10 screens. The applet will not get paint for this situation, that is why it become BLACK backgroud.
2. The roulette java applet code depend on update() to initialize some variables, for the above case, the update never be triggered, so it didn't work.
3. If you load the applet partial inside the screen, it works. If the browser size is smaller then the applet size, it will works too.
4. The update() should be called by the following stack:
> at sprite.GameCanvas.update(GameCanvas.java:286)
> at sun.awt.RepaintArea.paint(Unknown Source)
> at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
> at java.awt.Component.dispatchEventImpl(Unknown Source)
> at java.awt.Component.dispatchEvent(Unknown Source)
> at java.awt.EventQueue.dispatchEvent(Unknown Source)
> at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> at java.awt.EventDispatchThread.run(Unknown Source)
5. The testcase for this game is on my webserver:
http://sarcasm.east.sun.com:8888/dennis/bug/casino/ASP/ah_asp.html
6. After contact to Sergey Salishev in AWT group, we think the problem is in RepaintArea.java. Sergey will provide a fix to it.
Dennis Gu
===============================================
Apparently this will be an issue for AOL adopting 1.4.1: it is an applet
compatibility issue.
###@###.### 2002-05-02
|