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 250595 - AssertionError: isSameType UNKNOWN
Summary: AssertionError: isSameType UNKNOWN
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-20 23:25 UTC by _ gtzabari
Modified: 2018-04-13 17:41 UTC (History)
14 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 215572


Attachments
stacktrace (5.78 KB, text/plain)
2015-02-20 23:25 UTC, _ gtzabari
Details
stacktrace (7.20 KB, text/plain)
2015-04-16 14:28 UTC, Exceptions Reporter
Details
Testcase (8.47 KB, application/octet-stream)
2015-05-13 17:11 UTC, _ gtzabari
Details
stacktrace (5.25 KB, text/plain)
2015-09-07 09:48 UTC, Alexander Simon
Details
stacktrace (6.41 KB, text/plain)
2016-07-22 14:19 UTC, IrianR
Details
stacktrace (7.42 KB, text/plain)
2016-11-22 11:17 UTC, aldobrucale
Details
stacktrace (5.91 KB, text/plain)
2017-02-21 22:54 UTC, brettryan
Details
stacktrace (4.81 KB, text/plain)
2017-05-08 17:16 UTC, theshadow27
Details
dump file as requested in the log (17.10 KB, application/octet-stream)
2017-05-08 17:42 UTC, theshadow27
Details
stacktrace (4.81 KB, text/plain)
2017-05-08 17:52 UTC, theshadow27
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2015-02-20 23:25:03 UTC
This bug was originally marked as duplicate of bug 235620, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201502200001)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.40-b25, Java(TM) SE Runtime Environment, 1.8.0_40-ea-b22
OS: Windows 7

User Comments:
gtzabari: Copied class. Exception thrown.




Stacktrace: 
java.lang.AssertionError: isSameType UNKNOWN
   at com.sun.tools.javac.code.Types$SameTypeVisitor.visitType(Types.java:1121)
   at com.sun.tools.javac.code.Types$SameTypeVisitor.visitType(Types.java:1093)
   at com.sun.tools.javac.code.Type.accept(Type.java:189)
   at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:4498)
   at com.sun.tools.javac.code.Types$SameTypeVisitor.visitClassType(Types.java:1141)
   at com.sun.tools.javac.code.Types$SameTypeVisitor.visitClassType(Types.java:1093)
Comment 1 _ gtzabari 2015-02-20 23:25:05 UTC
Created attachment 152127 [details]
stacktrace
Comment 2 Dusan Balek 2015-02-27 09:51:40 UTC
Is it possible to extract the reproducible test case from your sources? Thanks.
Comment 3 _ gtzabari 2015-03-01 20:37:40 UTC
I don't remember which source-code this exception came from. I'll let you know if I run across this error again.
Comment 4 Exceptions Reporter 2015-04-16 14:28:30 UTC
Created attachment 153236 [details]
stacktrace

Typed a dot after an object
Comment 5 _ gtzabari 2015-05-13 17:10:24 UTC
Dusan,

SUCCESS!! I finally found a way to reproduce this bug :)

Using:

Product Version: NetBeans IDE Dev (Build 201505080001)
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\dev\Netbeans\user\dev
Cache directory: C:\dev\Netbeans\cache\dev

Repro steps:

1. Open the testcase.
2. Select GetPolicyPropertyIdValidator.java
3. Hit CTRL+C to copy the class
4. Enter the name SetPolicyPropertyIdValidator
5. Click OK
6. Wait a few seconds... 4-5 exceptions will get thrown. The last one is "java.lang.AssertionError: isSameType UNKNOWN"
Comment 6 _ gtzabari 2015-05-13 17:11:36 UTC
Created attachment 153639 [details]
Testcase
Comment 7 _ gtzabari 2015-07-09 04:15:09 UTC
Dusan,

