Bug 196183 - Eclipse Java Compiler creates invalid class files.
Summary: Eclipse Java Compiler creates invalid class files.
Status: VERIFIED DUPLICATE of bug 195317
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: 3.3.1   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-11 12:04 EDT by Steffen Heil CLA
Modified: 2007-09-04 04:50 EDT (History)
2 users (show)

See Also:


Attachments
Testcase (159.53 KB, application/x-zip-compressed)
2007-07-11 12:06 EDT, Steffen Heil CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Heil CLA 2007-07-11 12:04:35 EDT
Hi

After updating eclipse from 3.2.2 to 3.3, one of my projects stopped working.
Compiling works fine, but the JVM cannot load a class afterwards.

I made a testcase for that and tried:
- compiling with javac: worked - running: worked
- compiling with eclipse 3.2: worked - running: worked
- compiling with eclipse 3.3: worked - running: FAILED

The compiler does not give any output, trying to run that testcase gives:
java.lang.ClassFormatError: Invalid pc in LineNumberTable in class file my/utils/zip/InflaterDynHeader

I uploaded the test-case to:
http://www.sh-solutions.de/testcase.zip

(The testcase is a programm that reads an zip file (included) and prints its' contents' file names and md5 hashes.)

Steffen
Comment 1 Steffen Heil CLA 2007-07-11 12:06:17 EDT
Created attachment 73560 [details]
Testcase

The testcase is now also here.
Comment 2 Olivier Thomann CLA 2007-07-11 12:18:07 EDT
I believe this is a dup of bug 195317.
Please try either latest integration or latest maintenance build.

*** This bug has been marked as a duplicate of bug 195317 ***
Comment 3 Olivier Thomann CLA 2007-07-11 13:13:20 EDT
Works perfectly fine with build M20070711-0800.

