JDK-4627627 : Image rendering causes some applets to fail with merlin-rc
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.0,1.4.1
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,solaris_2.5,windows,windows_2000
  • CPU: generic,x86,sparc
  • Submitted: 2002-01-24
  • Updated: 2002-10-09
  • Resolved: 2002-05-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
1.4.0_03 03Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Description
Game applets available at  http://zone.msn.com fails to run on IE and Netscape browsers with merlin-rc

In order to reproduce, visit http://zone.msn.com/casinoroulette/casinogame.asp

Although applet doesn't show up, if you move the mouse in certain area of the applet you can observe that the applet responds and only the image is missing

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.0_03 hopper-beta FIXED IN: 1.4.0_03 hopper-beta INTEGRATED IN: 1.4.0_03 hopper-beta
2004-06-14

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 ----
2004-06-11

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
2002-05-02