- This topic has 4 replies, 2 voices, and was last updated 5 years, 6 months ago by Brian Fernandes.
-
AuthorPosts
-
gcriderParticipantI’m using MyEclipse Enterprise Workbench CI 2019.4.0. In my Window->Preferences->Run/Debug->Console settings, “Fixed width console” is unchecked.
When printing/logging a string variable that is 4096 characters or longer to the console, nothing shows up. Also, if you run the same program in Debug mode, and look at the variable (or its equivalent toString()) in the Variables pane (where the string representation goes), nothing shows up there either.
Interestingly enough, when the “Fixed width setting” is checked, it will print the entire string, and wrap it. I set the width to 1000, and it wrapped to 5 lines.
Here is a sample program that demonstrates the problem:
public class LongStringTest { /** * @param args */ public static void main( String[] args ) { String lit = ".........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+" + ".........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+" + ".........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+" + ".........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+" + ".........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+" + ".........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+" + ".........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+.........+......" ; System.out.println( "LIT: lgth=" + lit.length() ) ; System.out.println( lit ) ; } }
This seems like an eclipse defect. Anybody else experience this? Really need to solve this.
Thanks in advance.
gcriderParticipantJust discovered another data point with this problem. The problem with the console doesn’t appear to be how long the String variable is. It’s how long it is before a line break. I printed a 14K character long XML string to the console, and it didn’t show up. But when I formatted (pretty print) the same XML string, it printed to the console just fine.
Aso, I discovered in the Detail pane for the Variable page that you can set the Max Length Value to 0 to have an unlimited width. But that didn’t fix the problem in Debug mode.
Brian FernandesModeratorAppreciate you providing the sample program – I ran it with the default settings (see attached screenshot), and 4096 characters did get printed out on a single line. Verified by copying the line and pasting it into an external file, which turned out to be 4096 bytes in size. I did something similar when stopped at a breakpoint, the “Value” cell had 4096 characters in it, as did the display at the bottom of the Variables view when
lit
was selected.Some things to try:
1) Do you have, “Limit console output” checked? If yes, uncheck it and see if that helps (I had it checked).
2) I ran the program with a 64-bit Java 11 – what JDK are you using? There are some Java<> String size limitations too, I haven’t looked too deep, but might be worth trying.Do let us know if either of these suggestions help.
Attachments:
You must be logged in to view attached files.
gcriderParticipantBrian,
Thanks for your response.
First, my settings are with “Limit console output” unchecked. Also, I am running against Java 11.0.3 from Oracle. So, the initial suggestions do not correct the problem. It really does appear to be connected with the IDE. I ran the sample program from the command line (outside of eclipse) and it worked fine. It printed the line no problem.
Brian FernandesModeratorSorry – didn’t mean to imply it was a JDK issue, just a hunch on how different versions of the JDK could interact with the IDE.
1) Can you provide your OS, version, and windowing system details (if Linux)? I assumed Windows, but would like to be sure.
2) Can you send us a screenshot of your workbench with the console open? Might see something that’s not obvious.
3) Can you send us your workbench error log? Suggest going to the error log view, clearing it, and send us the log after reproducing the problem.At the core, this is an Eclipse issue, and could be related to OS level limits (and not just the OS – it worked for me on Windows 10), based on what I see here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=23406 (the bug is about the editor, but the same widget is used in the console as well).
-
AuthorPosts