It prints:
board-add-no.gif: 93003FE9799119D711F51B30A9B3CDD5
board-add.gif: F07551C202DD8EAF874D71EC09EB9AD9
board-answer-no.gif: B2E11832DE26724FA11C65C72B08D65B
board-answer.gif: 6A8A3FB71BE94A05B142F9414A3EB826
board-back.gif: 8A809692D52F352ECA00BC1F5C785ECB
board-close.gif: 838528ABADE415BA9129F2D832D34F33
board-delete-small.gif: 8EAB085783ECB87E56433571CAF3DB47
board-delete.gif: C9A47869A2ECE2040A4525ED784645EA
board-open.gif: E6F96A2D1AC308CBF6128E80B20E76B3
board-tites.gif: 0B0C59AD278A30112914489E989BA5BC
bugs.css: AF1FB3ED9A668FFEC5762CFAA8E2A799
post-green.gif: B26FC3E1D677DE95918AC4E6CF0AC888
post-red.gif: 686D9A77DACEF53BF8708FF9CF1E449F
default.forum.add.htm: 57F6F1336FE54A6E06E047B2BCB88FA2
default.forum.htm: CF96946B68989BB23C563C357EB1146B
default.topic.answer.htm: 2425BAF9D7438FE01C9116D299D191FB
default.topic.htm: BD87C2B6E4771C4783C7DDA5960AB2D0
Comment 4 Steffen Heil CLA 2007-07-11 14:00:55 EDT
(In reply to comment #3)
> Works perfectly fine with build M20070711-0800.

M20070711-800 seems to be for 3.2. 3.2 worked for me anyway.
However I updated everything here to 3.3 already.

Is there some update for 3.3 available?
It seems I need I20070710-1416, however it's JDT Runtime is marked as FAILED.
Can I use it anyway, and how to integrate this to my eclipse?

As I think, a bug in the compiler is a severe issue, I assume there will be a hotfix for 3.3 soon?
Comment 5 Olivier Thomann CLA 2007-07-11 14:07:28 EDT
M20070711-800 is a build for the 3.3 maintenance stream.
3.3.1 is the next planned update.
We can provide a patch of the jdt.core plugin if required on the JDT/Core web page.
Comment 6 Steffen Heil CLA 2007-07-11 14:16:41 EDT
(In reply to comment #5)
> M20070711-800 is a build for the 3.3 maintenance stream.

http://europa-mirror1.eclipse.org/eclipse/downloads/ says:
3.2 Stream Maintenance Build M20070711-0800
Especially "3.2" ...

> 3.3.1 is the next planned update.

Okay, any estimates??

> We can provide a patch of the jdt.core plugin if required on the JDT/Core web
> page.

Would be nice, too, if it would not be too much work.


I always installed eclipse by downloading "the whole thing" and then installing all plugins required. I have no ideo how to replace single components. I used updates just for "small steps".
So I have just reinstalled all systems here with E3.3 and all plugins, so I would - if possible - prefer to just update that component.
But again I have no idea how.

I will just do, as you recommend.
So, what would be your recommendation?
Comment 7 Olivier Thomann CLA 2007-07-11 14:35:39 EDT
(In reply to comment #6)
> (In reply to comment #5)
> > M20070711-800 is a build for the 3.3 maintenance stream.
> 
> http://europa-mirror1.eclipse.org/eclipse/downloads/ says:
> 3.2 Stream Maintenance Build M20070711-0800
> Especially "3.2" ...
Looks like the download page has not been updated yet. Believe me this build is a 3.3 maintenance update.
 
> Okay, any estimates??
3 months from now I think.
 
> So, what would be your recommendation?
I guess you can simply download the file eclipse-JDT-M20070711-0800.zip from the Eclipse download page and unzip it somewhere on your drive.
Then you pick up the org.eclipse.jdt.core_3.3.1.v_772aR33x.jar and put it in the plugins directory of your Eclipse installation.
You can then delete the file org.eclipse.jdt.core_3.3.0.v_771.jar from the same folder.

The only drawbacks of this is that you don't update the source of jdt.core, but if you don't debug jdt.core code, then this is ok.

If you want the code, then you need the file eclipse-JDT-SDK-M20070711-0800.zip instead of eclipse-JDT-M20070711-0800.zip and you update the source of the jdt.core plugin the same way.

Once this is done, you restart using -clean on the Eclipse command-line.

Let me know if you have any problem with this.

Another workaround in your case is to remove the continue statement at the end of the method decode(StreamManipulator) in the class my.utils.zip.InflaterDynHeader.
Comment 8 Steffen Heil CLA 2007-07-11 15:47:49 EDT
(In reply to comment #7)
> I guess you can simply download the file eclipse-JDT-M20070711-0800.zip from
> the Eclipse download page and unzip it somewhere on your drive.

Hm, I didn't find "eclipse-JDT-M20070711-0800.zip".

http://europa-mirror1.eclipse.org/eclipse/downloads/drops/M20070711-0800/index.php says:
Build M20070711-0800 (200707110800) >>>in progress<<<
So I think that file will show up eventually.

However I found "eclipse-SDK-M20070711-0800-win32-wpf.zip"
I didn't worry about win32 or wpf, as I only wanted the compiler.

> Then you pick up the org.eclipse.jdt.core_3.3.1.v_772aR33x.jar and put it in
> the plugins directory of your Eclipse installation.
> You can then delete the file org.eclipse.jdt.core_3.3.0.v_771.jar from the same
> folder.

I did.

> The only drawbacks of this is that you don't update the source of jdt.core, but
> if you don't debug jdt.core code, then this is ok.
> If you want the code, then you need the file eclipse-JDT-SDK-M20070711-0800.zip
> instead of eclipse-JDT-M20070711-0800.zip and you update the source of the
> jdt.core plugin the same way.

I don't need the source, I even deleted any *source* folder (surely except "resource") from my plugin folder anyway...

> Once this is done, you restart using -clean on the Eclipse command-line.

Works like a charm!
THANKS A LOT !

> Another workaround in your case is to remove the continue statement at the end
> of the method decode(StreamManipulator) in the class
> my.utils.zip.InflaterDynHeader.

But I would be afaid to find such a problem later. (Maybe in other code.)

Once again, thank you.

And to all of you: GREAT WORK! I doooo love eclipse even more every day.

Comment 9 Eric Jodet CLA 2007-09-03 09:59:30 EDT
(In reply to comment #0)
As the link to the testcase.zip file is broken currently (http://www.sh-solutions.de/testcase.zip), and given that bug 195317
was verified, I checked the code in org.eclipse.jdt.core_3.3.1.v_779 that ships with build M20070831-2000.

So, code verified for 3.3.1 using build M20070831-2000.
Comment 10 Jerome Lanneluc CLA 2007-09-04 04:45:28 EDT
This bug was marked CLOSED without going through the VERIFIED state. Reopening
Comment 11 Jerome Lanneluc CLA 2007-09-04 04:48:48 EDT
Resolving again

*** This bug has been marked as a duplicate of bug 195317 ***
Comment 12 Jerome Lanneluc CLA 2007-09-04 04:50:00 EDT
Marking VERIFIED as per comment 9