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 237785 - Go To Type Exception when multiple matches are found
Summary: Go To Type Exception when multiple matches are found
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-30 03:45 UTC by ivvyShaun
Modified: 2013-11-14 14:32 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Messages.log (485.34 KB, application/octet-stream)
2013-10-30 03:45 UTC, ivvyShaun
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ivvyShaun 2013-10-30 03:45:10 UTC
Created attachment 141675 [details]
Messages.log

When using the Go To Type function (ctrl + o) an exception occurs when multiple matches are found.

It should be noted that:
- The file system is accessed over a samba network
- The problem did not occur with the same project in Netbeans versions < 7.4
- The location filled is filled with the closes match, but the Types Found section remains stuck at "Searching...   cancel"
- Pressing the cancel button displays the list, but not properly, the names are only visible when highlighted with mouse or key stroke.
- The Exception dump starts with java.lang.StringIndexOutOfBoundsException: String index out of range:

See the attached messages.log for more details. I have included the dump that was attempted to be sent as an error report, but the error reporting failed, that's possibly a separate bug  or may be a local network/firewall issue which I will not bother reporting.

java.lang.StringIndexOutOfBoundsException: String index out of range: -6
	at java.lang.String.substring(String.java:1875)
	at org.netbeans.modules.php.editor.csl.PHPTypeSearcher$PHPTypeDescriptor.getContextName(PHPTypeSearcher.java:325)
	at org.netbeans.modules.csl.core.TypeAndSymbolProvider$TypeWrapper.getContextName(TypeAndSymbolProvider.java:303)
	at org.netbeans.modules.jumpto.type.GoToTypeAction$Renderer.getListCellRendererComponent(GoToTypeAction.java:843)
	at javax.swing.plaf.basic.BasicListUI.paintCell(BasicListUI.java:208)
	at javax.swing.plaf.basic.BasicListUI.paintImpl(BasicListUI.java:317)
	at javax.swing.plaf.basic.BasicListUI.paint(BasicListUI.java:240)
	at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
	at javax.swing.JComponent.paintComponent(JComponent.java:778)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintChildren(JComponent.java:887)
	at javax.swing.JComponent.paint(JComponent.java:1063)
	at javax.swing.JViewport.paint(JViewport.java:731)
	at javax.swing.JComponent.paintChildren(JComponent.java:887)
	at javax.swing.JComponent.paint(JComponent.java:1063)
	at javax.swing.JComponent.paintChildren(JComponent.java:887)
	at javax.swing.JComponent.paint(JComponent.java:1063)
	at javax.swing.JComponent.paintChildren(JComponent.java:887)
	at javax.swing.JComponent.paint(JComponent.java:1063)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5221)
	at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1236)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5169)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4980)
	at javax.swing.RepaintManager$3.run(RepaintManager.java:796)
	at javax.swing.RepaintManager$3.run(RepaintManager.java:784)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:784)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:757)
	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:706)
	at javax.swing.RepaintManager.access$1000(RepaintManager.java:62)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1651)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:688)
	at java.awt.EventQueue$3.run(EventQueue.java:686)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:697)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
	at java.awt.Dialog.show(Dialog.java:1082)
	at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:1078)
	at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:1128)
	at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:1100)
	at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:128)
	at org.openide.util.Mutex.doEventAccess(Mutex.java:1368)
	at org.openide.util.Mutex.readAccess(Mutex.java:278)
	at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:1085)
	at java.awt.Component.show(Component.java:1651)
	at java.awt.Component.setVisible(Component.java:1603)
	at java.awt.Window.setVisible(Window.java:1014)
	at java.awt.Dialog.setVisible(Dialog.java:1005)
	at org.netbeans.modules.jumpto.type.GoToTypeAction.getSelectedTypes(GoToTypeAction.java:209)
	at org.netbeans.modules.jumpto.type.GoToTypeAction.getSelectedTypes(GoToTypeAction.java:180)
	at org.netbeans.modules.jumpto.type.GoToTypeAction.getSelectedTypes(GoToTypeAction.java:176)
	at org.netbeans.modules.jumpto.type.GoToTypeAction.actionPerformed(GoToTypeAction.java:166)
	at org.openide.windows.TopComponent.processKeyBinding(TopComponent.java:1176)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2940)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2842)
	at org.openide.awt.QuickSearch$SearchTextField.processKeyEvent(QuickSearch.java:715)
	at org.openide.awt.QuickSearch.processKeyEvent(QuickSearch.java:272)
	at org.netbeans.modules.notifications.center.NotificationCenterTopComponent$TableKeyListener.processKeyEvent(NotificationCenterTopComponent.java:354)
	at org.netbeans.modules.notifications.center.NotificationTable.fireProcessKeyEvent(NotificationTable.java:152)
	at org.netbeans.modules.notifications.center.NotificationTable.processKeyEvent(NotificationTable.java:136)
	at java.awt.Component.processEvent(Component.java:6282)
	at java.awt.Container.processEvent(Container.java:2229)
	at java.awt.Component.dispatchEventImpl(Component.java:4861)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1895)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:762)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1027)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:899)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:727)
	at java.awt.Component.dispatchEventImpl(Component.java:4731)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Window.dispatchEventImpl(Window.java:2719)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:688)
	at java.awt.EventQueue$3.run(EventQueue.java:686)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:702)
	at java.awt.EventQueue$4.run(EventQueue.java:700)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Comment 1 Ondrej Brejla 2013-10-30 08:41:23 UTC
It occured in older versions as well....it's a duplicate of issue #230817. For some reason your project path is longer then that file path. Probably somehow related with network drives...
Comment 2 Ondrej Brejla 2013-10-30 10:29:41 UTC
Fixed in web-main #af9852d4f9d1
Comment 3 Ondrej Brejla 2013-11-11 12:58:43 UTC
Testers, please, verify ASAP. Thanks!
Comment 4 Vladimir Riha 2013-11-12 10:17:31 UTC
I can't reproduce it, I tried to mount some shared dir with samba and symbolic links and no luck. The fix seems to be safe though, verified

Product Version: NetBeans IDE Dev (Build 201311120002)
Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Comment 5 Ondrej Brejla 2013-11-12 13:14:20 UTC
Transplanted to release74 branch, please verify, thanks.
Comment 6 mmolda 2013-11-14 13:57:55 UTC
Verified.

Product Version: NetBeans IDE 7.4 (Build 201311141216)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b50
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b108
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 7 Quality Engineering 2013-11-14 14:32:31 UTC
Integrated into 'releases/release74', will be available in build *201311141216* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/d94655fc0763
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #237785 - Go To Type Exception when multiple matches are found
(transplanted from af9852d4f9d1d6f84829a21bd0c306a9acef6d0b)