EVALUATION
The source code at this location:
/java/re/jck/1.4a/promoted/fcs/binaries/JCK-runtime-14a/tests/api/java_awt/interactive/ScrollbarTests.java
does not contain the internal logic of the test. It seems to be setup code only. For example, I couldn't see where the method ScrollbarTest0002()
is called. Please provide the full path to the source code that contains
the logic of the test.
I could not find any file at this location:
/net/jtgb4u4c.eng/export/sail15/results/mantis/b08/jck14a/sparc/sol9_sparc_client_batch_debug_novo48/java_awt/interactive/ScrollbarTests_ScrollbarTests.jtr
Please provide the correct path to the jtr file.
###@###.### 2002-11-26
looked at motif sources in
/net/meatball/cde_builds/UISCE-mws/cdesrc/lib/Xm
The message: "The specified slider size is less than 1."
is in Messages.c as XmMsgScrollBar_0001
which ScrollBar.c defines as MESSAGE2
So it is probably around line 837 in Initialize()
if (new_w->scrollBar.slider_size < 1)
{
new_w->scrollBar.slider_size = 1;
XmeWarning( (Widget) new_w, MESSAGE2);
}
or more likely around line 1956 in ValidateInputs
(which is called from SetValues) since we are already initialized
and we are infinite looping.
if (new_w->scrollBar.sliding_mode != XmTHERMOMETER) {
if (new_w->scrollBar.slider_size < 1) {
if ((new_w->scrollBar.maximum - new_w->scrollBar.minimum) <
current->scrollBar.slider_size)
new_w->scrollBar.slider_size = new_w->scrollBar.maximum
- new_w->scrollBar.minimum;
else
new_w->scrollBar.slider_size = current->scrollBar.slider_size;
XmeWarning( (Widget) new_w, MESSAGE2);
returnFlag = FALSE;
}
Obviously, the loop is line 2165
while (!ValidateInputs(current, request, new_w)) /*EMPTY*/;
but I don't know why slider_size would be less than 1
My guess: max - min can't be more than Integer.MAX_VALUE
perhaps the value of this difference is wrapping, causing
us problems.
I bet it's around line 1960 - probably an integer overflow
in ScrollBarP.h minimum, maximum, value, and slider_size are all integers.
When I added 51 to Integer.MIN_VALUE, it worked fine
(with max of 50). When I added only 50, infinite loop.
Should try on windows to see what happens.
Probably ought to follow the swing model, and make sure
that the "extent" (maxMinusMin) is <= Integer.MAX_VALUE
(and > 0)
http://support.microsoft.com/default.aspx?scid=kb;en-us;104311
Microsoft only allows 32 bits for scroll pos
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/msdn_scroll32.asp
see 4679721 for info on MSDN for scrollbars
###@###.### 2002-12-04
We need to change the spec to say that the maximum scrollbar range cannot be
greater than Integer.MAX_VALUE. Native widgets don't support greater values,
and in general, no other widget set (including swing) does either. We just
didn't spec this out well when the Scrollbar class was first written.
I'll commit this to Tiger.
###@###.### 2002-12-05
We should revamp the spec and implementation - something like Swing has -
in order to prevent ranges greater than Integer.MAX_VALUE. When we do this,
we need to clean up areas such as setMinimum, which erroneously says
* <p>Note that setting the minimum value to <code>Integer.MIN_VALUE</code>
* will result in the new minimum value to be set to
* <code>Integer.MIN_VALUE - 1</code>.
It was intended to say MAX_VALUE, not MIN_VALUE. However, we'll need
to apply some rules and explain them. E.g. minimum may not be larger than
Integer.MAX_VALUE - visibleAmount.
###@###.### 2003-04-13
|