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 226139 - AssertionError at com.sun.tools.javac.comp.Attr.visitTree
Summary: AssertionError at com.sun.tools.javac.comp.Attr.visitTree
Status: RESOLVED DUPLICATE of bug 227420
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-14 22:38 UTC by jag
Modified: 2013-04-09 14:48 UTC (History)
22 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 197116


Attachments
stacktrace (3.96 KB, text/plain)
2013-02-14 22:38 UTC, jag
Details
stacktrace (2.95 KB, text/plain)
2013-02-15 23:10 UTC, jag
Details
stacktrace (3.94 KB, text/plain)
2013-02-21 11:17 UTC, Maksim Khramov
Details
stacktrace (7.96 KB, text/plain)
2013-02-22 23:08 UTC, Jesse Glick
Details
stacktrace (3.87 KB, text/plain)
2013-02-23 15:26 UTC, sreimers
Details
stacktrace (3.91 KB, text/plain)
2013-02-23 21:56 UTC, Chiana
Details
stacktrace (3.91 KB, text/plain)
2013-02-23 21:59 UTC, Chiana
Details
stacktrace (3.91 KB, text/plain)
2013-02-23 22:53 UTC, Chiana
Details
stacktrace (3.98 KB, text/plain)
2013-02-25 17:11 UTC, narsereg
Details
stacktrace (7.59 KB, text/plain)
2013-02-27 16:08 UTC, Jesse Glick
Details
stacktrace (4.62 KB, text/plain)
2013-02-27 16:53 UTC, narsereg
Details
stacktrace (3.88 KB, text/plain)
2013-03-12 07:24 UTC, sreimers
Details
Dump file requested by error dialog. (11.21 KB, application/octet-stream)
2013-03-12 20:15 UTC, gholmer
Details
stacktrace (3.95 KB, text/plain)
2013-03-12 20:15 UTC, gholmer
Details
stacktrace (5.88 KB, text/plain)
2013-03-14 13:24 UTC, gholmer
Details
stacktrace (3.91 KB, text/plain)
2013-03-15 17:39 UTC, Jesse Glick
Details
stacktrace (3.90 KB, text/plain)
2013-03-19 10:54 UTC, sreimers
Details
stacktrace (4.44 KB, text/plain)
2013-03-20 10:36 UTC, stefan79
Details
stacktrace (4.60 KB, text/plain)
2013-03-20 13:42 UTC, Petr Jiricka
Details
stacktrace (3.88 KB, text/plain)
2013-03-20 18:15 UTC, stefan79
Details
stacktrace (3.88 KB, text/plain)
2013-03-20 18:18 UTC, stefan79
Details
stacktrace (4.45 KB, text/plain)
2013-03-27 15:53 UTC, _ tboudreau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jag 2013-02-14 22:38:27 UTC
Build: NetBeans IDE Dev (Build 201302131522)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_13-b20
OS: Mac OS X

User Comments:
jag: Just typed "enter" in the editor




Stacktrace: 
java.lang.AssertionError
   at com.sun.tools.javac.comp.Attr.visitTree(Attr.java:3951)
   at com.sun.tools.javac.tree.JCTree$Visitor.visitCatch(JCTree.java:2513)
   at com.sun.tools.javac.tree.JCTree$JCCatch.accept(JCTree.java:1188)
   at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:605)
   at com.sun.tools.javac.comp.Attr.visitErroneous(Attr.java:3944)
   at com.sun.tools.javac.tree.JCTree$JCErroneous.accept(JCTree.java:2363)
Comment 1 jag 2013-02-14 22:38:29 UTC
Created attachment 131403 [details]
stacktrace
Comment 2 jag 2013-02-15 23:10:48 UTC
Created attachment 131442 [details]
stacktrace

Just sent error report
Comment 3 athompson 2013-02-18 13:54:36 UTC
accidentally added a non-Throwable arg to a catch statement
Comment 4 Maksim Khramov 2013-02-21 11:17:01 UTC
Created attachment 131664 [details]
stacktrace
Comment 5 Jesse Glick 2013-02-22 23:08:04 UTC
Created attachment 131762 [details]
stacktrace
Comment 6 sreimers 2013-02-23 15:26:04 UTC
Created attachment 131778 [details]
stacktrace
Comment 7 Chiana 2013-02-23 21:56:04 UTC
Created attachment 131786 [details]
stacktrace

