krasa / GrepConsole

IntelliJ plugin - https://plugins.jetbrains.com/plugin/7125
Apache License 2.0
436 stars 57 forks source link

NullPointerException when run application and open console #194

Closed TheFunnyBear closed 3 years ago

TheFunnyBear commented 3 years ago

Describe the bug NullPointerException when run application and open console

To Reproduce Steps to reproduce the behavior: 1.Run aplication from IDE and open console

IntelliJ IDEA 2021.1 (Community Edition)

Grep Console version 11.7.211.6085.0

java.lang.NullPointerException at krasa.grepconsole.grep.gui.GrepUtils.flushAndProcess(GrepUtils.java:78) at krasa.grepconsole.grep.gui.GrepUtils.grepThroughExistingText(GrepUtils.java:26) at krasa.grepconsole.grep.OpenGrepConsoleAction.createGrepConsole(OpenGrepConsoleAction.java:200) at krasa.grepconsole.grep.PinnedGrepsReopener$1.initConsole(PinnedGrepsReopener.java:156) at krasa.grepconsole.grep.PinnedGrepsReopener$1.lockAndInitAllConsoles(PinnedGrepsReopener.java:142) at krasa.grepconsole.grep.PinnedGrepsReopener$1.lambda$run$0(PinnedGrepsReopener.java:92) at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:218) at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:200) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:319) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:133) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46) at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:189) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) 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(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:969) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:839) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496) 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:9

krasa commented 3 years ago

Strange, not sure what is going on there. Here is a fix, maybe it will need to fix more: GrepConsole.zip

TheFunnyBear commented 3 years ago

Thank you, it help me, no more error.