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 193589 - [70cat] StackOverflowError at com.sun.tools.javac.code.Types$MapVisitor.visit
Summary: [70cat] StackOverflowError at com.sun.tools.javac.code.Types$MapVisitor.visit
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-19 05:59 UTC by Chiana
Modified: 2011-03-08 05:48 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 174027


Attachments
stacktrace (72.28 KB, text/plain)
2010-12-19 05:59 UTC, Chiana
Details
stacktrace (72.38 KB, text/plain)
2010-12-19 06:00 UTC, Chiana
Details
stacktrace (72.38 KB, text/plain)
2010-12-27 14:03 UTC, rcasha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chiana 2010-12-19 05:59:24 UTC
Build: NetBeans IDE Dev (Build 201012150001)
VM: Java HotSpot(TM) Client VM, 19.0-b09, Java(TM) SE Runtime Environment, 1.6.0_23-b05
OS: Windows Vista

User Comments:
Chiana: Was creating code for a criteriaQuery;
 public int count0() {
    CriteriaQuery<T> query = getCriteriaBuilder().createQuery(getEntityClass());
    Root<T> root=query.from(getEntityClass());
    query.select(root.);
    Query Q = getEntityManager().createQuery("select count(*) from " + getEntityName());
    return ((Long) Q.getSingleResult()).intValue();
  }
 - - -
Was editing the query.select statement and had just type the "."

swpalmer: invoked autocomplete (ctrl-space) while typing a method argument

Chiana: Same as #455516. backed over the "." and typed it again.




Stacktrace: 
java.lang.StackOverflowError
   at com.sun.tools.javac.code.Types$MapVisitor.visit(Types.java:3620)
   at com.sun.tools.javac.code.Types$1.visitCapturedType(Types.java:133)
   at com.sun.tools.javac.code.Types$1.visitCapturedType(Types.java:121)
   at com.sun.tools.javac.code.Type$CapturedType.accept(Type.java:1018)
   at com.sun.tools.javac.code.Types$MapVisitor.visit(Types.java:3620)
   at com.sun.tools.javac.code.Types$1.visitCapturedType(Types.java:133)
Comment 1 Chiana 2010-12-19 05:59:28 UTC
Created attachment 104255 [details]
stacktrace
Comment 2 Chiana 2010-12-19 06:00:06 UTC
Created attachment 104256 [details]
stacktrace

Same as #455517, but positioned after the "." and pressed ctl-space.
Comment 3 rcasha 2010-12-27 14:03:46 UTC
Created attachment 104525 [details]
stacktrace
Comment 4 Exceptions Reporter 2010-12-30 11:34:05 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=174027
Comment 5 Dusan Balek 2011-01-11 14:38:40 UTC
Are you able to reproduce the problem? If so, could you please create a reproducible test case and attach it to the issue? Thanks.
Comment 6 Chiana 2011-01-11 16:52:36 UTC
Seems so, but the last two reports seems to have failed reporting...
Created this code;
 - - -
package test;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;

/**
 *
 * @author Kent
 */
public class test<T> {
  private String getEntityName() { return "entity"; }
  private CriteriaBuilder getCriteriaBuilder() { return null; }
  private Class<T> getEntityClass() { return null; }
  private EntityManager getEntityManager() { return null; }
  public long testa() {
  CriteriaQuery<T> query = getCriteriaBuilder().createQuery(getEntityClass());
    Root<T> root=query.from(getEntityClass());
    query.select(root.);
    Query Q = getEntityManager().createQuery("select count(*) from " +
getEntityName());
    return ((Long) Q.getSingleResult()).intValue();
  }
}
 - - -
As you see the line "query.select(root.);" is invalid, this is intentional, now, if you back over the "." and then type it again the error will trigger.
Comment 7 Exceptions Reporter 2011-03-03 06:22:18 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=174027
Comment 8 Dusan Balek 2011-03-07 15:27:33 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/9bb29c69bad1
Comment 9 Quality Engineering 2011-03-08 05:48:17 UTC
Integrated into 'main-golden', will be available in build *201103080000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/9bb29c69bad1
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #193589: StackOverflowError at com.sun.tools.javac.code.Types$MapVisitor.visit - fixed.