Simply coding along, typed a { to begin a compound statement;

  @Override
  public SimpleMetaData getTableInfo(String tableName) {
    try {
      DatabaseMetaData meta = getConnection().getMetaData();
      ResultSet schemas = meta.getTables(null, null, tableName, null);
      if (schemas.next()) {                         <=- typed this brace
    } catch (SQLException e) {
      throw new RuntimeException("Unable to access database", e);
    }
    return null;
  }
}
Comment 8 Chiana 2013-02-23 21:59:04 UTC
Created attachment 131787 [details]
stacktrace

pasted;
ResultSet rs = entityManagerFactory().dbDriver.getConnection().createStatement().executeQuery(
              "SELECT * FROM " + tableName + " WHERE 1=0");
      ResultSetMetaData metaData = rs.getMetaData();
      int colCount = metaData.getColumnCount();
      for (int i = 1; i <= colCount; i++) {

into;
public SimpleMetaData getTableInfo(String tableName) {
    try {
      DatabaseMetaData meta = getConnection().getMetaData();
      ResultSet schemas = meta.getTables(null, null, tableName, null);
      if (schemas.next()) {
        ResultSet rs = entityManagerFactory().dbDriver.getConnection().createStatement().executeQuery(
              "SELECT * FROM " + tableName + " WHERE 1=0");
      ResultSetMetaData metaData = rs.getMetaData();
      int colCount = metaData.getColumnCount();
      for (int i = 1; i <= colCount; i++) {
      } else {
        return null;
      }
    } catch (SQLException e) {
      throw new RuntimeException("Unable to access database", e);
    }
    r
Comment 9 Chiana 2013-02-23 22:53:04 UTC
Created attachment 131788 [details]
stacktrace

Typed an { again, snippet;
public Object select(TableData table,
                       Object key,
                       TableColumn where) {
    String stmt="SELECT * FROM ?";
    if (key!=null) {
      stmt+=" WHERE ?=?";
    }try {
    PreparedStatement ps=getConnection().prepareStatement(stmt);
    ps.setString(1, table.tableName());
    if (key != null) {
      ps.setString(2, where.colName());
      ps.setObject(3, key);
    }
    ResultSet rs=ps.executeQuery();
    // Now build an array of all entries
    while (rs.next()) {       <=-   Typed this "{"
    } catch (SQLException e) {
      throw new RuntimeException(e);
    }
    return null;
  }
Comment 10 narsereg 2013-02-25 17:11:11 UTC
Created attachment 131849 [details]
stacktrace

I opened brace. After this brace I have few lines of comments and closing brace of catch. I wanted add one more closing brace but got this error.
Smth like this:
if (){
    //  Comments
    //     
} catch
Comment 11 Jesse Glick 2013-02-27 16:08:25 UTC
Created attachment 131976 [details]
stacktrace

Moving braces around, making code (very) temporarily ill-formed.
Comment 12 narsereg 2013-02-27 16:53:25 UTC
Created attachment 131977 [details]
stacktrace

Wrote construction like this one:
 new LinkTerUser.class
Comment 13 sreimers 2013-03-12 07:24:38 UTC
Created attachment 132490 [details]
stacktrace

Trying to type try {
Comment 14 gholmer 2013-03-12 20:15:27 UTC
Created attachment 132536 [details]
Dump file requested by error dialog.
Comment 15 gholmer 2013-03-12 20:15:39 UTC
Created attachment 132537 [details]
stacktrace

Editing a TestNG class.
Comment 16 gholmer 2013-03-14 13:24:41 UTC
Created attachment 132607 [details]
stacktrace

Pasted some code in a Java file.
Comment 17 Jesse Glick 2013-03-15 17:39:23 UTC
Created attachment 132667 [details]
stacktrace

Had introduced a new if-statement which temporarily made the file syntactically malformed.
Comment 18 sreimers 2013-03-19 10:54:48 UTC
Created attachment 132789 [details]
stacktrace

Deleted some code in Try part of try catch statement
Comment 19 stefan79 2013-03-20 10:36:38 UTC
Created attachment 132828 [details]
stacktrace
Comment 20 Petr Jiricka 2013-03-20 13:42:41 UTC
Created attachment 132843 [details]
stacktrace

In the middle of editing.
Comment 21 stefan79 2013-03-20 18:15:39 UTC
Created attachment 132863 [details]
stacktrace

Writen in a Java-File:
"try " (while tryieng to write the "}", this Exception occured)

Remote-Debugging was running.
Comment 22 stefan79 2013-03-20 18:18:39 UTC
Created attachment 132864 [details]
stacktrace
Comment 23 _ tboudreau 2013-03-27 15:53:42 UTC
Created attachment 133146 [details]
stacktrace

Typing
Comment 24 Chiana 2013-03-28 18:12:32 UTC
Almost 100 dups, isn't this close to beeing P2 by now?
Comment 25 Dusan Balek 2013-04-09 14:43:28 UTC
Already fixed.

*** This bug has been marked as a duplicate of bug 227420 ***
Comment 26 athompson 2013-04-09 14:48:27 UTC
Cool! Can the fix get merged to the daily builds?