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 252834 - org.netbeans.modules.debugger.jpda.expr.EvaluationExpression: Unknown type error
Summary: org.netbeans.modules.debugger.jpda.expr.EvaluationExpression: Unknown type error
Status: VERIFIED WONTFIX
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-05 13:05 UTC by Jiri Kovalsky
Modified: 2015-06-16 12:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Zipped project reproducing the error. (19.21 KB, application/zip)
2015-06-05 13:05 UTC, Jiri Kovalsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2015-06-05 13:05:20 UTC
Created attachment 154070 [details]
Zipped project reproducing the error.

Product Version: NetBeans IDE Dev (Build 201506050001)
Java: 1.7.0_76; Java HotSpot(TM) 64-Bit Server VM 24.76-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_76-b13
System: Linux version 3.13.0-37-generic running on amd64; UTF-8; cs_CZ (nb)
User directory: /home/cesilko/.netbeans/dev
Cache directory: /home/cesilko/.cache/netbeans/dev

Description:
============
User cannot find out value of static variable of another class from the same package due to org.netbeans.modules.debugger.jpda.expr.EvaluationExpression. NetBeans debugger strangely complains about Unknown type.

Steps to reproduce:
===================
1. Open attached CannotEvaluateStaticVariables project in NetBeans.
2. Expand "Source Packages > test" and double click CannotEvaluateStaticVariables.java file node to open it in Editor.
3. Toggle line 20 breakpoint with stringBuilder.append(Utilities.keyValue); code.
4. Press Ctrl+F5 to start debugging session.
5. When line 20 breakpoint is hit, hover your mouse pointer over "keyValue" text.

Expected: Debugger shows "key" in tooltip of "keyValue" static variable in Editor.
Actual: Debugger shows "org.netbeans.modules.debugger.jpda.expr.EvaluationExpression: Unknown type test.Utilities <" in tooltip of "keyValue" static variable in Editor.
Comment 1 Martin Entlicher 2015-06-12 09:21:05 UTC
The name of the EvaluationExpression should not be printed, only the error message. I've fixed that by http://hg.netbeans.org/core-main/rev/ca0fbf8db2ba
After that change, you get "> Unknown type test.Utilities <" in the tooltip.

The class type is unknown, because it was not loaded in the JVM yet. After you do step over, the code is processed and Utilities class is loaded. Then the tooltip gives proper value.

Unfortunately, this is not possible to fix. If debugger forces to load the class, it will cause side-effects like the one described in issue #168949.
Comment 2 Jiri Kovalsky 2015-06-16 12:08:25 UTC
Product Version: NetBeans IDE Dev (Build 201506160001)
Java: 1.7.0_76; Java HotSpot(TM) 64-Bit Server VM 24.76-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_76-b13
System: Linux version 3.13.0-37-generic running on amd64; UTF-8; cs_CZ (nb)

Verified. Thanks for the partial fix Martine.