|[PATCH] fix OpenJDK [Sun]FontManager typo||Damjan Jovanovic||8/5/12 11:14 AM|
http://josm.openstreetmap.de/josm-tested.jar dies on startup with "java/lang/UnsatisfiedLinkError: sun/font/SunFontManager.initIDs()V". This is because you misspelt "sun/font/SunFontManager" as "sun/font/FontManger", which the attached patch fixes.
However after fixing this I get a crash in libmawt.so:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
#0 0x0000000000000000 in ?? ()
#1 0x00007fffef2b3fea in ?? () from /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/xawt/libmawt.so
#2 0x00007fffef2b9658 in Java_sun_awt_X11GraphicsConfig_makeColorModel () from /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/xawt/libmawt.so
#3 0x00007ffff7fd5bf8 in detectFeature () from build/linux-x86_64-openjdk/libjvm.so
#4 0x00007ffff7fc423a in ?? () from build/linux-x86_64-openjdk/libjvm.so
#5 0x00007ffff7fbbf77 in ?? () from build/linux-x86_64-openjdk/libjvm.so
#6 0x00007ffff7fbe837 in ?? () from build/linux-x86_64-openjdk/libjvm.so
#7 0x000000004000007b in ?? ()
#8 0x00000000f5a8e939 in ?? ()
#9 0x00000000402aa51c in ?? ()
#10 0x00007fffdddc40a0 in ?? ()
#11 0x000000000040bef0 in ?? ()
#12 0x0000000000000000 in ?? ()
Also I can't run that JAR file with "-jar /path/to/josm-tested.jar", I have to use "-cp /path/to/josm-tested.jar JOSM", due to a "Main-Class manifest header not found in /home/user/josm-tested.jar" error which is not true. And on ARM even that doesn't work (some bizarre security exception), and I have to unzip the JAR and run it like that.
|Re: [PATCH] fix OpenJDK [Sun]FontManager typo||Joel Dice||8/5/12 6:42 PM|
On Sun, 5 Aug 2012, Damjan Jovanovic wrote:It's not really a misspelling. OpenJDK 6 had a class named FontManager,
and no class named SunFontManager, whereas OpenJDK 7 seems to have changed
FontManager into an interface and added SunFontManager as an abstract
superclass for at least two implementations: X11FontManager and
Win32FontManager. Anyway, initIDs has indeed been moved into
SunFontManager, so I've committed your patch. Thanks.
> #0 ï¿½0x0000000000000000 in ?? ()
> #1 ï¿½0x00007fffef2b3fea in ?? () from
> #2 ï¿½0x00007fffef2b9658 in Java_sun_awt_X11GraphicsConfig_makeColorModel ()
> from /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/xawt/libmawt.so
> #3 ï¿½0x00007ffff7fd5bf8 in detectFeature () from
> #4 ï¿½0x00007ffff7fc423a in ?? () from build/linux-x86_64-openjdk/libjvm.so
> #5 ï¿½0x00007ffff7fbbf77 in ?? () from build/linux-x86_64-openjdk/libjvm.so
> #6 ï¿½0x00007ffff7fbe837 in ?? () from build/linux-x86_64-openjdk/libjvm.so
> #7 ï¿½0x000000004000007b in ?? ()
> #8 ï¿½0x00000000f5a8e939 in ?? ()
> #9 ï¿½0x00000000402aa51c in ?? ()
> #10 0x00007fffdddc40a0 in ?? ()That's because the JNI methods PushLocalFrame and PopLocalFrame haven't
been implemented yet. The attached patch will get around that, but it
leaks memory; a proper implementation must track local references
allocated in each frame and free them when that frame is popped. I'll
work on that when I have time.
Unfortunately, it looks like there are further problems waiting after this
problem is fixed. No surprise, really -- Swing/AWT hasn't really been
tested yet with Avian. I'll see if I can debug it into shape when I have
I didn't realize manifest attribute names should be parsed in a
case-insensitive manner. That's fixed now:
I haven't had a chance to look at that yet, but I will later.
|Re: [PATCH] fix OpenJDK [Sun]FontManager typo||Joel Dice||8/14/12 10:03 AM|
On Sun, 5 Aug 2012, Joel Dice wrote:
>> However after fixing this I get a crash in libmawt.so:>> #0 ï¿œ0x0000000000000000 in ?? ()
>> #1 ï¿œ0x00007fffef2b3fea in ?? () from
>> #2 ï¿œ0x00007fffef2b9658 in Java_sun_awt_X11GraphicsConfig_makeColorModel ()
>> from /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/xawt/libmawt.so
>> #3 ï¿œ0x00007ffff7fd5bf8 in detectFeature () from
>> #4 ï¿œ0x00007ffff7fc423a in ?? () from build/linux-x86_64-openjdk/libjvm.so
>> #5 ï¿œ0x00007ffff7fbbf77 in ?? () from build/linux-x86_64-openjdk/libjvm.so
>> #6 ï¿œ0x00007ffff7fbe837 in ?? () from build/linux-x86_64-openjdk/libjvm.so
>> #7 ï¿œ0x000000004000007b in ?? ()
>> #8 ï¿œ0x00000000f5a8e939 in ?? ()
>> #9 ï¿œ0x00000000402aa51c in ?? ()
>> #10 0x00007fffdddc40a0 in ?? ()I've added proper implementations of PushLocalFrame and PopLocalFrame, as
well is fixing a few other issues that preventing JOSM from running
properly. It seems to be working now.
This is also fixed.