Scala completion engine throws two runtime exceptions (UKNOWN is not a type)
I get the following exception whenever I invoke the completion engine on a large project (the scala compiler). I believe it has to do with Eugene's work on signatures, but feel free to reassign.
java.lang.UnsupportedOperationException: type UNKNOWN is no real data type and therefore has no signature
at ch.epfl.lamp.fjbg.JType$12.getSignature(JType.java:276)
at ch.epfl.lamp.fjbg.JMethodType.getSignature(JMethodType.java:40)
at scala.tools.eclipse.javaelements.ScalaCompletionEngine$$anonfun$complete$1.acceptSymbol$1(ScalaCompletionEngine.scala:144)
at scala.tools.eclipse.javaelements.ScalaCompletionEngine$$anonfun$complete$1$$anonfun$apply$3.apply(ScalaCompletionEngine.scala:220)
at scala.tools.eclipse.javaelements.ScalaCompletionEngine$$anonfun$complete$1$$anonfun$apply$3.apply(ScalaCompletionEngine.scala:215)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.tools.eclipse.javaelements.ScalaCompletionEngine$$anonfun$complete$1.apply(ScalaCompletionEngine.scala:215)
at scala.tools.eclipse.javaelements.ScalaCompletionEngine$$anonfun$complete$1.apply(ScalaCompletionEngine.scala:39)
at scala.tools.eclipse.util.Cached$$anonfun$apply$1.apply$mcV$sp(Cached.scala:22)
at scala.tools.eclipse.util.Cached$$anonfun$apply$1.apply(Cached.scala:21)
at scala.tools.eclipse.util.Cached$$anonfun$apply$1.apply(Cached.scala:21)
at scala.tools.eclipse.util.Cached$class.locked(Cached.scala:83)
at scala.tools.eclipse.util.Cached$class.apply(Cached.scala:20)
at scala.tools.eclipse.ScalaPresentationCompiler$CachedCompilerResult.apply(ScalaPresentationCompiler.scala:64)
at scala.tools.eclipse.ScalaPresentationCompiler.withCompilerResult(ScalaPresentationCompiler.scala:97)
at scala.tools.eclipse.ScalaProject$$anonfun$withCompilerResult$1.apply(ScalaProject.scala:369)
at scala.tools.eclipse.ScalaProject$$anonfun$withCompilerResult$1.apply(ScalaProject.scala:368)
at scala.tools.eclipse.util.Cached$$anonfun$apply$1.apply$mcV$sp(Cached.scala:22)
at scala.tools.eclipse.util.Cached$$anonfun$apply$1.apply(Cached.scala:21)
at scala.tools.eclipse.util.Cached$$anonfun$apply$1.apply(Cached.scala:21)
at scala.tools.eclipse.util.Cached$class.locked(Cached.scala:83)
at scala.tools.eclipse.util.Cached$class.apply(Cached.scala:20)
at scala.tools.eclipse.ScalaProject$$anon$1.apply(ScalaProject.scala:40)
at scala.tools.eclipse.ScalaProject.withPresentationCompiler(ScalaProject.scala:364)
at scala.tools.eclipse.ScalaProject.withCompilerResult(ScalaProject.scala:368)
at scala.tools.eclipse.javaelements.ScalaCompilationUnit$class.withCompilerResult(ScalaCompilationUnit.scala:58)
at scala.tools.eclipse.javaelements.ScalaSourceFile.withCompilerResult(ScalaSourceFile.scala:40)
at scala.tools.eclipse.javaelements.ScalaCompletionEngine.complete(ScalaCompletionEngine.scala:39)
at scala.tools.eclipse.javaelements.ScalaCompilationUnit$class.codeComplete(ScalaCompilationUnit.scala:178)
at scala.tools.eclipse.javaelements.ScalaSourceFile.codeComplete(ScalaSourceFile.scala:40)
at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:357)
at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:345)
at org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposalComputer.internalComputeCompletionProposals(JavaCompletionProposalComputer.java:242)
at org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposalComputer.computeCompletionProposals(JavaCompletionProposalComputer.java:204)
at org.eclipse.mylyn.internal.java.ui.editor.FocusedJavaAllProposalComputer.computeCompletionProposals(FocusedJavaAllProposalComputer.java:119)
at org.eclipse.jdt.internal.ui.text.java.CompletionProposalComputerDescriptor.computeCompletionProposals(CompletionProposalComputerDescriptor.java:316)
at org.eclipse.jdt.internal.ui.text.java.CompletionProposalCategory.computeCompletionProposals(CompletionProposalCategory.java:264)
at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.collectProposals(ContentAssistProcessor.java:286)
at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.computeCompletionProposals(ContentAssistProcessor.java:246)
at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1832)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:556)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:553)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:488)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:482)
at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1660)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:182)
at org.eclipse.ui.texteditor.ContentAssistAction$1.run(ContentAssistAction.java:82)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.texteditor.ContentAssistAction.run(ContentAssistAction.java:80)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185)
at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:109)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:470)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:824)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:880)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:569)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:510)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:125)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:965)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3542)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1250)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1273)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1287)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1283)
at org.eclipse.swt.widgets.Canvas.sendKeyEvent(Canvas.java:433)
at org.eclipse.swt.widgets.Control.doCommandBySelector(Control.java:906)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4741)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSResponder.interpretKeyEvents(NSResponder.java:56)
at org.eclipse.swt.widgets.Composite.keyDown(Composite.java:516)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4655)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:202)
at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:1753)
at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:1825)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4713)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:4285)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:4352)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:101)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3097)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Leave a comment
on 2010-09-16 15:34 *
By eugene.vigdorchik
Iulian, do you have a testcase for this? I'm pretty sure it's caused by my changes, but to be sure I fix it I need a test case.
on 2010-09-16 16:08 *
By Iulian Dragos
Unfortunately I cannot reproduce it right now.. I had a pretty involved change which had some incorrect code, but I can't get the presentation compiler in that state again. I was trying to auto-complete inside an anonymous class definition which had errors (lots of red underlines). I will post again if I manage to reproduce it (so far, no luck, even though I reproduced the error tree..)
I believe my change has fixed it. Please reopen if you still see the error.
on 2010-09-16 17:16 *
By
Could you push that change to the remote please ... thanks.
on 2010-09-16 17:33 *
By eugene.vigdorchik
It is pushed to wip_stabilize.