cursive-ide / emacs-plus

Some patches to make the IntelliJ Emacs+ plugin work correctly with recent versions of IntelliJ.
Other
41 stars 18 forks source link

isearch-forward causes NPE in 2019.2 #13

Closed berquist closed 4 years ago

berquist commented 5 years ago

As a result, hitting C-s the first time works, but hitting it repeatedly afterward does not.

java.lang.NullPointerException
    at com.mulgasoft.emacsplus.actions.search.ISearchForward$SwitchToISearchBack.<init>(ISearchForward.java:355)
    at com.mulgasoft.emacsplus.actions.search.ISearchForward.setSwitchAction(ISearchForward.java:217)
    at com.mulgasoft.emacsplus.actions.search.ISearchForward.after(ISearchForward.java:139)
    at com.mulgasoft.emacsplus.actions.EmacsPlusAction$EmacsPlusCommandListener.commandFinished(EmacsPlusAction.java:64)
    at com.intellij.openapi.command.impl.CoreCommandProcessor$1.commandFinished(CoreCommandProcessor.java:98)
    at jdk.internal.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:102)
    at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:446)
    at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:406)
    at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:395)
    at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:372)
    at com.intellij.util.messages.impl.MessageBusImpl.lambda$createTopicHandler$1(MessageBusImpl.java:242)
    at com.sun.proxy.$Proxy38.commandFinished(Unknown Source)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.fireCommandFinished(CoreCommandProcessor.java:280)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.finishCommand(CoreCommandProcessor.java:261)
    at com.intellij.openapi.command.impl.CommandProcessorImpl.finishCommand(CommandProcessorImpl.java:33)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:226)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:178)
    at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:111)
    at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:86)
    at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:265)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:282)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:593)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$3(IdeKeyEventDispatcher.java:646)
    at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:192)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:645)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:508)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:463)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:212)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:796)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:461)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:460)
    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)
sekullbe commented 5 years ago

I got around this by installing the 'isearch' plugin and changing my keymap, but it's not as nice as the native isearch. I also get this error which may well be relevant: com.intellij.diagnostic.PluginException: While loading class com.mulgasoft.emacsplus.actions.search.ISearchBackward: class com.mulgasoft.emacsplus.actions.search.ISearchBackward overrides final method com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(Lcom/intellij/openapi/actionSystem/AnActionEvent;)V [Plugin: com.cursive-ide.emacsplus] [Plugin: com.cursive-ide.emacsplus]

cpoile commented 5 years ago

Any idea of when this will be fixed? I can't move to 2019.2 until -- I use C-s too often.

chkhd commented 5 years ago

Confirming this, looks like the list of NPE causing actions is growing, before it was only C-x b..

vamsi360 commented 5 years ago

I think one of us has to patch this as it's broken for quite some time. Anyone here who knows the Intellij's apis and emacs-plus codebase?

berquist commented 5 years ago

There was some work happening on https://github.com/IUSR/emacs-plus/commit/f472e802520edf49157ac4d05cfcc00fcfa00b3a.

cursive-ide commented 4 years ago

See here for some comments on the latest release.