Bug 468809 - StackOverflowError while decorating projects
Summary: StackOverflowError while decorating projects
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.4.2   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Jay Arthanareeswaran CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 473552 480647 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-05-29 10:43 EDT by Arthur Daussy CLA
Modified: 2022-10-09 08:33 EDT (History)
6 users (show)

See Also:


Attachments
Stack trace (6.11 KB, text/plain)
2015-05-29 10:43 EDT, Arthur Daussy CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Daussy CLA 2015-05-29 10:43:45 EDT
Created attachment 253935 [details]
Stack trace

Hi,

 This the third workspaces I'm breaking with that problem. I have a workspace with some java projects that I do not want to build (I unchecked the "Project>Build Automatically" button). I'm working on a project that writtes some files in all those projects using "Joob" mechanism. Sometimes (I have failed to find a procedure to reproduce this all the time) when I start my runtime platform I get a dialog saying that: 
_____________________________________________________________
"An internal error occured during: "Decoration Calculation"
_____________________________________________________________
"Decorating Calculation"
"Initializing Java Tooling"
_____________________________________________________________
"An internal error occurred during: "Decoration Calculation".
java.lang.StackOverflowError"
_____________________________________________________________

I have attached the stacktrace to this bug.

Regards,

Arthur
Comment 1 Markus Keller CLA 2015-05-29 11:16:28 EDT
This problem occurs when JDT tries to resolve project dependencies. I don't think it's about the code you wrote, but about the way your projects depend on each other. E.g. circular project dependencies (although that should actually be supported or report an error if that setting is enabled on the Java > Compiler > Building preference page).

Here's the repeating part of the stack trace:

	at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:2848)
	at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1932)
	at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3247)
	at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2693)
	at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2857)
	at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1962)
	at org.eclipse.jdt.internal.core.ProjectReferenceChange.updateProjectReferencesIfNecessary(ProjectReferenceChange.java:47)
	at org.eclipse.jdt.internal.core.ChangeClasspathOperation.classpathChanged(ChangeClasspathOperation.java:59)
	at org.eclipse.jdt.internal.core.SetContainerOperation.executeOperation(SetContainerOperation.java:110)
	at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:729)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
	at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:794)
	at org.eclipse.jdt.internal.core.JavaModelManager$9.run(JavaModelManager.java:2832)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
Comment 2 Markus Keller CLA 2015-05-29 11:33:08 EDT
JDT Core team: AFAICS, JavaModelManager#CONTAINER_INITIALIZATION_IN_PROGRESS et al. should take care of cycles. Maybe the problem is that access to JavaModelManager#previousSessionContainers and/or other fields is not synchronized? I didn't see anything obvious, and I'll stop my investigations for now.
Comment 3 Arthur Daussy CLA 2015-06-01 03:19:20 EDT
Hi Markus,
 First of all thanks for looking into this problem. Some extra information:
The projects imported in my workspace are old legacy code that is known to have cycle dependencies. However, I was surprised that Eclipse tries to build it even if I have removed the "Build Automatically" preference. Regarding the preference you mentioned, in my workspace the preference is set to report an error. However, it does not report anything. Instead it crashes on a StackOverFlowError.

regards,

Arthur
Comment 4 Markus Keller CLA 2015-06-01 06:25:38 EDT
(In reply to Arthur Daussy from comment #3)
> However, I was surprised that Eclipse tries to
> build it even if I have removed the "Build Automatically" preference.

(In reply to Arthur Daussy from comment #0)
> when I start my runtime platform

This always builds required projects if "Preferences > Run/Debug > Launching > Build (if required) before launching" is enabled.
Comment 5 Arthur Daussy CLA 2015-06-01 08:45:44 EDT
My apologies if I was not clear enought. The projects with cycle dependencies are in my "runtime" workspace. It is not in the workspace that I use to create my runtime platform. The error is displayed after launching my runtime platform when it tries to initialize the Java Tooling in my "runtime" workspace.
Comment 6 Jay Arthanareeswaran CLA 2015-07-27 06:21:07 EDT
*** Bug 473552 has been marked as a duplicate of this bug. ***
Comment 7 Jay Arthanareeswaran CLA 2015-08-05 03:33:03 EDT
Sorry ran out of time in M1.
Comment 8 Jay Arthanareeswaran CLA 2015-09-16 02:29:56 EDT
Sorry, have to move it out.
Comment 9 Stephan Herrmann CLA 2015-10-26 17:45:46 EDT
*** Bug 480647 has been marked as a duplicate of this bug. ***
Comment 10 Jay Arthanareeswaran CLA 2015-12-08 01:39:19 EST
Sorry, moving out. No progress yet.
Comment 11 Jay Arthanareeswaran CLA 2016-04-25 04:39:59 EDT
Not much hope for M7. Tentatively keeping on 4.6 list.
Comment 12 Jay Arthanareeswaran CLA 2016-05-11 02:28:24 EDT
Sorry, no hope for 4.6. Bulk moving to 4.7.
Comment 13 Manoj N Palat CLA 2018-05-21 06:06:52 EDT
Bulk move out of 4.8
Comment 14 Eclipse Genie CLA 2020-08-08 08:12:40 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 15 Eclipse Genie CLA 2022-10-09 08:33:56 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.