Bug 777 : Create Font / by zero
Last modified: 2008-06-10 11:29




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P4
Severity:
normal

 

Reporter:
matthewrr5
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2008-05-28 16:02
Operating System: Windows XP x32
Java Version: JRE 6u6
processing version: 0135

The video chip in my main notebook just died, so I've tried installing the
processing IDE on another computer. When I try to create a font using the
Create Font tool, the following console error is given. The 'Create Font'
window is created, but completely blank. I'm a novice computer user. I've
tried to find a documented fix for this, but can't. Any help would be
appreciated.

java.lang.ArithmeticException: / by zero

at javax.swing.text.PlainView.paint(Unknown Source)

at javax.swing.plaf.basic.BasicTextUI$RootView.paint(Unknown Source)

at javax.swing.plaf.basic.BasicTextUI.paintSafely(Unknown Source)

at javax.swing.plaf.basic.BasicTextUI.paint(Unknown Source)

at javax.swing.plaf.basic.BasicTextUI.update(Unknown Source)

at javax.swing.JComponent.paintComponent(Unknown Source)

at processing.app.tools.CreateFont$2.paintComponent(CreateFont.java:152)

at javax.swing.JComponent.paint(Unknown Source)

at javax.swing.JComponent.paintChildren(Unknown Source)

at javax.swing.JComponent.paint(Unknown Source)

at javax.swing.JComponent.paintChildren(Unknown Source)

at javax.swing.JComponent.paint(Unknown Source)

at javax.swing.JComponent.paintChildren(Unknown Source)

at javax.swing.JComponent.paint(Unknown Source)

at javax.swing.JLayeredPane.paint(Unknown Source)

at javax.swing.JComponent.paintChildren(Unknown Source)

at javax.swing.JComponent.paintWithOffscreenBuffer(Unknown Source)

at javax.swing.JComponent.paintDoubleBuffered(Unknown Source)

at javax.swing.JComponent.paint(Unknown Source)

at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)

at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)

at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)

at java.awt.Container.paint(Unknown Source)

at sun.awt.RepaintArea.paint(Unknown Source)

at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)

at java.awt.Component.dispatchEventImpl(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Window.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)
Additional Comment #1 From fry 2008-05-28 16:42
have you tried using the version of processing that includes java?
Additional Comment #2 From matthewrr5 2008-05-28 17:16
(In reply to comment #1)
>
>
>
> Additional Comment #1 From
>
> fry
> 2008-05-28 16:42
>
> <!--
> addReplyLink(1); //-->[reply]
>
>
>
>
> have you tried using the version of processing that includes java?
>
>

Yes, the 135-expert version of processing generates the error message below
in the console, which, like the first, I can't understand. Here's an
additional interesting note: I can "paint in" the contents of the Create
Font window by depressing the mouse button and dragging the cursor over the
area of the window. After doing this, the font is successfully created.
Additional Comment #3 From matthewrr5 2008-05-28 17:20
I forgot to paste the console output. Here it is:

Exception in thread "AWT-EventQueue-0" java.lang.ArithmeticException: / by zero
at javax.swing.text.PlainView.paint(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI$RootView.paint(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI.paintSafely(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI.paint(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at processing.app.tools.CreateFont$2.paintComponent(CreateFont.java:152)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JLayeredPane.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
at java.awt.Container.paint(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown
Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Additional Comment #4 From fry 2008-05-29 05:01
my guess then would be that it's a bad font in your system, and presumably
it's the first font in the list. try running this code:

println(PFont.list());

and see what the output is. if the first font in the list is sketchy, you
may have your culprit.
Additional Comment #5 From matthewrr5 2008-05-30 11:13
Well, I printed off a list of my system fonts, and nothing looks fishy
although I really don't know how to determine if any of the font files are
corrupt - I don't want to uninstall all of my system fonts or anything that
drastic. I'm still able to work around the 'Create Font' window not filling
in by 'painting it in' with my cursor, then creating fonts as usual, so no
worries. Thanks for the help, Fry!
Additional Comment #6 From fry 2008-06-03 15:40
does this happen consistently on your machine? can you try it with revision
0138 and see if it has the problem?
Additional Comment #7 From matthewrr5 2008-06-04 09:15
In version 0138 the bug manifests itself somewhat differently.
The 'Create Font' window still comes up blank, however it fills in after a
single click in the window - I don't have to 'paint it all in' like before.
This is the error that pops up in the console when I open the Create Font
window:

Exception in thread "AWT-EventQueue-0" java.lang.ArithmeticException: / by zero
at javax.swing.text.PlainView.paint(PlainView.java:256)
at javax.swing.plaf.basic.BasicTextUI$RootView.paint(BasicTextUI.java:1338)
at javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:643)
at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:781)
at javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:760)
at javax.swing.JComponent.paintComponent(JComponent.java:743)
at processing.app.tools.CreateFont$2.paintComponent(CreateFont.java:153)
at javax.swing.JComponent.paint(JComponent.java:1006)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paint(JComponent.java:1015)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paint(JComponent.java:1015)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paint(JComponent.java:1015)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4979)
at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4925)
at javax.swing.JComponent.paint(JComponent.java:996)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
at java.awt.Container.paint(Container.java:1709)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
at sun.awt.RepaintArea.paint(RepaintArea.java:224)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:254)
at java.awt.Component.dispatchEventImpl(Component.java:4060)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Window.dispatchEventImpl(Window.java:1791)
at java.awt.Component.dispatchEvent(Component.java:3819)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Exception in thread "AWT-EventQueue-0" java.lang.ArithmeticException: / by zero
at javax.swing.text.PlainView.paint(PlainView.java:256)
at javax.swing.plaf.basic.BasicTextUI$RootView.paint(BasicTextUI.java:1338)
at javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:643)
at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:781)
at javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:760)
at javax.swing.JComponent.paintComponent(JComponent.java:743)
at processing.app.tools.CreateFont$2.paintComponent(CreateFont.java:153)
at javax.swing.JComponent.paint(JComponent.java:1006)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paint(JComponent.java:1015)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paint(JComponent.java:1015)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paint(JComponent.java:1015)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
at javax.swing.JComponent.paintChildren(JComponent.java:843)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4979)
at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4925)
at javax.swing.JComponent.paint(JComponent.java:996)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
at java.awt.Container.paint(Container.java:1709)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
at sun.awt.RepaintArea.paint(RepaintArea.java:224)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:254)
at java.awt.Component.dispatchEventImpl(Component.java:4060)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Window.dispatchEventImpl(Window.java:1791)
at java.awt.Component.dispatchEvent(Component.java:3819)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Additional Comment #8 From fry 2008-06-07 08:14
ok, i think i may have found a fix. for some reason, there's no default
font set for the component, so for 0140 i'll set one. not sure if that'll
fix things, but keep an eye out for the release of 0140.
Additional Comment #9 From fry 2008-06-10 11:29
in the process of releasing 0140, this should be fixed there--please test!