Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 370939

Summary: Infinite loop/retry in/via AbstractClassMirror.getEObject
Product: [Modeling] TMF Reporter: Stephan Herrmann <stephan.herrmann>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: critical    
Priority: P3 CC: jw, sebastian.zarnekow, sven.efftinge
Version: 2.2.1Flags: sven.efftinge: juno+
Target Milestone: M7   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
stack dump 1
none
stack dump 2
none
Stack Trace none

Description Stephan Herrmann CLA 2012-02-08 07:57:45 EST
Created attachment 210726 [details]
stack dump 1

Xtext version 2.2.1, a sufficiently large workspace with an Xtext project that imports a model from a separate project. I think I was editing the ecore when Eclipse froze completely. Also xtend2 is used in some projects, but looking at the stack dump I can't see any traces of xtend working.

In the underlying cmd console tons of messages were running through mentioning some resource(s) the were found to be empty, IIRC this concerned a .java file corresponding to the model. Sorry, I couldn't capture that output.

Using Java VisualVM I saw one thread consuming 100% CPU, and I took two sample thread dumps, to be attached here. Look for "Worker-27".

Since no progress could be observed I had to kill the Eclipse process.
The same problem already happened an hour or so ago.
Comment 1 Stephan Herrmann CLA 2012-02-08 07:58:52 EST
Created attachment 210728 [details]
stack dump 2

two minutes later
Comment 2 Sebastian Zarnekow CLA 2012-02-08 08:03:14 EST
Which Eclipse version do you use?
Comment 3 Stephan Herrmann CLA 2012-02-08 10:25:42 EST
(In reply to comment #2)
> Which Eclipse version do you use?

Eclipse Modeling Tools

Version: Indigo Service Release 1
Build id: 20110916-0149

plus:
- Xtext SDK 2.2.1
- MWE2 runtime SDK
- XML Editors
- Subversive + JavaHL
- m2e
- Tycho Project Configurators
Comment 4 Sebastian Zarnekow CLA 2012-04-03 18:01:26 EDT
There were recent changes in that field. You do not recall the files that caused the infinite loops?
Comment 5 Stephan Herrmann CLA 2012-04-03 19:19:53 EDT
(In reply to comment #4)
> There were recent changes in that field. You do not recall the files that
> caused the infinite loops?

I do remember which projects I was working on, but two months later I don't have precise recollections of which files were involved, sorry.
Comment 6 Juerg Wanner CLA 2012-04-19 08:00:08 EDT
I have the same problem in a xtext created editor. Look at the following situation:

File in Editor:
domain MyDomain {

    entity A

}

If I hit ctrl-space after the 'A' I get the situation described in this bug. On the other hand if the file looks like the following:

domain MyDomain {

    entity A 

    entity B {
       name : String
    }
}

And I do the same as before (ctrl-space after 'A') everything works nicely.

The grammar at that particular point is:

Entity:
    'entity' name=ID (doc=STRING)? (ann+=Annotations)* '{'

where STRING starts with ' or " and Annotations starts with 'annotation'

See also the attached stack trace (look at Worker-12 and main)
Comment 7 Juerg Wanner CLA 2012-04-19 08:00:50 EDT
Created attachment 214232 [details]
Stack Trace
Comment 8 Juerg Wanner CLA 2012-04-19 08:17:46 EDT
Forget my two added comments. I posted this to the wrong issue.

I'm really sorry about that.
Comment 9 Sven Efftinge CLA 2012-04-30 08:32:38 EDT
Unfortunately I cannot see, how this happened, nor can I reproduce it.
It might have been fixed already. Please reopen, when it happens again.