JDK-4729181 : Graphics.setXORMode() affects following fillRoundRect() call
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_7
  • CPU: sparc
  • Submitted: 2002-08-09
  • Updated: 2004-03-29
  • Resolved: 2003-10-03
Related Reports
Duplicate :  
Description

Name: atR10191			Date: 08/09/2002


It seems that Graphics.setXORMode() invocation can affect the following
Graphics.fillRoundRect() call:
An example below prints nothing ("OKAY" expected).

Note that result of test run is not stable:

my colleague reproduced the failure under sparc's 1.4.2 and linux, but
could not reproduced this under sparc's 1.3 and even 1.4.0.

I'v managed to achive core dump several times in the last year (which I
put below the test's source), but now I have not.

============ Test26.java ==============================================
import java.awt.*;

public class Test26 {
    public static void main(String[] args) {

        Frame frm = new Frame();
        frm.show();
        Graphics g = frm.getGraphics();

        g.setXORMode(Color.magenta);
        g.fillRoundRect(0, -100, 0, Integer.MAX_VALUE,Integer.MIN_VALUE + 1,-100);

        System.out.println("OKAY");
        System.exit(0);
    }
}
======== end of Test26.java ==========================================
======== there is no output ==========================================
(without g.setXORMode() invocation the output is
"OKAY", which is the expected result.)
======================================================================
======== core dump ===================================================
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0xFDEC5250
Function=_XtSortPerDisplayList+0xC4
Library=/usr/lib/libXt.so.4

Current Java thread:
        at sun.awt.motif.MToolkit.run(Native Method)
        at java.lang.Thread.run(Thread.java:539)

Dynamic libraries:
0x10000         java
0xff350000      /usr/lib/libthread.so.1
0xff390000      /usr/lib/libdl.so.1
0xff200000      /usr/lib/libc.so.1
0xff330000      /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1
0xfe000000      /set/jdk-builds/JDK1.4.0beta2-b86/solaris/jre/lib/sparc/client/l
ibjvm.so
0xff2d0000      /usr/lib/libCrun.so.1
0xff1e0000      /usr/lib/libsocket.so.1
0xff100000      /usr/lib/libnsl.so.1
0xff0d0000      /usr/lib/libm.so.1
0xff300000      /usr/lib/libw.so.1
0xff0b0000      /usr/lib/libmp.so.2
0xff080000      /set/jdk-builds/JDK1.4.0beta2-b86/solaris/jre/lib/sparc/native_t
hreads/libhpi.so
0xff050000      /set/jdk-builds/JDK1.4.0beta2-b86/solaris/jre/lib/sparc/libverif
y.so
0xff020000      /set/jdk-builds/JDK1.4.0beta2-b86/solaris/jre/lib/sparc/libjava.
so
0xfe7e0000      /set/jdk-builds/JDK1.4.0beta2-b86/solaris/jre/lib/sparc/libzip.s
o
0xfe5b0000      /usr/lib/locale/ru_RU.KOI8-R/ru_RU.KOI8-R.so.2
0xf1900000      /set/jdk-builds/JDK1.4.0beta2-b86/solaris/jre/lib/sparc/libawt.s
o
0xfe450000      /set/jdk-builds/JDK1.4.0beta2-b86/solaris/jre/lib/sparc/libmlib_
image.so
0xfdf90000      /set/jdk-builds/JDK1.4.0beta2-b86/solaris/jre/lib/sparc/motif21/
libmawt.so
0xf1680000      /usr/lib/libXm.so.4
0xfde90000      /usr/lib/libXt.so.4
0xfc7d0000      /usr/lib/libXext.so.0
0xfc7b0000      /usr/openwin/lib/libXtst.so.1
0xf1580000      /usr/lib/libX11.so.4
0xfc4a0000      /usr/openwin/lib/libdps.so.5
0xfc480000      /usr/lib/libSM.so.6
0xfc450000      /usr/lib/libICE.so.6
0xfc420000      /usr/openwin/lib/libdga.so.1
0xf1480000      /set/jdk-builds/JDK1.4.0beta2-b86/solaris/jre/lib/sparc/libfontm
anager.so
0xfc790000      /usr/openwin/lib/locale/common/xlibi18n.so.2
0xfa3c0000      /usr/openwin/lib/locale/common/ximlocal.so.2

