Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

NullPointerException when using search without a selection #2

Closed
MichaelMure opened this issue Aug 23, 2018 · 6 comments
Closed

NullPointerException when using search without a selection #2

MichaelMure opened this issue Aug 23, 2018 · 6 comments

Comments

@MichaelMure
Copy link

Hi,

I got a NullPointerException at this line when using the search function without text selected.

getSelected will return null when there is no selection but it's not properly checked.

java.lang.NullPointerException
	at Search.actionPerformed(Search.java:50)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:220)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:237)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:304)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:307)
	at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:106)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:294)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:114)
	at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:88)
	at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:111)
	at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120)
	at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:114)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:529)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:49)
	at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:549)
	at java.awt.Component.processMouseEvent(Component.java:6548)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
	at java.awt.Component.processEvent(Component.java:6313)
	at java.awt.Container.processEvent(Container.java:2237)
	at java.awt.Component.dispatchEventImpl(Component.java:4903)
	at java.awt.Container.dispatchEventImpl(Container.java:2295)
	at java.awt.Component.dispatchEvent(Component.java:4725)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
	at java.awt.Container.dispatchEventImpl(Container.java:2281)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4725)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.awt.EventQueue$4.run(EventQueue.java:735)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at com.intellij.ide.IdeEventQueue.i(IdeEventQueue.java:781)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:718)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
@danielevan
Copy link

Same bug as #3

@slimsag
Copy link
Member

slimsag commented Oct 25, 2018

@KattMingMing is working on a fix for both in #4 which I think we will merge soon

@slimsag
Copy link
Member

slimsag commented Oct 25, 2018

@KattMingMing close this once you hear back from JetBrains that your fix from #4 is released

@ShrykeWindgrace
Copy link

Hi! Do you have any updates on this issue? The latest version available on JetBrains plugin marketplace is still 1.1.1 released in 2017.

@rpalcolea
Copy link

hi folks, do you have plans to release this fix in the marketplace soon? @slimsag @KattMingMing

@slimsag
Copy link
Member

slimsag commented Nov 5, 2019

Apologies for the massive delay on this issue everyone. The fix has been uploaded as v1.1.2 and should be live on the Jetbrains Plugin Repository in ~2 business days: https://plugins.jetbrains.com/plugin/9682-sourcegraph/

@slimsag slimsag closed this as completed Nov 5, 2019
philipp-spiess added a commit that referenced this issue Jan 28, 2022
* Upgrade Gradle wrapper to 7.0

* Upgrade config file and IntelliJ version

* Add workflow to run UI tests

* Run UI Tests on every push

* Fix tests

* Remove wait

* Run tests in debug mode

* Add build workflow

* Move build.gradle to Kotlin

* Clean up build.gradle.kts

* Ensure we start the build with the proper JVM version

* Migrate changelog format to use org.jetbrains.changelog

* Update workflows and bring back UI test server

* Cleanup build.yml workflow

* Retry UI tests to see if they are still flaky #1

* Retry UI tests to see if they are still flaky #2

* Revert min version changes
philipp-spiess added a commit that referenced this issue Apr 22, 2022
* Upgrade Gradle wrapper to 7.0

* Upgrade config file and IntelliJ version

* Add workflow to run UI tests

* Run UI Tests on every push

* Fix tests

* Remove wait

* Run tests in debug mode

* Add build workflow

* Move build.gradle to Kotlin

* Clean up build.gradle.kts

* Ensure we start the build with the proper JVM version

* Migrate changelog format to use org.jetbrains.changelog

* Update workflows and bring back UI test server

* Cleanup build.yml workflow

* Retry UI tests to see if they are still flaky #1

* Retry UI tests to see if they are still flaky #2

* Revert min version changes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants