Skip to content

Emacs keybindings stop working soon after started editing a file #414

@jonasseglare

Description

@jonasseglare

Description of problem

I have a fresh Eclipse installation to which I added the Corrosion plugin from https://download.eclipse.org/corrosion/releases/latest/. Soon after I start editing a Rust file and it starts to autocomplete and assist me while editing, common keybindings stop working, such as Ctrl + A (go to beginning of line), Ctrl + N (go to next line) etc. I use the Emacs keybindings scheme that I chose in the drop-down menu under Window -> Preferences -> General -> Keys.

How to reproduce

  1. I installed rust using rustup.
  2. I use Ubuntu 22.04
  3. I downloaded and unpacked Eclipse IDE for Java developers and unpacked it under ~/uppackat/eclipse-rust.
  4. I launched it and chose to use ~/eclipse-rust-workspace as my workspace.
  5. I added the Corrosion plugin from the url https://download.eclipse.org/corrosion/releases/latest/.
  6. I chose the Emacs keybindings scheme at Window -> Preferences -> General -> Keys
  7. I started a new cargo project under ~/prog/rust/blueprint.
  8. I started editing the file ~/src/main.rs by adding a function fn gcd(mut n: u64, mut m: u64) -> u64 {let a = 4;} but very soon as I was typing and the Corrosion plugin started assisting me, the Emacs bindings such as those to move the cursor (Ctrl + n, Ctrl + p, Ctrl + f and Ctrl + b) stopped working.
  9. I observed that whenever I typed an Emacs binding that wasn't working, an error appeared in the Error Log (open it from Window -> Show view -> Error Log). See below for details about the error.

Details from Error Log

Here are details from the error that appears in the Error Log when I type an Emacs key command that isn't working.

Details:

Plugin: org.eclipse.ui
Severity: Error
Message: Unhandled event loop exception

Exception Stack Trace:

java.lang.NullPointerException: Cannot invoke "org.eclipse.swt.widgets.Table.isDisposed()" because "this.this$0.fProposalTable" is null
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup$ProposalSelectionHandler.execute(CompletionProposalPopup.java:146)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:485)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:308)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:580)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:647)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:439)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1953)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1528)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1555)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1538)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1577)
	at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:937)
	at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:4013)
	at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:921)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2507)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:6834)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6163)
	at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_do_event(Native Method)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1597)
	at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_iteration_do(Native Method)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4514)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:643)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1440)

Session data:

eclipse.buildId=4.26.0.20221201-1200
java.version=17.0.5
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -data file:/home/jonas/eclipse-rust-workspace/ -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions