Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception while refactoring #2062

Open
BarakSason opened this issue Apr 18, 2022 · 3 comments
Open

Exception while refactoring #2062

BarakSason opened this issue Apr 18, 2022 · 3 comments

Comments

@BarakSason
Copy link

BarakSason commented Apr 18, 2022

Hope this is the right repo for this.

I'm encountering the following exception while doing a refactor to rename a method:

!
!ENTRY org.eclipse.ui 4 0 2022-04-18 21:03:46.591
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
org/eclipse/jdt/internal/corext/dom/LinkedNodeFinder.findByNode(Lorg/eclipse/jdt/core/dom/ASTNode;Lorg/eclipse/jdt/core/dom/Name;)[Lorg/eclipse/jdt/core/dom/Name; @11: invokestatic
Reason:
Type '[Lorg/eclipse/jdt/core/dom/Name;' (current frame, stack[0]) is not assignable to '[Lorg/eclipse/jdt/core/dom/SimpleName;'
Current Frame:
bci: @11
flags: { }
locals: { 'org/eclipse/jdt/core/dom/ASTNode', 'org/eclipse/jdt/core/dom/Name', '[Lorg/eclipse/jdt/core/dom/Name;' }
stack: { '[Lorg/eclipse/jdt/core/dom/Name;' }
Bytecode:
0000000: 2a2b b801 044d 2cc6 0008 2cb8 016b b02b
0000010: b601 06b6 00f6 3e1d 101e 9f00 0f1d 100a
0000020: 9f00 091d 1012 a000 32bb 00d0 59b7 00d2
0000030: 3a04 bb01 0959 2b19 04b7 010b 3a05 2a19
0000040: 05b6 00d8 1904 1904 b600 dcbd 0107 b600
0000050: dfc0 010e b801 6bb0 04bd 0107 5903 2b53
0000060: b801 6bb0
Stackmap Table:
append_frame(@15,Object[#270])
append_frame(@41,Integer)
same_frame(@88)

at org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode.start(RenameLinkedMode.java:238)
at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run(RenameJavaElementAction.java:250)
at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.doRun(RenameJavaElementAction.java:190)
at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run(RenameJavaElementAction.java:162)
at org.eclipse.jdt.ui.actions.RenameAction.run(RenameAction.java:121)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:278)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:252)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:414)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5895)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5126)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4581)
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:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
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:401)
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)

Assistance on this will be greatly appreciated,as the refactoring functionality is very useful.

@snjeza
Copy link
Contributor

snjeza commented Apr 18, 2022

@BarakSason Could you attach a project sample reproducing the error?
Do you use lombok?

@snjeza
Copy link
Contributor

snjeza commented Apr 19, 2022

@BarakSason you may want to take a look at redhat-developer/vscode-java#2417 (comment)
A related issue: projectlombok/lombok#3134

@jdneo jdneo added the bug label Apr 21, 2022
@snjeza
Copy link
Contributor

snjeza commented Apr 22, 2022

@BarakSason I can't reproduce the issue.
Test project:
test.zip
JVM args:

"java.jdt.ls.vmargs": "-javaagent:<PATH_TO_lombok-1.18.24.jar> <your_vmargs>",

refactor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants