[ 
https://issues.apache.org/jira/browse/NETBEANS-4620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17182871#comment-17182871
 ] 

Junichi Yamamoto commented on NETBEANS-4620:
--------------------------------------------

Thanks for catching this and sorry for the inconvenience.

*Steps to reproduce*
 * Select longer text than "Find" text field length
 * RunĀ Find([Ctrl] + [F])
 * Click any place in editor (clear selection)
 * RunĀ Find([Ctrl] + [F])
 * NPE occurs

> NullPointerException - finding occurrences
> ------------------------------------------
>
>                 Key: NETBEANS-4620
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-4620
>             Project: NetBeans
>          Issue Type: Bug
>    Affects Versions: 12.1
>         Environment: Product Version: Apache NetBeans IDE 12.1-beta1
> Java: 12.0.2; Java HotSpot(TM) 64-Bit Server VM 12.0.2+10
> Runtime: Java(TM) SE Runtime Environment 12.0.2+10
>            Reporter: Czukowski
>            Assignee: Junichi Yamamoto
>            Priority: Major
>         Attachments: Annotation 2020-07-23 115255.png, idelog-1.txt, 
> selfsampler.npss, uilog.xml
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Was testing 12.1 beta1 today, everything was great during my usual activity, 
> but then this happened. An exception icon has appeared and the IDE became 
> unresponsive for several minutes, not as much as to invoke the Windows' 
> WerFault dialog though, the mouse cursor has changed according to the area 
> (editor vs other UI), but I couldn't click anything, the UI appeared frozen 
> otherwise.
> I don't know if it's related to the update, but it didn't happen before.
> I was looking for text occurrences in a file (using Ctrl+F), then I must have 
> invoked some action shortcut by mistake because the content of the file have 
> changed - there used to be a normal assignment (disregard the editor cursor 
> position though, it has changed during my attempts to click anywhere):
> !Annotation 2020-07-23 115255.png!
> After some time the IDE became responsive again, but froze shortly after that 
> for some more time. It has been in such state until I closed it. By then it 
> has gradually consumed around 9 GB of RAM :)
> I was able to take a profiler snapshot and extract the exception details and 
> UI/IDE logs during the moments when the IDE was responsive, see the 
> attachments.
> Stack trace:
> {code}
> java.lang.NullPointerException at 
> java.desktop/javax.swing.text.JTextComponent.write(JTextComponent.java:1655) 
> at java.desktop/javax.swing.JEditorPane.getText(JEditorPane.java:1451) at 
> org.netbeans.modules.editor.search.SearchBar.showNumberOfMatches(SearchBar.java:1039)
>  at 
> org.netbeans.modules.editor.search.SearchBar$13.caretUpdate(SearchBar.java:502)
>  at 
> java.desktop/javax.swing.text.JTextComponent.fireCaretUpdate(JTextComponent.java:412)
>  at 
> java.desktop/javax.swing.text.JTextComponent$MutableCaretEvent.fire(JTextComponent.java:4489)
>  at 
> java.desktop/javax.swing.text.JTextComponent$MutableCaretEvent.mouseReleased(JTextComponent.java:4545)
>  at 
> java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
>  at 
> java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
>  at 
> java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
>  at 
> java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
>  at 
> java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
>  at 
> java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
>  at java.desktop/java.awt.Component.processMouseEvent(Component.java:6632) at 
> java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342) 
> at java.desktop/java.awt.Component.processEvent(Component.java:6397) at 
> java.desktop/java.awt.Container.processEvent(Container.java:2263) at 
> java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008) at 
> java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321) at 
> java.desktop/java.awt.Component.dispatchEvent(Component.java:4840) at 
> java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
>  at 
> java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
>  at 
> java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
>  at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307) at 
> java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2762) at 
> java.desktop/java.awt.Component.dispatchEvent(Component.java:4840) at 
> java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772) at 
> java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at 
> java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at 
> java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
>  at 
> java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
>  at 
> java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
>  at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745) at 
> java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743) at 
> java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
>  at 
> java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
>  at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at 
> org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136) 
> [catch] at 
> java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
>  at 
> java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
>  at 
> java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
>  at 
> java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
>  at 
> java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
>  at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to