Bug 399221

Summary: Applets with width="100%" crash
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: java-1.7.0-icedteaAssignee: Lillian Angel <langel>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 8Keywords: Reopened
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://www.newstin.cz/all-topics-startree.a
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-10 19:46:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Kratochvil 2007-11-26 08:31:49 UTC
Description of problem:
Web applet does not display in Firefox (and Galeon).

Version-Release number of selected component (if applicable):
java-1.7.0-icedtea-plugin-1.7.0.0-0.19.b21.snapshot.fc8.x86_64
firefox-2.0.0.9-1.fc8.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Open web URL: http://www.newstin.cz/all-topics-startree.a

Actual results:
Empty applet window.

Expected results:
Working applet window.

Additional info:
Unaware why the browser plugin does not work.  It does not display any errors.
Just appletviewer also does not work and it displays the error:
$ appletviewer http://www.newstin.cz/all-topics-startree.a
HTML parsing: incorrect value for width/height attribute
java.lang.NumberFormatException: For input string: "100%"
        at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:66)
        at java.lang.Integer.parseInt(Integer.java:485)
        at java.lang.Integer.valueOf(Integer.java:576)
        at sun.applet.AppletViewerPanel.getWidth(AppletViewerPanel.java:134)
        at sun.applet.AppletPanel.init(AppletPanel.java:216)
        at sun.applet.AppletViewer.<init>(AppletViewer.java:195)
        at
sun.applet.StdAppletViewerFactory.createAppletViewer(AppletViewer.java:100)
        at sun.applet.AppletViewer.parse(AppletViewer.java:1140)
        at sun.applet.AppletViewer.parse(AppletViewer.java:1074)
        at sun.applet.Main.run(Main.java:156)
        at sun.applet.Main.main(Main.java:98)

Problem is being tracked upstream at:
  http://bugs.sun.com/view_bug.do?bug_id=1237141

although I do not understand there if the Bug is appletviewer-specific or if it
does not work even for the plugin.

Workaroundable by:
wget -O - http://www.newstin.cz/all-topics-startree.a | sed 's/"100%"/800/'
>newstin.html; appletviewer ./newstin.html

The web/applet is correct according to the HTML specification
  http://www.w3.org/TR/html4/struct/objects.html#edef-APPLET
as WIDTH and HEIGHT are %Length and it has allowed the percentage ("100%")
specification.

Comment 1 Lillian Angel 2007-12-12 16:01:30 UTC
Fixed the problem with the plugin upstream. The problem with the appletviewer
should be fixed by sun.

This will be in the next release

Comment 2 Jan Kratochvil 2007-12-12 16:19:00 UTC
11 years vs. 2 weeks - that's a difference, thanks!
Lookin' forward for the Rawhide build.


Comment 3 Lillian Angel 2008-01-03 18:00:21 UTC
Should be available in rawhide within the next couple of days.

Comment 4 Jan Kratochvil 2008-02-09 20:24:29 UTC
Sorry but I see no change on:
java-1.7.0-icedtea-1.7.0.0-0.23.b24.snapshot.fc9.x86_64.rpm
java-1.7.0-icedtea-1.7.0.0-0.24.b24.fc9.x86_64.rpm
(running on F8 - I hope this cannot be a problem)

# echo '<applet code="Width100" width="100%" height="100"></applet>'
>Width100.html; appletviewer ./Width100.html
HTML parsing: incorrect value for width/height attribute
java.lang.NumberFormatException: For input string: "100%"
        at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:484)
        at java.lang.Integer.valueOf(Integer.java:575)
        at sun.applet.AppletViewerPanel.getWidth(AppletViewerPanel.java:133)
        at sun.applet.AppletPanel.init(AppletPanel.java:215)
        at sun.applet.AppletViewer.<init>(AppletViewer.java:195)
        at
sun.applet.StdAppletViewerFactory.createAppletViewer(AppletViewer.java:100)
        at sun.applet.AppletViewer.parse(AppletViewer.java:1140)
        at sun.applet.AppletViewer.parse(AppletViewer.java:1074)
        at sun.applet.Main.run(Main.java:156)
        at sun.applet.Main.main(Main.java:98)
Exception in thread "main" java.lang.NumberFormatException: For input string: "100%"
        at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:484)
        at java.lang.Integer.valueOf(Integer.java:575)
        at sun.applet.AppletViewerPanel.getWidth(AppletViewerPanel.java:133)
        at java.awt.Component.getNormalShape(Component.java:9525)
        at java.awt.Component.calculateCurrentShape(Component.java:9560)
        at java.awt.Component.applyCurrentShape(Component.java:9611)
        at java.awt.Container.recursiveApplyCurrentShape(Container.java:3945)
        at java.awt.Container.recursiveApplyCurrentShape(Container.java:3926)
        at java.awt.Container.mixOnShowing(Container.java:3962)
        at java.awt.Component.show(Component.java:1419)
        at java.awt.Window.show(Window.java:898)
        at java.awt.Component.show(Component.java:1455)
        at java.awt.Component.setVisible(Component.java:1407)
        at java.awt.Window.setVisible(Window.java:870)
        at sun.applet.AppletViewer.<init>(AppletViewer.java:200)
        at
sun.applet.StdAppletViewerFactory.createAppletViewer(AppletViewer.java:100)
        at sun.applet.AppletViewer.parse(AppletViewer.java:1140)
        at sun.applet.AppletViewer.parse(AppletViewer.java:1074)
        at sun.applet.Main.run(Main.java:156)
        at sun.applet.Main.main(Main.java:98)

The same problem is with:
appletviewer http://www.newstin.cz/all-topics-startree.a

And also firefox-2.0.0.10-3.fc8.x86_64 does not display the applet.


Comment 5 Lillian Angel 2008-02-10 19:46:37 UTC
This applet definitely works through the browser.
I suspect you do not have the plugin properly installed. You might still have the old IcedTea plugin 
installed, that does not have this fix.

be sure you have java-1.7.0-icedtea-plugin installed from rawhide.

 It will not work using appletviewer, and does not work with JDK1.6.0's appletviewer.

Comment 6 Jan Kratochvil 2008-02-10 20:36:01 UTC
Confirming it really works (F9 Firefox), really sorry.
There was some other (JavaScript one as it seems) problem with F8 Firefox.