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 229256 - java.lang.ArrayIndexOutOfBoundsException: 0 at sun.font.ExtendedTextSourceLabel.createCharinfo(ExtendedTextSourceLabel.java:608)
Summary: java.lang.ArrayIndexOutOfBoundsException: 0 at sun.font.ExtendedTextSourc...
Status: RESOLVED DUPLICATE of bug 232136
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 7.3
Hardware: PC Other
: P4 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-01 20:21 UTC by circa
Modified: 2013-07-18 14:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (17.47 KB, text/plain)
2013-05-01 20:21 UTC, circa
Details
Messages log (68.05 KB, text/plain)
2013-05-02 17:16 UTC, circa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description circa 2013-05-01 20:21:50 UTC
Created attachment 134016 [details]
Thread dump

I am able to cause a hang by using the Find function in the editor (Ctrl-f / F3).

Step 1:
When editing a file, Ctrl-f to initiate find

Step 2:
enter search text

Step 3:
Ctrl-a, backspace, Esc (to clear find entry and close find toolbar)

Step 4:
Ctrl-f to initiate find again

Step 5:
Begin typing a new search phrase; NetBeans hangs immediately when the first character is entered


I should also note that the find toolbar is behaving incorrectly as well; although the search is operating correctly (items are found as I type), none of the input I type appears in the text field. The hang appears to only occur when input has been entered previously into the find textbox; i.e. I can open and close the find toolbar as many times as I want without causing a hang as long as I do not type in anything to search for.


Running Netbeans 7.3 on Freebsd 9.1 AMD64, installed from packages collection.
Comment 1 Milutin Kristofic 2013-05-02 13:03:53 UTC
Thread dump doesn't show any problem.

Could you please take a profile snapshot (through Profile Me feature) during
the freeze, attach it here and reopen ? 
Thanks in advance.
http://wiki.netbeans.org/GenerateThreadDump#Profile_Me_Now
Comment 2 circa 2013-05-02 17:16:42 UTC
Created attachment 134049 [details]
Messages log
Comment 3 circa 2013-05-02 17:21:30 UTC
Unfortunately, NetBeans hangs completely and I'm unable to complete a profile via the Profile Me UI. If there's a way to complete a profile by some other means though, I'll give it a try.

One thing that may be helpful are the errors I seem to be getting in the messages log: when I trigger the freeze, a whole lot of ArrayIndexOutOfBoundsException errors get dumped to the logfile. I've attached a messages.log that should be pretty clean; I deleted it before starting NetBeans, then after the editor loaded I opened a single file and performed the steps to trigger the freeze. It looks like the ArrayIndexOutOfBoundsException errors started to get logged as soon as I opened the find toolbar for the second time.
Comment 4 Milutin Kristofic 2013-05-14 12:56:39 UTC
The exceptions in messages.log can caused error. It can happen, since you use Freebsd, that is not fully supported by Netbeans. Since FreeBsd and that you are first reporter, I decrease priority to P4. 

