Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 389454 - Java 7 - java.lang.VerifyError: Inconsistent stackmap frames
Summary: Java 7 - java.lang.VerifyError: Inconsistent stackmap frames
Status: CLOSED DUPLICATE of bug 389926
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-12 18:50 EDT by Thomas Schindl CLA
Modified: 2021-04-28 16:55 EDT (History)
3 users (show)

See Also:


Attachments
source file and classfiles (421.61 KB, application/zip)
2012-09-12 18:50 EDT, Thomas Schindl CLA
no flags Details
FXGraphGrammarAccess file (129.39 KB, application/octet-stream)
2012-09-13 03:21 EDT, Thomas Schindl CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schindl CLA 2012-09-12 18:50:00 EDT
Created attachment 221001 [details]
source file and classfiles

When compiling the following source using tycho and modifying the BREE to 1.7 I get at runtime the following exception:

Caused by: java.lang.VerifyError: Inconsistent stackmap frames at branch target 202 in method at.bestsolution.efxclipse.tooling.fxgraph.ui.contentassist.antlr.internal.InternalFXGraphParser.rule__OpOther__Alternatives_3_1()V at offset 358
	at at.bestsolution.efxclipse.tooling.fxgraph.ui.contentassist.antlr.FXGraphParser.createParser(FXGraphParser.java:29)
	at at.bestsolution.efxclipse.tooling.fxgraph.ui.contentassist.antlr.FXGraphParser.createParser(FXGraphParser.java:1)
	at org.eclipse.xtext.ui.editor.contentassist.antlr.AbstractContentAssistParser.getFollowElements(AbstractContentAssistParser.java:314)
	at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory$StatefulFactory.handleLastCompleteNodeIsAtEndOfDatatypeNode(ParserBasedContentAssistContextFactory.java:210)
	at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory$StatefulFactory.doCreateContexts(ParserBasedContentAssistContextFactory.java:161)
	at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory$StatefulFactory.create(ParserBasedContentAssistContextFactory.java:148)
	at org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory.create(ParserBasedContentAssistContextFactory.java:577)
	at org.eclipse.xtext.ui.editor.contentassist.CompletionProposalComputer.exec(CompletionProposalComputer.java:48)
	at org.eclipse.xtext.ui.editor.contentassist.CompletionProposalComputer.exec(CompletionProposalComputer.java:1)
	at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32)
	at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:78)
	at org.eclipse.xtext.ui.editor.contentassist.XtextContentAssistProcessor.computeCompletionProposals(XtextContentAssistProcessor.java:68)
	at org.eclipse.xtext.ui.editor.contentassist.RepeatedContentAssistProcessor.computeCompletionProposals(RepeatedContentAssistProcessor.java:73)
	at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1839)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:566)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:563)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:498)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:492)
	at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1665)
	at org.eclipse.jface.text.source.SourceViewer.doOperation(SourceViewer.java:932)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1507)
	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.jface.commands.ActionHandler.execute(ActionHandler.java:119)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:76)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	... 57 more
Comment 1 Olivier Thomann CLA 2012-09-12 20:21:29 EDT
What version of the compiler are you using?
Please check the org.eclipse.jdt.core bundle version in the Help>About Eclipse SDK>Installation Details>Plugins.
Comment 2 Olivier Thomann CLA 2012-09-12 20:29:36 EDT
Would it be possible to get a self-contained test case or at least the FXGraphGrammarAccess class?

Thanks.
Comment 3 Olivier Thomann CLA 2012-09-12 20:39:18 EDT
Since I don't know what version you are using, you should try 3.8.1 or 4.2.1 or 4.3.x as this might be a dup of bug 381172.
Comment 4 Thomas Schindl CLA 2012-09-13 03:20:23 EDT
The strange thing is that I can't reproduce this problem within Eclipse where I have 4.2.0 (so the compiler version is 3.8.1). I can only make it happen when running with tycho 0.15.0 which uses the same compiler. I'll try tycho to generate more informations for me, on how they invoke the compiler.
Comment 5 Thomas Schindl CLA 2012-09-13 03:21:06 EDT
Created attachment 221011 [details]
FXGraphGrammarAccess file
Comment 6 Thomas Schindl CLA 2012-09-13 03:31:12 EDT
Configuration output of maven-tycho:

