java problems with opensuse 12.3

Hi,

I have a problem with java 7 programs running on opensuse 12.3 machines.

The following simple java program


import java.awt.dnd.DragSource;

public class TestCursor
{
    public static void main(String] args)
    {
        System.out.println(DragSource.isDragImageSupported());
    }
}

fails to run with the following exception:


# java TestCursor
java.lang.RuntimeException: cannot load system cursor: CopyDrop.32x32
        at sun.awt.X11.XToolkit.lazilyLoadDesktopProperty(XToolkit.java:1523)
        at java.awt.Toolkit.getDesktopProperty(Toolkit.java:1804)
        at java.awt.dnd.DragSource.load(DragSource.java:131)
        at java.awt.dnd.DragSource.<clinit>(DragSource.java:147)
        at TestCursor.main(TestCursor.java:7)
Caused by: java.awt.AWTException: Exception: class java.lang.IllegalArgumentException Width (0) and height (0) must be non-zero occurred while creating cursor CopyDrop.32x32
        at java.awt.Cursor.getSystemCustomCursor(Cursor.java:362)
        at sun.awt.X11.XToolkit.lazilyLoadDesktopProperty(XToolkit.java:1521)
        ... 4 more
Exception in thread "main" java.lang.ExceptionInInitializerError
        at TestCursor.main(TestCursor.java:7)
Caused by: java.lang.RuntimeException: failed to load system cursor: DnD.Cursor.CopyDrop : cannot load system cursor: CopyDrop.32x32
        at java.awt.dnd.DragSource.load(DragSource.java:135)
        at java.awt.dnd.DragSource.<clinit>(DragSource.java:147)
        ... 1 more

I have installed the machine with default opensuse settings. All updates are installed too.
It doesn’t matter if I use KDE or GNOME.
It doesn’t matter if I use openJDK or Oracle JDK.

I also tested different versions of the Oracle JDK (1.7.0_11, 1.7.0_25). All versions have the same problem.

But: The java program is running fine on an opensuse 12.3 installation in the VirtualBox on my windows PC.

Any ideas how to fix this problem?

Thanks!
Uli

P.S.: This is a real problem! For example jvisualvm provided with Oracle JDKs also fails with this problem. And other java software tools have the same problem.

uvoigt wrote:
>
> import java.awt.dnd.DragSource;
>
> public class TestCursor
> {
> public static void main(String] args)
> {
> System.out.println(DragSource.isDragImageSupported());
> }
> }
It works for me
http://paste.opensuse.org/images/81159566.png


GNOME 3.6.2
openSUSE Release 12.3 (Dartmouth) 64-bit
Kernel Linux 3.7.10-1.16-desktop

I guess it must have something to do with the graphics hardware/driver?
It is an onboard Matrox card. Is there any repository with other graphic drivers for this card?

lspci | grep Matrox:
0d:00.0 VGA compatible controller: Matrox Electronics Systems Ltd. G200eR2

hwinfo:
130: PCI d00.0: 0300 VGA compatible controller (VGA)
SysFS ID: /devices/pci0000:00/0000:00:1c.7/0000:0a:00.0/0000:0b:00.0/0000:0c:00.0/0000:0d:00.0
SysFS BusID: 0000:0d:00.0
Hardware Class: graphics card
Model: “Matrox VGA compatible controller”
Vendor: pci 0x102b “Matrox Graphics, Inc.”
Device: pci 0x0534
SubVendor: pci 0x15d9 “Super Micro Computer Inc”
SubDevice: pci 0x0636
Driver: “mgag200”
Driver Modules: “drm”
Memory Range: 0xdd000000-0xddffffff (ro,non-prefetchable)
Memory Range: 0xdf000000-0xdf003fff (rw,non-prefetchable)
Memory Range: 0xde800000-0xdeffffff (rw,non-prefetchable)
IRQ: 19 (no events)
I/O Ports: 0x3c0-0x3df (rw)
Module Alias: “pci:v0000102Bd00000534sv000015D9sd00000636bc03sc00i00”
Driver Info #0:
Driver Status: mgag200 is active
Driver Activation Cmd: “modprobe mgag200”
Attached to: #129 (PCI bridge)

I also remember that it worked with opensuse 12.2.

Just for the records:

the bug disappears when starting the system with boot option nomodeset

The problem was caused by the kernel module mgag200 which was loaded automatically (by KMS?) and this prevented the mga driver to work (see https://bugzilla.novell.com/show_bug.cgi?id=834992).