java.lang.ArrayIndexOutOfBoundsException: 0
	at sun.font.ExtendedTextSourceLabel.createCharinfo(ExtendedTextSourceLabel.java:608)
	at sun.font.ExtendedTextSourceLabel.getCharinfo(ExtendedTextSourceLabel.java:508)
	at sun.font.ExtendedTextSourceLabel.getCharX(ExtendedTextSourceLabel.java:352)
	at java.awt.font.TextLine$3.computeFunction(TextLine.java:524)
	at java.awt.font.TextLine.applyFunctionAtIndex(TextLine.java:660)
	at java.awt.font.TextLine.getCharXPosition(TextLine.java:677)
	at java.awt.font.TextLine.getCharLinePosition(TextLine.java:687)
	at java.awt.font.TextLayout.getCaretInfo(TextLayout.java:1147)
	at java.awt.font.TextLayout.getCaretPath(TextLayout.java:1640)
	at java.awt.font.TextLayout.caretBoundingShape(TextLayout.java:2004)
	at java.awt.font.TextLayout.getVisualHighlightShape(TextLayout.java:2187)
	at org.netbeans.modules.editor.lib2.view.TextLayoutUtils.getRealAlloc(TextLayoutUtils.java:127)
	at org.netbeans.modules.editor.lib2.view.HighlightsViewUtils.indexToView(HighlightsViewUtils.java:134)
	at org.netbeans.modules.editor.lib2.view.HighlightsView.modelToViewChecked(HighlightsView.java:217)
	at org.netbeans.modules.editor.lib2.view.ParagraphViewChildren.modelToViewChecked(ParagraphViewChildren.java:520)
	at org.netbeans.modules.editor.lib2.view.ParagraphView.modelToViewChecked(ParagraphView.java:382)
	at org.netbeans.modules.editor.lib2.view.DocumentViewChildren.modelToViewChecked(DocumentViewChildren.java:321)
	at org.netbeans.modules.editor.lib2.view.DocumentView.modelToViewNeedsLock(DocumentView.java:738)
	at org.netbeans.modules.editor.lib2.view.DocumentView.modelToViewChecked(DocumentView.java:724)
	at org.netbeans.modules.editor.lib2.view.EditorView.modelToView(EditorView.java:249)
	at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(BasicTextUI.java:1514)
	at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1052)
	at org.netbeans.editor.BaseCaret$2.run(BaseCaret.java:430)
	at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1383)
	at org.netbeans.editor.BaseCaret.updateCaretBounds(BaseCaret.java:413)
	at org.netbeans.editor.BaseCaret.update(BaseCaret.java:760)
	at org.netbeans.editor.BaseCaret$4.run(BaseCaret.java:725)
	at org.netbeans.editor.Utilities.runInEventDispatchThread(Utilities.java:1047)
	at org.netbeans.editor.BaseCaret.dispatchUpdate(BaseCaret.java:716)
	at org.netbeans.editor.BaseCaret.modifiedUpdate(BaseCaret.java:1445)
	at org.netbeans.editor.BaseCaret.atomicUnlock(BaseCaret.java:1462)
	at org.netbeans.editor.BaseDocument.fireAtomicUnlock(BaseDocument.java:1810)
	at org.netbeans.editor.BaseDocument.atomicUnlockImpl(BaseDocument.java:1746)
	at org.netbeans.editor.BaseDocument.atomicUnlockImpl(BaseDocument.java:1735)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:356)
	at org.netbeans.editor.BaseKit$DefaultKeyTypedAction.actionPerformed(BaseKit.java:1173)
	at org.netbeans.editor.ext.ExtKit$ExtDefaultKeyTypedAction.actionPerformed(ExtKit.java:1022)
	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:339)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1664)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2851)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2886)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2814)
	at java.awt.Component.processEvent(Component.java:5928)
	at java.awt.Container.processEvent(Container.java:2105)
	at java.awt.Component.dispatchEventImpl(Component.java:4512)
	at java.awt.Container.dispatchEventImpl(Container.java:2163)
	at java.awt.Component.dispatchEvent(Component.java:4338)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1879)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:760)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1036)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:903)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:724)
	at java.awt.Component.dispatchEventImpl(Component.java:4382)
	at java.awt.Container.dispatchEventImpl(Container.java:2163)
	at java.awt.Window.dispatchEventImpl(Window.java:2485)
	at java.awt.Component.dispatchEvent(Component.java:4338)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:675)
	at java.awt.EventQueue.access$300(EventQueue.java:96)
	at java.awt.EventQueue$2.run(EventQueue.java:634)
	at java.awt.EventQueue$2.run(EventQueue.java:632)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
	at java.awt.EventQueue$3.run(EventQueue.java:648)
	at java.awt.EventQueue$3.run(EventQueue.java:646)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:645)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
[catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Comment 5 Milutin Kristofic 2013-07-18 14:12:52 UTC

*** This bug has been marked as a duplicate of bug 232136 ***