Community
Participate
Working Groups
I had several editors open in the workbench, three of which were dirty, on of which was a scrapbook page. When I selected "Save All" from the File menu, I got a dialog that said "Save Failed: Errors during build.". The "Reason:" was "Errors during build." The "Details" was "1802976400". I do not know what the problem is.
Created attachment 3998 [details] File which caused the exception. It appears that the problem occurs when attempting to save the attached Java file.
The problem occured during the reconcile operation on the working copy, but I cannot reproduce it on Windows2000 using RC2.
I cannot have access to a Mac before Chris MacLaren is back from vacation. So this PR is on hold till tomorrow.
Could not reproduce it on Verokina's Mac machine. It is running under JDK1.3.1. So we need to try it again on a Mac that has JDK1.4.1.
Here is the stack trace from the log... java.lang.ArrayIndexOutOfBoundsException: 1802976400 at org.eclipse.jdt.internal.compiler.parser.Parser.check(Parser.java:616) at org.eclipse.jdt.internal.compiler.parser.Parser.tAction(Parser.java:7564) at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:6845) at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:7070) at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.parseStatements(MethodDeclaration.java:95) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.parseMethod(TypeDeclaration.java:725) at org.eclipse.jdt.internal.compiler.Compiler.getMethodBodies(Compiler.java:391) at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:527) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:338) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:195) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:145) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:51) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:194) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:122) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:424) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:867) at org.eclipse.core.runtime.Platform.run(Platform.java:413) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:125) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:181) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:191) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:151) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:867) at org.eclipse.core.runtime.Platform.run(Platform.java:413) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:165) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:243) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:212) at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:884) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1596) at org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot.createModule(CVSWorkspaceRoot.java:358) at org.eclipse.team.internal.ccvs.ui.wizards.SharingWizard$1.run(SharingWizard.java:260) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:95)
*** Bug 34706 has been marked as a duplicate of this bug. ***
Add to CC's
*** Bug 34734 has been marked as a duplicate of this bug. ***
Could you please try with no jit? Channing, this page seems to explain how to disable the jit. http://developer.apple.com/techpubs/macosx/Java/JavaDevelopment/system_properties/chapter_9_section_3.html
The properties key in the info.plist seems to be the place you put system properties usually defined with -D - http://developer.apple.com/techpubs/macosx/Java/JavaDevelopment/deploying/chapter_3_section_5.html But, its not working for me - I'll keep digging. (Perhaps Andre knows how to do this ?) Channing
I tried without a jit on my side, but I could not reproduce the problem with or without the jit. So it looks like it is crashing, but doesn't seem to be 100% reproducable. I really looks like a VM problem, but we need to be able to find out what is wrong. If you have a reproducable test case, please submit your piece of code.
I can recreate the problem by creating a plugin project-I used the plugin with an editor template.
I don't know if it helps but I notice that the line number of the file that the error occurs at is always 0.
Hi, I'm on the IBM Websphere conference right now and just had a chance to download Apple's final 1.4.1. I don't know what the problem is, but at least Eclipse runs just fine in its default configuration (which is to use 1.3.1). Please, give me some more time for investigation...
It may work fine in it's default configuration, but since Ant is launched in the same VM as Eclipse, if you have custom Ant tasks that get compiled with your project, you have to run Eclipse in 1.4.1 or you'll get a version conflict. So in cases like mine, I can change the info.plist back to 1.3.1 and successfully compile my application, but it makes the Ant integration with Eclipse rather useless. btw, thanks for all your hard work on OS X SWT Andre!
In its default configuration, but using the 1.4.1 as the default VM it works fine too.
*** Bug 34802 has been marked as a duplicate of this bug. ***
If I switched to interpreted mode (-Xint), then the index changes. I will try to see when this is happening exactly, but for now it looks like a serious problem with the JVM.
TestCase for MacOSX 10.2.4 Eclipse RC2 JDK 1.4.1(Final) Create this class. Save will fail with an InternalCompilerError until you remove the first method. package a.hfhf.fdha.g; /* * Created on 12.03.2003 * * To change this generated comment go to * Window>Preferences>Java>Code Generation>Code Template */ /** * @author uli * * To change this generated comment go to * Window>Preferences>Java>Code Generation>Code Template */ public class Test { //this will fail public void test(String string) { if ((Object) string instanceof Test) return; } //this work public void test(String string) { Object object = (Object)string; if (object instanceof Test) return; } }
I don`t know if this is important, but there are two methods that do the check. The first(check) returns a short The second (original_state) calls check and returns an int.
The problem is that it works fine on all VMs except this 1.4.1 VM.
I added a trace in the parser loop to find out why we get this ArrayIndexOutOfBoundException. It appears that on the JDK1.4.1 one of the internal parser tables is shorter than on the JDK1.3.1. So this narrows down this issue to the initialization of this table. I will continue to investigate. I'll keep you inform of my progress.
I located the problem. At least for the ones that report an ArrayIndexOutOfBoundException in the .log file. The problem appears because the resource files used to initialize the parser internal tables wasn't completely read. Our loop to initialize the table was boggus. Changing it to ensure that the whole file is read fixed the problem. I need to double-check the code before I release it.
Olivier - could you paste in the fix for this bug ? (philippe)
Excellent news that the bug has been found. I'm curious as to why this bug doesn't occur on other platforms, any idea? Also, what is the class/method where the bug is - just curious. Channing
*** Bug 34907 has been marked as a duplicate of this bug. ***
Created attachment 4093 [details] Patch Apply it to compiler/org/eclipse/jdt/internal/compiler/util/Util.java
Channing, the problem was in the reading of a stream into a byte[]. On the JDK1.4.1 for MacOS the reading is stopped too early and the table is incomplete. Therefore in the parser loop if an action requires to go beyond the size of the table, we end up with the exception you saw. Why didn't this happen on other platform? I could be due to the implementation of the native method available() on subclasses of java.io.InputStream or simply by luck. I attach the patch for this fix. So feel free to try it.
Thanks for the explanation Olivier :-) I'll try the patch later today. Channing
Thanks for the fix Oliver. Works great. Ulrich
Patch works for me too. Thanks Olivier
Confirmed as well. Thanks
Verified the patch and integrated (with variable rename and -1 special case to make it more obvious).
Verified.
*** Bug 36733 has been marked as a duplicate of this bug. ***