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(
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
Depends on:
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:

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

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.
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(
	at sun.font.ExtendedTextSourceLabel.getCharinfo(
	at sun.font.ExtendedTextSourceLabel.getCharX(
	at java.awt.font.TextLine$3.computeFunction(
	at java.awt.font.TextLine.applyFunctionAtIndex(
	at java.awt.font.TextLine.getCharXPosition(
	at java.awt.font.TextLine.getCharLinePosition(
	at java.awt.font.TextLayout.getCaretInfo(
	at java.awt.font.TextLayout.getCaretPath(
	at java.awt.font.TextLayout.caretBoundingShape(
	at java.awt.font.TextLayout.getVisualHighlightShape(
	at org.netbeans.modules.editor.lib2.view.TextLayoutUtils.getRealAlloc(
	at org.netbeans.modules.editor.lib2.view.HighlightsViewUtils.indexToView(
	at org.netbeans.modules.editor.lib2.view.HighlightsView.modelToViewChecked(
	at org.netbeans.modules.editor.lib2.view.ParagraphViewChildren.modelToViewChecked(
	at org.netbeans.modules.editor.lib2.view.ParagraphView.modelToViewChecked(
	at org.netbeans.modules.editor.lib2.view.DocumentViewChildren.modelToViewChecked(
	at org.netbeans.modules.editor.lib2.view.DocumentView.modelToViewNeedsLock(
	at org.netbeans.modules.editor.lib2.view.DocumentView.modelToViewChecked(
	at org.netbeans.modules.editor.lib2.view.EditorView.modelToView(
	at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(
	at javax.swing.plaf.basic.BasicTextUI.modelToView(
	at org.netbeans.editor.BaseCaret$
	at org.netbeans.editor.BaseDocument.render(
	at org.netbeans.editor.BaseCaret.updateCaretBounds(
	at org.netbeans.editor.BaseCaret.update(
	at org.netbeans.editor.BaseCaret$
	at org.netbeans.editor.Utilities.runInEventDispatchThread(
	at org.netbeans.editor.BaseCaret.dispatchUpdate(
	at org.netbeans.editor.BaseCaret.modifiedUpdate(
	at org.netbeans.editor.BaseCaret.atomicUnlock(
	at org.netbeans.editor.BaseDocument.fireAtomicUnlock(
	at org.netbeans.editor.BaseDocument.atomicUnlockImpl(
	at org.netbeans.editor.BaseDocument.atomicUnlockImpl(
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(
	at org.netbeans.editor.BaseKit$DefaultKeyTypedAction.actionPerformed(
	at org.netbeans.editor.ext.ExtKit$ExtDefaultKeyTypedAction.actionPerformed(
	at org.netbeans.editor.BaseAction.actionPerformed(
	at javax.swing.SwingUtilities.notifyAction(
	at javax.swing.JComponent.processKeyBinding(
	at javax.swing.JComponent.processKeyBindings(
	at javax.swing.JComponent.processKeyEvent(
	at java.awt.Component.processEvent(
	at java.awt.Container.processEvent(
	at java.awt.Component.dispatchEventImpl(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.KeyboardFocusManager.redispatchEvent(
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(
	at java.awt.Component.dispatchEventImpl(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Window.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.EventQueue.dispatchEventImpl(
	at java.awt.EventQueue.access$300(
	at java.awt.EventQueue$
	at java.awt.EventQueue$
	at Method)
	at java.awt.EventQueue$
	at java.awt.EventQueue$
	at Method)
	at java.awt.EventQueue.dispatchEvent(
	at org.netbeans.core.TimableEventQueue.dispatchEvent(
	at java.awt.EventDispatchThread.pumpOneEventForFilters(
	at java.awt.EventDispatchThread.pumpEventsForFilter(
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(
	at java.awt.EventDispatchThread.pumpEvents(
	at java.awt.EventDispatchThread.pumpEvents(
[catch] at
Comment 5 Milutin Kristofic 2013-07-18 14:12:52 UTC

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