Java font issue

Hello,
I have installed the latest jdk from oracle to run a program (chemdoodle) that used to run on opensuse 12.3.
My 13.1 installation is brand new.
When I run the program I get the following message :


java.lang.ArrayIndexOutOfBoundsException: -34602915
    at sun.font.FileFontStrike.getCachedGlyphPtr(FileFontStrike.java:472)
    at sun.font.FileFontStrike.getSlot0GlyphImagePtrs(FileFontStrike.java:438)
    at sun.font.CompositeStrike.getGlyphImagePtrs(CompositeStrike.java:115)
    at sun.font.GlyphList.mapChars(GlyphList.java:272)
    at sun.font.GlyphList.setFromString(GlyphList.java:244)
    at sun.java2d.pipe.GlyphListPipe.drawString(GlyphListPipe.java:71)
    at sun.java2d.pipe.ValidatePipe.drawString(ValidatePipe.java:165)
    at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2867)
    at rZ.f(Unknown Source)
    at rZ.<init>(Unknown Source)
    at Oj.a(Unknown Source)
    at Oj.a(Unknown Source)
    at Oj.<init>(Unknown Source)
    at gD.c(Unknown Source)
    at gui.swing.ChemDoodle.a(Unknown Source)
    at gui.swing.j.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

The program provider says it’s a font issue.

As the program used to work before I tried with three different jre versions (latest, 7.0 and 6.0) : same result.

Can anyone help me with that?

Thanks in advance

Hmm, this problem is supposed to have been fixd (see Bug ID: JDK-7180898 Exception thrown from FileFontStrike.getCachedGlyphPtr in Java2Demo). Are you sure you have the latest versions? What happens if you run your prog under openJDK, not under the Oracle JDK? HTH Lenwolf

Thank you for your answer. I did my best to get the lateste version from oracle (download of jdk-7u45-linux-x64.rpm). Is that not the latest?

 > /usr/java/jdk1.7.0_45/jre/bin/java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

My java installation is not fancy I think :


linux-rhif:~ # zypper search -i java jdk
Loading repository data...
Reading installed packages...

S | Name                           | Summary                                                     | Type   
--+--------------------------------+-------------------------------------------------------------+--------
i | jdk                            | Java Platform Standard Edition Development Kit              | package
i | libjavascriptcoregtk-1_0-0     | JavaScript Core Engine, GTK+ Port                           | package
i | libjavascriptcoregtk-3_0-0     | JavaScript Core Engine, GTK+ Port                           | package
i | timezone-java                  | Timezone Descriptions                                       | package
i | typelib-1_0-JavaScriptCore-1_0 | JavaScript Core Engine, GTK+ Port -- Introspection bindings | package

To answer your last point, the program I try to run, chemdoodle, when trying to run it with something else than the oracle version I get the message:

ChemDoodle will not work with OpenJDK, GNU java, etc., or variants thereof. Please install the official java from Oracle which you may get at java.com: Java + You, and then try again.

Finally, in case this could be important, this is the way I run the program :

/usr/java/jdk1.7.0_45/jre/bin/java -Xmn512m -Xms1g -Xmx1g -jar ChemDoodle.jar

Thank you for your help,
Yannick

Yes, that is indeed the latest version.
On thing to try: uninstall that and install the 32 bit version. Who know, it might make a difference.

My java installation is not fancy I think :

(…)
S | Name | Summary | Type
–±-------------------------------±------------------------------------------------------------±-------
i | jdk | Java Platform Standard Edition Development Kit | package
i | libjavascriptcoregtk-1_0-0 | JavaScript Core Engine, GTK+ Port | package
i | libjavascriptcoregtk-3_0-0 | JavaScript Core Engine, GTK+ Port | package
i | timezone-java | Timezone Descriptions | package
i | typelib-1_0-JavaScriptCore-1_0 | JavaScript Core Engine, GTK+ Port – Introspection bindings | package

That seems OK, too.

To answer your last point, the program I try to run, chemdoodle, when trying to run it with something else than the oracle version I get the message: (…)

I downloaded the software and accepted the free trial run. I also get this error as you when run under the openJDK, so the software explicitly checks for the JRE version.

I don’t normally have the Sun JDK on this machine.
However, for testing purposes I have the Sun JDK 1.8 (attention, this is beta version software).
So I ran the prog under that JRE and it worked just fine (but this is on openSuse 12.3, so probably that’s what you would expect).

I’ll try to run it on another machine with 13.1 installed later on and will report back.

Finally, in case this could be important, this is the way I run the program :

/usr/java/jdk1.7.0_45/jre/bin/java -Xmn512m -Xms1g -Xmx1g -jar ChemDoodle.jar

Thank you for your help,
Yannick

I don’t suppose it’ll make any difference, but did you try to run it as they say on the website, i.e. “sh ./ChemDoodle” (or even simply “./ChemDoodle”) when in the install directory?

HTH

Lenwolf

Hi,

I now tested this on a 13.1 machine, with Oracle’s 7u45 JDK. It ran without a problem like this:

/usr/java/jdk1.7.0_45/bin/java -jar ChemDoodle.jar

So the problem must somehow come from your installation. You’re using what? Gnome, Kde?
Since this seems to be a font problem, try installing the mstt fonts (install the “fetchmsttfonts” package.

HTH

Lenwolf

Hi, and finally you might want to vcheck the properties file under ~/.java. HTH lenwolf

Hi, happy new year and thank you very much.
The mstt fonts did the trick. After installation of the fetchmsttfonts package, the program runs perfect.
I apologize for the delay, I was on holidays.

Thank you again for your help,
Yannick

Hi, Glad I could be of help. Happy new year to you,too. Lenwolf