This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 21122

Summary: Large font size may cause an exception
Product: platform Reporter: Sergey Soldatov <ssa>
Component: TextAssignee: Peter Zavadsky <pzavadsky>
Status: CLOSED WONTFIX    
Severity: blocker    
Priority: P3    
Version: 3.x   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Sergey Soldatov 2002-03-04 13:01:07 UTC
It was easy to reproduce this bug with following configuration:
Windows 2000, 1280x1024x32, FFJ build 020301 just installed.
run IDE and open any non empty file ( I've used sampledir->clock->README), open 
editor's properties (Tools->Options->Editing->Editor Settings->Plain Editor). 
Set 'Font Size' to 200. Exception will be thrown. I've reproduced this bug on 
Solaris 8 also but it has took much more time and attempts.

Mon Mar 04 16:02:22 GMT+03:00 2002: java.lang.IllegalArgumentException: Zero 
length string passed to TextLayout constructor.
java.lang.IllegalArgumentException: Zero length string passed to TextLayout 
constructor.
        at java.awt.font.TextLayout.<init>(TextLayout.java:471)
        at sun.java2d.pipe.OutlineTextRenderer.drawString
(OutlineTextRenderer.java:67)
        at sun.java2d.pipe.GlyphListPipe.drawString(GlyphListPipe.java:32)
        at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2568)
        at javax.swing.plaf.basic.BasicGraphicsUtils.drawStringUnderlineCharAt
(BasicGraphicsUtils.java:233)
        at javax.swing.plaf.basic.BasicLabelUI.paintEnabledText
(BasicLabelUI.java:81)
        at javax.swing.plaf.basic.BasicLabelUI.paint(BasicLabelUI.java:164)
        at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
        at javax.swing.JComponent.paintComponent(JComponent.java:537)
        at javax.swing.JComponent.paint(JComponent.java:804)
        at javax.swing.JComponent.paintChildren(JComponent.java:643)
        at javax.swing.JComponent.paint(JComponent.java:813)
        at javax.swing.JComponent.paintChildren(JComponent.java:643)
        at javax.swing.JComponent.paint(JComponent.java:813)
        at javax.swing.JComponent.paintChildren(JComponent.java:643)
        at javax.swing.JComponent.paint(JComponent.java:813)
        at javax.swing.JComponent.paintChildren(JComponent.java:643)
        at javax.swing.JComponent.paint(JComponent.java:813)
        at javax.swing.JComponent.paintChildren(JComponent.java:643)
        at javax.swing.JComponent.paint(JComponent.java:813)
        at javax.swing.JComponent.paintChildren(JComponent.java:643)
        at javax.swing.JComponent.paint(JComponent.java:813)
        at javax.swing.JComponent.paintChildren(JComponent.java:643)
        at javax.swing.JComponent.paint(JComponent.java:813)
        at javax.swing.JLayeredPane.paint(JLayeredPane.java:552)
        at javax.swing.JComponent.paintChildren(JComponent.java:643)
        at javax.swing.JComponent.paint(JComponent.java:813)
        at javax.swing.JComponent.paintChildren(JComponent.java:643)
        at javax.swing.JComponent.paint(JComponent.java:813)
        at javax.swing.JComponent.paintChildren(JComponent.java:643)
        at javax.swing.JComponent.paint(JComponent.java:813)
        at javax.swing.JLayeredPane.paint(JLayeredPane.java:552)
        at javax.swing.JComponent.paintChildren(JComponent.java:643)
        at javax.swing.JComponent.paint(JComponent.java:813)
        at javax.swing.JViewport.paint(JViewport.java:707)
        at javax.swing.JComponent.paintChildren(JComponent.java:643)
        at javax.swing.JComponent.paint(JComponent.java:813)
        at javax.swing.JComponent.paintChildren(JComponent.java:643)
        at javax.swing.JComponent.paint(JComponent.java:813)
        at javax.swing.JComponent.paintChildren(JComponent.java:643)
        at javax.swing.JComponent.paint(JComponent.java:813)
        at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4735)
        at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4688)
        at javax.swing.JComponent._paintImmediately(JComponent.java:4632)
        at javax.swing.JComponent.paintImmediately(JComponent.java:4464)
        at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:404)
        at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run
(SystemEventQueueUtilities.java:117)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:443)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:144)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
Comment 1 Marian Mirilovic 2002-03-04 15:18:33 UTC
4.0 dev != FFJ 4.0 ea
please mark correct version next time!

It seems like this is JDK issue. 

The same exception arise if you create JFrame, add JTextArea and set
font for 200. 

Please file issue on JDK/swing.
Thanks for report.
Comment 2 Quality Engineering 2003-07-01 15:52:02 UTC
Resolved for 3.4.x or earlier, no new info since then -> verified
Comment 3 Quality Engineering 2003-07-01 16:23:10 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.