Have you had a chance to try the attached testcase? Can you reproduce the problem on your end?
Comment 8 cezariusz 2015-07-09 05:57:14 UTC
(In reply to _ gtzabari from comment #5)
> 4. Enter the name SetPolicyPropertyIdValidator

What do you mean here?
Comment 9 _ gtzabari 2015-07-09 14:45:21 UTC
(In reply to cezariusz from comment #8)
> (In reply to _ gtzabari from comment #5)
> > 4. Enter the name SetPolicyPropertyIdValidator
> 
> What do you mean here?

Sorry, let me know if this helps:

3. Select the class in the Projects tab, hit CTRL+C
4. Select the enclosing package in the Projects tab, hit CTRL+V. When prompted for the new class' name, enter "SetPolicyPropertyIdValidator"
Comment 10 cezariusz 2015-07-09 15:28:56 UTC
(In reply to _ gtzabari from comment #9)
> When prompted for the new class' name, enter "SetPolicyPropertyIdValidator"

Error: Class "SetPolicyPropertyIdValidator" already exists in the target package.

But I did reproduce when I first deleted the file from your project and then followed your steps.
Comment 11 Alexander Simon 2015-09-07 09:48:58 UTC
Created attachment 155939 [details]
stacktrace

edit java class
Comment 12 _ gtzabari 2015-10-07 21:16:25 UTC
Do you still plan on fixing this in version 8.1? If so, please read my comments in http://statistics.netbeans.org/analytics/detail.do?id=215572. If not, please update Target Milestone.

Inserting conflict markers into the file doesn't seem to trigger the exception by its own. In my case, this seems to be triggered by external file edits.
Comment 13 IrianR 2016-07-22 14:19:04 UTC
Created attachment 161384 [details]
stacktrace

Editing a maven pom file
Comment 14 _ tboudreau 2016-08-29 09:23:27 UTC
FYI, I have a reliable way to reproduce it outside NetBeans:

1. Build contrib/classgraph
2. Get the sources (Oracle internal) to PGX from ssh://$YOUR_ID@ol-scm:/repos/projectq/pgx.git
3. cd into the source folder and run

java -jar /path/to/callgraph-jar-with-dependencies.jar -n -o /tmp/methods.edges -v .
Comment 15 aldobrucale 2016-11-22 11:17:27 UTC
Created attachment 162978 [details]
stacktrace

autocompletion in java
Comment 16 brettryan 2017-02-21 22:54:25 UTC
Created attachment 163683 [details]
stacktrace

Refactor > Rename class.
Comment 17 theshadow27 2017-05-08 17:16:16 UTC
Created attachment 164276 [details]
stacktrace

Not sure, probably something to do with adding an if statement before a decleration. Totally nuked autocomple ...
Comment 18 theshadow27 2017-05-08 17:31:48 UTC
Ok so there are different bugs going on here. The first is

   at com.sun.tools.javac.code.Types$SameTypeVisitor.visitType(Types.java:1121)'

The one from 2017-05-08 is 

	at com.sun.tools.javac.code.Types$SameTypeVisitor.visitType(Types.java:1283)


Not sure if you want me to file a different report? I have a dump file that was requested... 

From looking in the logs, I think the 1283 one resulted from a 
INFO [org.netbeans.modules.java.hints.providers.code.CodeHintProviderImpl$WorkerImpl]: org.netbeans.modules.java.hints.bugs.InfiniteRecursion.run
java.lang.NullPointerException
Comment 19 theshadow27 2017-05-08 17:42:11 UTC
Created attachment 164279 [details]
dump file as requested in the log

SEVERE [org.openide.util.Exceptions]
An error occurred during parsing of 'C:\Users\Admin\Documents\NetBeansProjects\pericore-dom\src\main\java\com\pericore\xml\dom\PrecomputedQuery.java'. Please report a bug against java/source and attach dump file 'C:\Users\Admin\AppData\Roaming\NetBeans\8.2\var\log\PrecomputedQuery.dump'.

Please find this file attached. Thanks
Comment 20 theshadow27 2017-05-08 17:52:16 UTC
Created attachment 164280 [details]
stacktrace

Editing the same class...