eclipse-archived / ceylon-ide-eclipse

Eclipse Plugin for Ceylon
http://ceylon-lang.org/documentation/ide
Eclipse Public License 1.0
59 stars 28 forks source link

Multiple exceptions just after creating a Maven project #1888

Open negora opened 7 years ago

negora commented 7 years ago

Hello:

I'm trying to create a Maven project to use the ceylon-maven-plugin with it. However, when I create a Maven project and I click in the Problems panel, Eclipse throws multiple exceptions. I've included the stack trace as an attachment to this report: java.lang.VerifyError: Bad type on operand stack.

I've realized that the same exceptions are thrown whenever I enter Window -> Preferences -> Dot.

This is a fresh "install" of the Java package of Eclipse (I have simply decompressed the original Tar in /usr/local/lib/ as the root user), and it's also a fresh install of the Ceylon plug-in. To run Eclipse, I'm using my own user. I've removed the $HOME/.eclipse/ directory and the workspace several times, in order to make my tests from scratch.

I'm using Debian 9.1. The Error log panel shows this information about my installation:

eclipse.buildId=4.7.0.I20170612-0950
java.version=1.8.0_141
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product

If I create the Maven project without having the Ceylon plug-in installed, everything works fine. As soon as I install the Ceylon plug-in, Eclipse starts to behave strangely.

Thank you!

negora commented 7 years ago

By the way, these are the error messages (I forgot to include them):

Problems occurred when invoking code from plug-in: "org.eclipse.e4.ui.workbench.swt".

Unhandled event loop exception "org.eclipse.ui"

Although I guess that the most important part is the exception stack trace.

bjansen commented 7 years ago

There's no explicit mention of Ceylon in the stack trace you provided, it might be caused by another plugin (looks like it is GEF4 DOT). Or maybe there's a clash between the ANTLR we ship in our plugin and another version of ANTLR used by DOT, that would explain the is not assignable error.

Are you by any chance running Eclipse on Java 9?

negora commented 7 years ago

There's no explicit mention of Ceylon in the stack trace you provided, it might be caused by another plugin (looks like it is GEF4 DOT). Or maybe there's a clash between the ANTLR we ship in our plugin and another version of ANTLR used by DOT, that would explain the is not assignable error.

To install the Ceylon plugin, I follow the instructions of Installing Ceylon IDE for Eclipse. There, it says to select all options displayed in the Install window. But, in the screenshot, it only appears three options:

When I install the plug-in, however, this window shows more options:

I guess that it's simply because GEF has been split in separate packages. But anyway, I select all them. Is it OK? Or should I pick only some of them?

Are you by any chance running Eclipse on Java 9?

No. I'm using the version that comes bundled with Eclipse itself, which seems to be from Oracle, version 1.8.0 Update 141:

negora commented 7 years ago

Ops, I did a mistake. The JVM is not bundled with Eclipse. It's the one from the Debian repository:

openjdk version "1.8.0_141"
OpenJDK Runtime Environment (build 1.8.0_141-8u141-b15-1~deb9u1-b15)
OpenJDK 64-Bit Server VM (build 25.141-b15, mixed mode)
negora commented 7 years ago

I've just tested Eclipse with the Oracle JDK 1.8.0 Update 144, but the result has been the same. I had already tested it days ago, but I've preferred to re-test it again, just in case.

negora commented 7 years ago

You're right. The problem seems to be in the GEF DOT.UI component. I've started to install component by component, and I've isolated this component as the source of the errors.

I've looked for references to ANTLR under the $HOME/.eclipse/ folder, and I've found these:

./com.redhat.ceylon.dist.repo_1.3.3.osgi-5-20170818-1558/repo/org/antlr/runtime/3.5.2/org.antlr.runtime-3.5.2.jar
./org.antlr.antlr4-runtime-osgi_4.5.1
./org.antlr.runtime_3.5.2.CEYLON-DEPENDENCIES-v1
./org.antlr.runtime_3.2.0.v201101311130.jar

It seems that there is ANTLR 3 and 4. I've no idea about OSGi, but I thought that it kept the bundles isolated and that they couldn't affect the each other.

Thank you.