Bug 35877 - Stack overflow in code assist
Summary: Stack overflow in code assist
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 2.1.2   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-31 14:13 EST by Cagatay Kavukcuoglu CLA
Modified: 2003-10-23 07:25 EDT (History)
0 users

See Also:


Attachments
Stack trace (112.51 KB, text/plain)
2003-03-31 14:14 EST, Cagatay Kavukcuoglu CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cagatay Kavukcuoglu CLA 2003-03-31 14:13:09 EST
The VM throws a StackOverflowError during content assist after typing "double."
in the Java editor. I assume this happens for all primitive types though I only
tried double and int. The exception trace is in the attachment.
Comment 1 Cagatay Kavukcuoglu CLA 2003-03-31 14:14:56 EST
Created attachment 4402 [details]
Stack trace

Stack trace for StackOverflowError in content assist
Comment 2 David Audel CLA 2003-04-01 05:21:24 EST
I can not reproduce this problem in 2.1 release.

Cagatay - What is your version of eclipse ? Could you give me a specific test 
case ?
Comment 3 Cagatay Kavukcuoglu CLA 2003-04-01 21:12:41 EST
I have 2.1 release installed. I had one other serious problem unrelated to this
bug after I reported this (A package private class in a project was not being
included in the Java model, thus a bunch of squigglies). I can't reproduce the
problem any more after purging all the JDT index files under .metadata and
rebuilding from scratch. I'll try some more and let you know if I manage to get
it broken again.
Comment 4 David Audel CLA 2003-04-03 08:24:33 EST
I can not reproduce the problem, but it seems to appear with the following code 
(deducted from the stacktrace).

public class X {
  void foo(){
    ...
    new Object(){
      ...
      double.<cursor>
    };
  }
}

Cagatay - Could you look at the local history, to find the code which show the 
problem ?
Comment 5 Cagatay Kavukcuoglu CLA 2003-04-04 22:10:05 EST
Unfortunately I'm hitting myself on the head now for not saving the code that
exhibits the problem. It's not in my local history. Your guess is pretty close
though. I tried the scenario you outlined and could not reproduce the problem in
my workspace. I'll try to think a few more alternatives and see if anything
comes up.
Comment 6 David Audel CLA 2003-06-10 11:55:44 EDT
I can reproduce the problem in 3.0M1 with the following test case.

public class X {
  void foo() {
    new Object() {
      void bar() {
        new Object() {};
        double.<cursor>
      }
    };
  }
}
Comment 7 Philipe Mulet CLA 2003-06-11 08:41:47 EDT
Fix should also be backported to 2.1-maintenance stream.
Comment 8 David Audel CLA 2003-06-17 10:29:48 EDT
Fixed.
Regression test added.
Comment 9 David Audel CLA 2003-06-17 10:30:36 EDT
Fix backported to 2.1-maintenance.
Regression test added.
Comment 10 David Audel CLA 2003-07-16 04:13:12 EDT
Verified.
Comment 11 Philipe Mulet CLA 2003-09-04 12:44:37 EDT
Candidate for 2.1.2
Comment 12 Frederic Fusier CLA 2003-10-17 06:46:56 EDT
Verified with build 2.1.2 RC1
Comment 13 Jerome Lanneluc CLA 2003-10-23 07:25:27 EDT
Verified with build 2.1.2 RC2