Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 243700 - Variable Value with ... instead of complete content
Variable Value with ... instead of complete content
Status: VERIFIED FIXED
Product: debugger
Classification: Unclassified
Component: Java
8.0
PC Windows 7
: P2 (vote)
: 8.0.1
Assigned To: Jiri Kovalsky
issues@debugger
: UI
: 253050 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-09 15:23 UTC by niconico49
Modified: 2015-07-02 21:03 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
Screenshot of strange rendering issue when pointing at "line" variable. (415.06 KB, image/png)
2014-07-24 13:09 UTC, Jiri Kovalsky
Details
Sample project reproducing the problem. (116.81 KB, application/zip)
2014-07-24 13:09 UTC, Jiri Kovalsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description niconico49 2014-04-09 15:23:18 UTC
When use debugger with netbeans 8 and with java programs, if you try to see the value of some variable the window display only part of the content and then write 3 points "...".
On the other hand in the version 7.4 the debugger display the total content of the variable.

Can you fix this bug (if is a bug)?

Thanks for all.

Bye
Comment 1 Jiri Kovalsky 2014-04-10 07:38:43 UTC
Nick, can you please give us an example of code and variable you see truncated? Or at least some screenshot to understand what you mean. Thanks!
Comment 2 Martin Entlicher 2014-04-10 09:19:21 UTC
We limit string values to 100000 characters not to overflow memory. Is this your case? Is it a very large value, that is truncated?
If yes, then in such corner cases, you can always read a part of the value that you're interested in by e.g. evaluating a substring of the very large value.
Comment 3 niconico49 2014-04-10 09:55:53 UTC
We limit string values to 100000 characters not to overflow memory. Is this your case? Is it a very large value, that is truncated?
If yes, then in such corner cases, you can always read a part of the value that you're interested in by e.g. evaluating a substring of the very large value.

In my case is not possible, because for example if i load a file or a string very large and the application give me an error inside that string at the line #8460 
the idea is to take that string and put in some text editor and find the line with the error...
but for you is possible to see that line if the debugger truncate the string after 100000 characters, and the line #8460 is after, form is impossible to see the value behind the "...", and for you?

on the other hand in netbeans 7.4 there wasn't that problems......
and then my request is:
instead of truncate the string variable, is possible to implement some parameter configuration of debugger for setting that limitation?
for example:
unlimited (like netbeans 7.4 i suppose)
100000 characters (default)
value <== customizable

thanks 4 all.
bye
Comment 4 Martin Entlicher 2014-05-23 12:04:59 UTC
I'll add a way to retrieve the full content of the String through the property editor.
Comment 5 Martin Entlicher 2014-06-16 13:05:26 UTC
Fixed by changeset:   275011:e37c7f03d635
http://hg.netbeans.org/core-main/rev/e37c7f03d635
and changeset:   275012:69cb61ebeb06
http://hg.netbeans.org/core-main/rev/69cb61ebeb06

When there is a risk, that the displayed String value would not fit into memory, only the first 100 000 characters are displayed and the property editor component says the original length and allows to save the full value into a file.
When there is enough of free memory, even Strings bigger than 100 000 characters are displayed. Thus you may get either the full value dialog or the partial value dialog depending on actual memory conditions in the IDE.
Comment 6 Quality Engineering 2014-06-17 02:37:57 UTC
Integrated into 'main-silver', will be available in build *201406170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e37c7f03d635
User: mentlicher@netbeans.org
Log: #243700: Display the whole String value when there's enough memory. If not, allow to save the whole String value to a file.
Comment 7 Jiri Kovalsky 2014-07-24 13:09:02 UTC
Created attachment 148283 [details]
Screenshot of strange rendering issue when pointing at "line" variable.

Product Version: NetBeans IDE Dev (Build 201407230001)
Java: 1.8.0_11; Java HotSpot(TM) Client VM 25.11-b03
Runtime: Java(TM) SE Runtime Environment 1.8.0_11-b12
System: Linux version 3.13.0-24-generic running on i386; UTF-8; en_US (nb)

I am sorry Martine but I have to reopen the issue. Firstly, I didn't find the "Save to File" action. And secondly, the IDE behaves strange when I am poiting at string variable in Variables view. Some part of my whole screen is copied to the bottom - see attached screenshot. Furthermore when I click "..." the "Value" dialog is empty although vertical scrollbar is there.
Comment 8 Jiri Kovalsky 2014-07-24 13:09:42 UTC
Created attachment 148284 [details]
Sample project reproducing the problem.
Comment 9 Martin Entlicher 2014-07-24 15:16:03 UTC
Reproduced. I've tested this on Strings containing newlines. These display correctly.
When there is enough of free memory, even Strings bigger than 100 000 characters are displayed. Therefore you might not get the "Save to File" action always.

But due to the problems with displaying of very large Strings, I'll probably limit the display to 100 000 characters always.
Comment 10 Martin Entlicher 2014-07-24 16:54:38 UTC
Now we never display more than 100 000 characters, and they should render correctly now. 
For safety reasons we also make the property editor read-only when only a partial value is displayed - changes to a large value are not handled.
changeset:   276574:eaad3ee13340
http://hg.netbeans.org/core-main/rev/eaad3ee13340

Tooltips in Variable window are fixed by changeset:   276575:4affea63bc3e
http://hg.netbeans.org/core-main/rev/4affea63bc3e
Comment 11 Quality Engineering 2014-07-28 05:22:24 UTC
Integrated into 'main-silver', will be available in build *201407280405* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/eaad3ee13340
User: mentlicher@netbeans.org
Log: #243700: It's feasible to display more than 1000 - 10 000 characters today, therefore upgrading the limit to 100 000 in StringCustomEditor. The text will be screwed up when larger than TOO_LARGE constant.
Debugger makes the property editor read-only when only a partial value is displayed - save of a large value is not handled.
Comment 12 Jiri Kovalsky 2014-07-28 12:57:43 UTC
Product Version: NetBeans IDE Dev (Build 201407280405)
Java: 1.8.0_11; Java HotSpot(TM) Client VM 25.11-b03
Runtime: Java(TM) SE Runtime Environment 1.8.0_11-b12
System: Linux version 3.13.0-24-generic running on i386; UTF-8; en_US (nb)

Works great. Thanks for the quick fix Martine!
Comment 13 sn1 2014-12-19 00:01:09 UTC
(In reply to Martin Entlicher from comment #10)
> Tooltips in Variable window are fixed by changeset:   276575:4affea63bc3e
> http://hg.netbeans.org/core-main/rev/4affea63bc3e

I have a regression to this fix, please see #249366
Comment 14 Martin Entlicher 2015-07-02 21:03:38 UTC
*** Bug 253050 has been marked as a duplicate of this bug. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo