This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 252916

Summary: StackOverflowError at com.sun.tools.javac.code.Type.accept
Product: java Reporter: misterm <misterm>
Component: CompilerAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal CC: err, jglick, Shredder_121
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 202604
Attachments: stacktrace
stacktrace

Description misterm 2015-06-10 20:07:10 UTC
Build: NetBeans IDE Dev (Build 20150601-12fb145cd552)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.40-b25, Java(TM) SE Runtime Environment, 1.8.0_40-b26
OS: Windows 8

User Comments:
misterm: .

GUEST: Writing code => List<W>  myList = new ArrayLi (Here I tried to autocomplete but the exception was thrown)

err: Getting rid of warnings involving generics...




Stacktrace: 
java.lang.StackOverflowError
   at com.sun.tools.javac.code.Type.accept(Type.java:189)
   at org.netbeans.api.java.source.TypeMirrorHandle$Visitor.visitClassType(TypeMirrorHandle.java:454)
   at org.netbeans.api.java.source.TypeMirrorHandle$Visitor.visitClassType(TypeMirrorHandle.java:438)
   at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:778)
   at org.netbeans.api.java.source.TypeMirrorHandle$Visitor.visitClassType(TypeMirrorHandle.java:454)
   at org.netbeans.api.java.source.TypeMirrorHandle$Visitor.visitClassType(TypeMirrorHandle.java:438)
Comment 1 misterm 2015-06-10 20:07:11 UTC
Created attachment 154145 [details]
stacktrace
Comment 2 Dusan Balek 2015-08-07 09:53:35 UTC
Hard to fix without a reproducible test case.
Comment 3 Jesse Glick 2015-10-13 18:46:31 UTC
Created attachment 156698 [details]
stacktrace

Just editing sources.
Comment 4 Jesse Glick 2015-10-13 18:48:35 UTC
This is several years old, and TypeMirrorHandle.java is part of NB sources, so surely you could at least introduce better diagnostics so that the next time it happens you will see what is wrong. You are never going to get a reproducible test case when the bug is that while making extensive edits to Java sources, at some point for no clear reason the IDE starts throwing errors.
Comment 5 Exceptions Reporter 2016-07-06 08:42:47 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=202604
Comment 6 Shredder_121 2016-07-06 08:50:01 UTC
As of right now I had 2 instances of the error.

One using the netbeans hints, and one manually.
The issue _seems_ to be recursive type variables, but I can't imagine that being _that_ rare.

One class in Querydsl has the following class signature:

public abstract class ProjectableSQLQuery<T, Q extends ProjectableSQLQuery<T, Q> & Query<Q>>


Strange thing is, I can't recall having encountered this, but at least for the time being I can reproduce it.

My exception report is http://statistics.netbeans.org/analytics/exception.do?id=824060
It shows about 3 errors, 2 with the hint system, one with manual casting

If there's anything I can do let me know.

Br, Ruben