StackOverflowError in Eclipse 3.3M7 in Bindings.java [message #243621] |
Thu, 10 May 2007 14:03 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Andy Carroll![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=andy_carroll%40hotmail.com) Messages: 10 Registered: July 2009 |
Junior Member |
|
|
While editing Java code, I encountered a StackOverflowError in Eclipse 3.3M7
at line 446 of Bindings.java
in the method Bindings.findOverriddenMethodInHierarchy(), which is called
downstream from Scope.getJavaLangObject() as
shown in the stacktrace below.
I'm running Eclipse 3.3M7 under Windows XP.
Looking at the source code, Binding.findOverriddenMethodInHierachy()
searches for an overridden method on an IBindingType recursively traversing
upwards
through the type's inheritence hierarchy. ie. If it doesn't find an
overridden method on an ITypeBinding, it calls ITypeBinding.getSuperclass(),
and if that
is not null, recursively calls findOverriddenMethodInHierachy() passing that
super class, until either a method is found or no super class is found.
This method is only safe if the ITypeBinding hierarchy is guaranteed to
never become circular.
If the hierarchy somehow becomes circular, a StackOverflowError occurs.
Somehow or another, the type hierarchy modelled by ITypeBinding must have
become circular, and thus traversing upwards through
getSuperclass() becomes circular resulting in the StackOverflowError.
I have no idea how I caused this to happen. I was editing a Java class at
the time, and changing one of its method's signatures.
I was typing by hand - ie. just editing code - not using a refactoring tool.
The class wasn't new, nor was I changing its inheritance hierarchy.
However, from the log its impossible to know whether the StackOverflowError
came about due to the compiler compiling the class I was editing, or whether
it was doing some other background task. Note the error message its says
"Override indicator installation job" - perhaps this is a clue.
The class I happened to be editing at the time was a subclass
DefaultTableCellRenderer - and the method I was changing on my class was its
implementation of
getTableCellRendererComponent - which just so happens to be an overridden
method.... but I have no idea whether this is relevant.
That's about all I know - I don't know the specific steps of how to
reproduce the bug, or whether it was related to what I was doing at the
time.
I searched the Bugzilla database - saw there were a ton of bugs relating to
StackOverflowErrors - but didn't find this specific issue.
When I encounter something like this in Eclipse, and after a quick search
can't find an existing bug, should I just file a Bugzilla report or
first send a description like this to the newsgroups?
Cheers,
- Andy
!ENTRY org.eclipse.core.jobs 4 2 2007-05-10 07:38:17.558
!MESSAGE An internal error occurred during: "Override indicator installation
job".
!STACK 0
java.lang.StackOverflowError
at
org.eclipse.jdt.internal.compiler.util.HashtableOfPackage.ge t(HashtableOfPackage.java:51)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.g etPackage0(LookupEnvironment.java:939)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.g etType(LookupEnvironment.java:994)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.g etResolvedType(LookupEnvironment.java:946)
at
org.eclipse.jdt.internal.compiler.lookup.Scope.getJavaLangOb ject(Scope.java:2008)
at
org.eclipse.jdt.core.dom.DefaultBindingResolver.resolveWellK nownType(DefaultBindingResolver.java:1635)
at
org.eclipse.jdt.core.dom.RecoveredTypeBinding.getSuperclass( RecoveredTypeBinding.java:244)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:444)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
at
org.eclipse.jdt.internal.corext.dom.Bindings.findOverriddenM ethodInHierarchy(Bindings.java:446)
<repeated about 1000 times until stack overflows>
|
|
|
Re: StackOverflowError in Eclipse 3.3M7 in Bindings.java [message #243636 is a reply to message #243621] |
Thu, 10 May 2007 16:18 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: wharley.bea.com
"Andy Carroll" <andy_carroll@hotmail.com> wrote in message
news:f1v8o6$bgd$1@build.eclipse.org...
> While editing Java code, I encountered a StackOverflowError [...]
> When I encounter something like this in Eclipse, and after a quick search
> can't find an existing bug, should I just file a Bugzilla report or
> first send a description like this to the newsgroups?
Please file a bug report.
Sending to the newsgroup is good if you're not sure something is a bug, or
if you're not sure how to use the product. It's hard to imagine a
StackOverflowError not being a bug, and it sounds like you're not doing
anything unreasonable to get it (even if, as you said, you can't figure out
how to reproduce it).
|
|
|
Powered by
FUDForum. Page generated in 0.03302 seconds