Closed Bug 108831 Opened 23 years ago Closed 22 years ago

JAVA applet doesn't display graphic.

Categories

(Core :: Layout, defect, P1)

x86
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 131065

People

(Reporter: apksr, Assigned: peterl-bugs)

References

()

Details

(Keywords: regression)

Attachments

(3 files, 1 obsolete file)

The JAVA applet to display image doesn't render image on this site.
OJI Bug
Assignee: ashuk → joe.chou
Component: Java APIs for DOM → OJI
QA Contact: avm → pmac
Reporter, what is your build ID and java version?

The applet does not work under 0.9.5 and 2001110612 with blackdown java 1.3.1.
Keywords: 4xp
I'm using 0.9.5 2001101202 with JAVA 1.3.1 (SUN)
confirming on Win2k with build 2001110703 + JRE 1.4b2.
Does not work for me with 1.4 beta3 too.
 
Despite the fact it is reproducible with both blackdown's and sun's jdk 
i feel it still likely to be jdk problems. 
(From java console i see that actual image to be presented is 
 requested). I am going to file bug on this against sun's plugin. 
bugtraq 4524739
When runnign with a debug build, I get the assertions:

###!!! ASSERTION: bad height: 'metrics.height>=0', file nsLineLayout.cpp, line 1169
###!!! Break: at file nsLineLayout.cpp, line 1169
###!!! ASSERTION: bad height: 'metrics.height>=0', file nsLineLayout.cpp, line 1169
###!!! Break: at file nsLineLayout.cpp, line 1169
###!!! ASSERTION: bad height: 'metrics.height>=0', file nsLineLayout.cpp, line 1169
###!!! Break: at file nsLineLayout.cpp, line 1169


the html code for the applet is:
<applet code="gov.nist.chemdata.jdx.JDXApplet" codebase="../classes/"
archive="jars/JDX.jar" width="90%" height="90%">

Maybe the reason for this bug is, that the width and height entries are not
parsed correctly !?!
Still a problem in 0.9.6 (Sun java 1.3.1) ---> NEW
Status: UNCONFIRMED → NEW
Ever confirmed: true
still a problem in 0.9.7
Confirned with 0.9.7 and Windows 2000
Still present in Linux 0.9.9.
The only suspisious lines I see in java console:

Child: VM Received Command >>>JAVA_PLUGIN_WINDOW
Child: Window 50331940 872x0 23x715
Child: MAV(50331940) setWindow: call before applet exists:50331940
Child: MAV(50331940) Init ?
Child: MAV(50331940) Yes, init
Child: Sending OK reply
Child: Plugin: Reading next  code...
Child: MAV(50331940) Bounds before
init:java.awt.Rectangle[x=0,y=0,width=872,height=0]  <--- NB: height == 0!
Child: MAV(50331940) Trying (and failing) to get a parameter from the html:classid
Child: MAV(50331940) Trying (and failing) to get a parameter from the html:java_code
Child: VM Received Command >>>JAVA_PLUGIN_WINDOW      <--- NB: 872x0
Child: Window 50331940 872x0 23x715
Child: MAV(50331940) setWindow: Same winid.
Child: Sending OK reply
Child: Plugin: Reading next  code...
Child: VM Received Command >>>JAVA_PLUGIN_WINDOW
Child: Window 50331940 858x0 71x728
Child: MAV(50331940) setWindow: Same winid.
Child: Sending OK reply

Probably this is really sizing problem...
wfm using build 2002032803 on Win2k + JRE 1.4.0, at least it seems to be as it
renders as IE6 + JRE 1.4.0 and NS4.76 + JRE 1.1.5.
This is layout problem. nsPluginWindow passed to plugin has height == 0.

In nsObjectFrame::GetDesiredSize() :
    if (NS_UNCONSTRAINEDSIZE != aReflowState.availableHeight)
      aMetrics.height = NSToCoordRound (factor * aReflowState.availableHeight);
    else // unconstrained percent case
      aMetrics.height = (NS_UNCONSTRAINEDSIZE == aReflowState.mComputedHeight) ?
0 : aReflowState.mComputedHeight;

and we hit case where aReflowState.mComputedHeight == NS_UNCONSTRAINEDSIZE.
I don't know yet why mComputedHeight has such value, but we get it from
layout code.
This is pure layout bug.
When we have applet with percentage width/height inside the table, it's
not displayed. But w/o table it displayed just fine
->Layout
Assignee: joe.chou → attinasi
Component: OJI → Layout
QA Contact: pmac → petersen
Attached file minimal testcase
You can put any applet here. It will not display inside table
Priority: -- → P1
Target Milestone: --- → Future
-->peterl

I think this is my bug caused from bug 106602.
Assignee: attinasi → peterl
Keywords: regression
Target Milestone: Future → ---
It is :-)
Probably for NS_UNCONSTRAINEDSIZE == aReflowState.mComputedHeight case we should
apply percentage to visible area size to get desired height?

Attached patch possible patch? (obsolete) — Splinter Review
I'm not sure this is the right way to fix this nor do I even know if this patch
fixes the crash. Could someone who's seeing this crash try this?
Attachment #79027 - Attachment is obsolete: true
Peter, I just applied your patch to my tree and rebuilt.  I do not see the graph
with Java 1.3.1-b24 and I do not see the blank space that Mozilla leaves without
your patch applied.  Seems like we're not quite there yet...
I not took a look at context, but bare patch looks wrong for me.
All it does (AFAIU) is replaces zero size with size of 1, right?
But 1 is not the same as, say, 90% of 800 pixels?
Am I missing something here? (I'll take a closer look at it tomorrow)
Yeah, this only happens with XHTML and when you have a % height. Marking dup of
bug 131065.

*** This bug has been marked as a duplicate of 131065 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: