FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 1434 : java.nio.BufferUnderflowException thrown when running Processing IDE
Last modified: 2010-01-12 06:19
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
INVALID -
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
kof
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2010-01-12 06:13
Processing 1.0.9
GNU/Linux machine (2.6.31-17-generic kernel, Ubuntu 9.10 - Karmic Koala)
with and without "java" folder sym-linked to java-jdk folder (java-6-sun-1.6.0.16).
error output:
java.nio.BufferUnderflowException
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:127)
at sun.font.TrueTypeFont.lookupName(TrueTypeFont.java:1146)
at sun.font.TrueTypeFont.getPostscriptName(TrueTypeFont.java:1197)
at java.awt.Font.getPSName(Font.java:1156)
at processing.app.tools.CreateFont.init(CreateFont.java:127)
at processing.app.Editor.createToolMenuItem(Editor.java:818)
at processing.app.Editor.addInternalTools(Editor.java:842)
at processing.app.Editor.buildToolsMenu(Editor.java:671)
at processing.app.Editor.buildMenuBar(Editor.java:485)
at processing.app.Editor.<init>(Editor.java:177)
at processing.app.Base.handleOpen(Base.java:702)
at processing.app.Base.handleOpen(Base.java:667)
at processing.app.Base.handleNew(Base.java:564)
at processing.app.Base.<init>(Base.java:304)
at processing.app.Base.main(Base.java:197)
Exception in thread "main" java.lang.NullPointerException
at java.awt.Container.addImpl(Container.java:1045)
at java.awt.Container.add(Container.java:365)
at javax.swing.JPopupMenu.add(JPopupMenu.java:272)
at javax.swing.JMenu.add(JMenu.java:562)
at processing.app.Editor.addInternalTools(Editor.java:842)
at processing.app.Editor.buildToolsMenu(Editor.java:671)
at processing.app.Editor.buildMenuBar(Editor.java:485)
at processing.app.Editor.<init>(Editor.java:177)
at processing.app.Base.handleOpen(Base.java:702)
at processing.app.Base.handleOpen(Base.java:667)
at processing.app.Base.handleNew(Base.java:564)
at processing.app.Base.<init>(Base.java:304)
at processing.app.Base.main(Base.java:197)
.. it seems to produce completely the same error with version 1.0.7 ..I am pretty sure it was
running well before last Ubuntu dist-upgrade (Jaunty Jackalope 9.04)
Additional Comment
#1 From fry 2010-01-12 06:19
That looks like an bug in that Java implementation. It may be a bad font,
but the Java implementation isn't recovering properly. To reproduce in
plain Java, it would be:
GraphicsEnvironment ge =
GraphicsEnvironment.getLocalGraphicsEnvironment();
Font fonts[] = ge.getAllFonts();
for (int i = 0; i < fonts.length; i++) {
String psname = fonts[i].getPSName();
System.out.println(psname);
}
At some point that will crash when it hits the bad font.
I'd file it with the Java maintainers so that they can look into it. If the
font doesn't have a postscript name, it should be returning null or an
exception, not a BufferUnderflowException.