Local Time = Wed Nov 21 18:18:56 2001
Elapsed Time = 2
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.0-rc-b86 mixed mode)
#
# An error report file has been saved as hs_err_pid9548.log.
# Please refer to the file for further information.
#
Abort (core dumped)
================================================================================
======================================================================

Comments
EVALUATION Graphics calls are generally owned by 2D. ###@###.### 2002-08-09 I can't reproduce this on Solaris 7. Could you please try out the FCS build of 1.4? Also try the latest build of 1.4.1. ###@###.### 2002-08-09 --------------- I tried on Solaris 8: uname -a SunOS netrat 5.8 Generic_108528-07 sun4u sparc SUNW,UltraAX-i2 and following versions of jdk: java -version java version "1.4.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92) Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode) /set/java/jdk1.4.1/solaris/bin/java -version java version "1.4.1-rc" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-rc-b16) Java HotSpot(TM) Client VM (build 1.4.1-rc-b16, mixed mode) /set/java/jdk1.4.2/solaris/bin/java -version java version "1.4.2-beta" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b01) Java HotSpot(TM) Client VM (build 1.4.2-beta-b01, mixed mode) sysinfo G E N E R A L I N F O R M A T I O N Host Name is netrat Host Aliases is loghost Host Address(es) is 192.168.205.16 Host ID is 80fded2e Serial Number is 2164124974 Manufacturer is Sun (Sun Microsystems) System Model is UltraAX i2 Main Memory is 2.0 GB Virtual Memory is 2.5 GB ROM Version is OBP 4.0.3 2001/01/03 15:05 Number of CPUs is 1 CPU Type is sparcv9+vis App Architecture is sparc Kernel Architecture is sun4u OS Name is SunOS OS Version is 5.8 OS Distribution is Solaris 8 4/01 s28s_u4wos_08 SPARC Kernel Version is SunOS Release 5.8 Version Generic_108528-07 64-bit [UNI X(R) System V Release 4.0] Boot Time is Wed Jul 24 09:01:45 2002 K E R N E L I N F O R M A T I O N Maximum number of processes for system is 30000 Maximum number of processes per user is 29995 Maximum number of users (for system tables) is 1994 Maximum number of BSD (/dev/ptyXX) pty's is 48 Size of the virtual address cache is 16384 Size of the callout table is 221 Size of the inode table is 128296 Size of the directory name lookup cache is 128296 STREAMS: Maximum number of pushes allowed is 9 Maximum global priority in sys class is 64 Has UFS driver is TRUE Has NFS driver is TRUE Has LOFS driver is TRUE Has TMPFS driver is TRUE Has SD driver is TRUE Has FD driver is TRUE Has NFSSERVER is TRUE Has IPCSHMEM is TRUE S Y S C O N F I N F O R M A T I O N Max combined size of argv[] and envp[] is 2096640 Max processes allowed to any UID is 29995 Clock ticks per second is 100 Max simultaneous groups per user is 16 Max open files per process is 256 System memory page size is 8192 Job control supported is TRUE Savid ids (seteuid()) supported is TRUE Version of POSIX.1 standard supported is 199506 Version of the X/Open standard supported is 3 Max log name is 8 Max password length is 8 Number of processors (CPUs) configured is 1 Number of processors (CPUs) online is 1 Total number of pages of physical memory is 262144 Number of pages of physical memory not currently in use is 196125 Max number of I/O operations in single list I/O call is 4096 Max amount a process can decrease its async I/O priority level is 0 Max number of timer expiration overruns is 2147483647 Max number of open message queue descriptors per process is 32 Max number of message priorities supported is 32 Max number of realtime signals is 8 Max number of semaphores per process is 2147483647 Max value a semaphore may have is 2147483647 Max number of queued signals per process is 32 Max number of timers per process is 32 Supports asyncronous I/O is TRUE Supports File Synchronization is TRUE Supports memory mapped files is TRUE Supports process memory locking is TRUE Supports range memory locking is TRUE Supports memory protection is TRUE Supports message passing is TRUE Supports process scheduling is TRUE Supports realtime signals is TRUE Supports semaphores is TRUE Supports shared memory objects is TRUE Supports syncronized I/O is TRUE Supports timers is TRUE Supports C language binding option is TRUE Supports C language development utilities is TRUE Version of ISO POSIX-2 standard (Commands) is 199209 Supports creation of locales by localedef is TRUE Supports Software Development Utitility is TRUE Supports User Portability Utilities is TRUE Version of ISO POSIX-2 standard (C Language binding) is 199209 Maximum obase values allowed by bc is 99 Maximum number of elements in array in bc is 2048 Maximum scale value in bc is 99 Maximum string constant in bc is 1000 Maximum weights for LC_COLLATE is 10 Maximum expressionss in expr is 32 Maximum length of input line is 2048 Maximum repeated _SC_REALTIME_SIGNALS is 255 Supports X/Open Encryption Features is TRUE Supports X/Open Enhanced Internationalization Features is TRUE Supports X/Open Shared Memory Features is TRUE Supports Character Terminals is TRUE Version of supported XCU is 4 Maximum functions in atexit() is 32 Maximum iovec structures for readv()/writev() is 16 Supports X/Open CAE 8/1994 is TRUE Maximum pid value is 30000 Default stack protection is 3 Max size of group entry buffer is 10496 Max size of password entry buffer is 1024 Max login name is 9 Max TTY name is 128 Supports POSIX Threads is TRUE Supports Thread Stack Address Attriutes is TRUE Supports Thread Stack Size Attribute is TRUE Supports Thread Priority Scheduling is TRUE Supports Thread Priority Inherit is TRUE Supports Thread Priority Protection is TRUE Supports Thread Process Sharing is TRUE Supports Thread Safe Functions is TRUE Supports X/Open Legacy Feature Group is TRUE Supports X/Open POSIX Realtime Feature Group is TRUE Supports X/Open POSIX Realtime Threads Feature Group is TRUE Supports X/Open ILP32 w/32-bit offset is TRUE Supports X/Open LP32 w/64-bit offset is TRUE Supports X/Open LP64, 64-bit offset is TRUE Supports X/Open LP64, 64-bit offset is TRUE D E V I C E I N F O R M A T I O N SUNW,UltraAX-i2 is a "Sun 375-0132" openprom1 is a "Sun Open Boot PROM" device options0 is a "PROM Settings" aliases1 is a "PROM Device Aliases" pci108e,a001(0) is a "Sun sabre" PCI simba0 is a "Sun PCI" PCI bus bridge ebus0 is a "Sun Microsystems PCI<->OnBoard" PCI bus bridge flashprom1 is a "Sun Flash PROM" eeprom1 is a "EEPROM" device pmu is a "AL" PCI isa1 is a "AL ISA" PCI system bus su0 is a "82510/8250/16450/16550AF" serial device su1 is a "82510/8250/16450/16550AF" serial device pci108e,1101(0) is a "Sun pci-eri" PCI pciclass,0c0310 is a PCI pci10b9,5229(0) is a PCI sd31 is a disk drive pci108e,1101(1) is a "Sun pci-eri" PCI simba1 is a "Sun PCI" PCI bus bridge glm0 is a "Symbios 53c875 Fast/Ultra/Wide" SCSI controller c1t0d0 (sd1) is a "SEAGATE ST318404LSUN18G" SCSI 16.9 GB disk dr ive c1t1d0 (sd2) is a "SEAGATE ST318404LSUN18G" SCSI 16.9 GB disk dr ive glm1 is a "Symbios 53c875 Fast/Ultra/Wide" SCSI controller cpu0 is a "Sun UltraSPARC-IIe" 500 MHz CPU ----------------------------- ###@###.### 2002-08-09 Are you sure that you are fully patched on the system? Please run: http://hestia.sfbay.sun.com/patches.sqe/patchtool/index.html ###@###.### 2002-08-09 It dies on my solaris 8 machine when we use pixmaps. The problem is that FillSpans iterators passes the following bounds: { 0, -100, 1, MAXINT } to the native code, so we die in X11SD_GetRasInfo() because we fail to allocate such a huge amount of memory for the XImage and we wasn't checking for malloc return value in X11SD_GetImage(). Anyway, we should've probably clipped the bounds earlier. ###@###.### 2002-08-09 This bug is not reproducible since jdk1.4.2. It's been fixed as part of the changes for 4517321: Java fails on 3-byte RGB screens used by some Linux implementations so I'm marking this bug as fixed in 1.4.2. ###@###.### 2003-07-20
20-07-2003