[DEBUG] Configuring mojo 'org.eclipse.tycho:tycho-compiler-plugin:0.15.0:compile' with basic configurator -->
[DEBUG]   (f) basedir = /private/tmp/e-fx-clipse/at.bestsolution.efxclipse.tooling.fxgraph.ui
[DEBUG]   (f) buildDirectory = /private/tmp/e-fx-clipse/at.bestsolution.efxclipse.tooling.fxgraph.ui/target
[DEBUG]   (f) compilerId = jdt
[DEBUG]   (f) debug = true
[DEBUG]   (f) encoding = UTF-8
[DEBUG]   (s) groupId = javafx
[DEBUG]   (s) artifactId = javafx.mvn
[DEBUG]   (s) version = 2.2.0-SNAPSHOT
[DEBUG]   (f) extraClasspathElements = [org.eclipse.tycho.core.utils.MavenArtifactRef@1f60cad2]
[DEBUG]   (f) fork = false
[DEBUG]   (f) optimize = false
[DEBUG]   (f) outputFileName = at.bestsolution.efxclipse.tooling.fxgraph.ui-0.1.0-SNAPSHOT
[DEBUG]   (f) project = MavenProject: at.bestsolution.efxclipse.tooling:at.bestsolution.efxclipse.tooling.fxgraph.ui:0.1.0-SNAPSHOT @ /private/tmp/e-fx-clipse/at.bestsolution.efxclipse.tooling.fxgraph.ui/pom.xml
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@2137975e
[DEBUG]   (f) showDeprecation = false
[DEBUG]   (f) showWarnings = false
[DEBUG]   (f) source = 1.7
[DEBUG]   (f) staleMillis = 0
[DEBUG]   (f) target = 1.7
[DEBUG]   (f) useJDK = SYSTEM
[DEBUG]   (f) verbose = false
[DEBUG] -- end configuration --
Comment 7 Olivier Thomann CLA 2012-09-14 10:19:21 EDT
I still don't know exactly what version of the compiler is used by tycho. The team fixed a couple of issues around bogus stack maps lately and this might be one of the problems already fixed as you cannot reproduce within Eclipse.
How can I reproduce the issue myself? I am not very familiar with tycho builds.
Comment 8 Olivier Thomann CLA 2012-09-18 11:39:55 EDT
Thomas, would it be possible for you to run the build with an xml log?
"-log <path to an xml file>" added on the compiler command line.
I don't know if it is easy to add arguments to the compiler command line for tycho builds, but this would help to determine what compiler is used in the tycho build.
Comment 9 Thomas Schindl CLA 2012-09-18 12:18:14 EDT
I'll try to generate the xml!

Just for reference. As far as I was informed the compiler used by tycho is 3.8.1 which is the version shipped with Juno (4.2,3.8). 

If I get the naming right you'll ship 3.8.2 with Juno SR1 (4.2.1,3.8.1) - I'll come back hopefully with an XML output or maybe a way for you to run the build.
Comment 10 Achim Demelt CLA 2012-09-19 05:36:36 EDT
I'm running into the exact same problems. Building and running with Eclipse (3.8) is fine. When I build the bundles with Tycho and run them in my IDE I see "Inconsistent stackmap frames".

I tried to make the tycho-compiler-plugin produce any kind of log/debug information, but to no avail. The best I got was "Unrecognized option : -log /tmp/compiler.log"

However, I found out that Tycho bundles its own copy of jdt.core, probably from a pre-release Milestone. It goes by the version 3.8.1.v20120502-0834. You'll probably be interested in this entry:

Eclipse-SourceReferences: scm:git:git://git.eclipse.org/gitroot/jdt/ec
 lipse.jdt.core.git;path="org.eclipse.jdt.core";tag=v20120502-0834

If any of those "Inconsistent stackmap frames" issues has been fixed after that date, we should ask the Tycho team to release a new version of the tycho-compiler-plugin that includes a newer version of JDT.
Comment 11 Achim Demelt CLA 2012-09-19 13:36:52 EDT
I spent some time browsing the JDT commit history and it seems that a fix for bug #380927 was committed on May 31 (http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=59758b3ac964ea48fbbbf5d314c8ed8b19dc60bb). So the JDT version used by Tycho (from May 2) clearly does not include that one.

I'll open a bug for Tycho to provide an updated tycho-compiler-plugin that uses the final Juno version of JDT.

Thomas, if you agree with that analysis, I guess we can close this issue.
Comment 12 Achim Demelt CLA 2012-09-19 13:56:14 EDT
FYI, I filed bug #389926
Comment 13 Thomas Schindl CLA 2012-09-19 14:57:21 EDT
From the closed bug I'll get that I'll have to use 0.16.0 - I'll give it a try and if the problem is solved then we are able to close this bug.
Comment 14 Achim Demelt CLA 2012-09-19 15:04:54 EDT
You can force Tycho to use the latest JDT version with the following configuration:


<plugin>
  <groupId>org.eclipse.tycho</groupId>
  <artifactId>tycho-compiler-plugin</artifactId>
  <dependencies>
    <dependency>
      <groupId>org.eclipse.tycho</groupId>
      <artifactId>org.eclipse.jdt.core</artifactId>
      <version>3.8.1.v20120531-0637</version>
    </dependency>
  </dependencies>
</plugin>

I am running a build at this very moment. I'll let you know how it works out tomorrow.
Comment 15 Achim Demelt CLA 2012-09-19 15:10:44 EDT
I confirm that the above configuration no longer produces the "inconsistent stackmap frame" errors.
Comment 16 Olivier Thomann CLA 2012-09-19 15:47:09 EDT
Moving to Tycho.
Comment 17 Olivier Thomann CLA 2012-09-19 15:48:03 EDT
Thanks Achim for your investigation!
Comment 18 Igor Fedorenko CLA 2012-09-19 16:05:49 EDT

*** This bug has been marked as a duplicate of bug 389926 ***