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 199153 - Output window not showing new lines correctly
Summary: Output window not showing new lines correctly
Status: RESOLVED WONTFIX
Alias: None
Product: cnd
Classification: Unclassified
Component: Terminalemulator (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: 8514017910
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-03 16:25 UTC by sdelvalle
Modified: 2015-07-31 14:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Output content (101.30 KB, text/plain)
2011-06-06 16:24 UTC, sdelvalle
Details
Screenshot (69.07 KB, image/jpeg)
2011-06-06 16:25 UTC, sdelvalle
Details
Output Window Does not show (15.45 KB, patch)
2015-07-31 14:56 UTC, 8514017910
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sdelvalle 2011-06-03 16:25:47 UTC
Product Version = NetBeans IDE 7.0 (Build 201104080000)
Operating System = Linux version 2.6.35-28-generic running on amd64
Java; VM; Vendor = 1.6.0_24
Runtime = Java HotSpot(TM) 64-Bit Server VM 19.1-b02

The output window is handling the new line character but not the carraige return, so the output is shown something like

line1
        line2
                line3
Comment 1 Martin Entlicher 2011-06-06 09:52:02 UTC
Can you please let us know how what has produced such output?
It's true that output window does not handle '\r', but after '\n' it starts the next line at the beginning of the line.
Comment 2 sdelvalle 2011-06-06 15:42:19 UTC
It's not a special task what produced this output, I'm just executing maven goals, running a web app in tomcat, or an ejb in glassfish, anything that sends output to the output window is shown this way
Comment 3 Martin Entlicher 2011-06-06 16:17:23 UTC
Can you please save the output via "Save As..." context action and attach it to this issue? And also attach a screenshot of what is displayed in a wrong way.
I need to see what specifically cause the problem. Thanks.
Comment 4 sdelvalle 2011-06-06 16:24:44 UTC
Created attachment 108760 [details]
Output content

This is the output text, the Save As... action is not present in the context menu (don't know if this is another issue) so I copy-pasted it.
Comment 5 sdelvalle 2011-06-06 16:25:30 UTC
Created attachment 108761 [details]
Screenshot
Comment 6 Jaroslav Havlin 2011-10-26 08:11:18 UTC
Hello,
I am sorry, I am not able to reproduce this bug.
Have you tried a newer NetBeans version (7.0.1, 7.1 Beta or a recent daily build) or newer JDK?
Are you still encountering this problem?
Thanks in advance.
Comment 7 sdelvalle 2011-10-26 15:42:52 UTC
Yes I'm still having this problem, I updated to 7.0.1, with jdk 6.26
Comment 8 sdelvalle 2011-10-26 15:49:42 UTC
May be the maven version? Using 2.2.1
Comment 9 Jaroslav Havlin 2011-10-31 16:25:36 UTC
I've just tested it with NetBeans 7.0.1, maven 2.2.1 and JDK 1.6.0_27 and it worked fine. It must be something else.
Comment 10 sdelvalle 2011-10-31 16:31:20 UTC
The only thing that comes to my mind is the O. S. I'm using Ubuntu 10.10 maverick
Comment 11 Jaroslav Havlin 2011-11-01 10:31:36 UTC
I tested it on Ubuntu 10.10 and still cannot reproduce. I'm clueless now. Do you have any  ideas?
Comment 12 sdelvalle 2011-11-01 18:26:39 UTC
No, no more ideas, I have all of the system updates, and pretty much everything is managed by apt, so I'm supposed to have all of the standard libraries. I'll soon upgrade my computer to Ubuntu 11.11, hopefully I'll get rid of this issue, which is not blocking my work, but is annoying.
Comment 13 Jaroslav Havlin 2012-04-04 12:57:05 UTC
Have you tried updating your system or version of NetBeans since your last comment? Do you still encounter the bug? Thanks.
Comment 14 sdelvalle 2012-04-11 14:19:00 UTC
Yes, now I'm using Ubuntu 11.10 and NetBeans 7.1, and everything is working fine, something was not working with the previous versions, I don't really know what, but the problem is not there any more.

Thanks for your help.
Comment 15 Jaroslav Havlin 2012-04-11 14:24:43 UTC
Good news :-)
Thank you for reporting and your comments.
Comment 16 Eric106 2013-11-22 23:39:19 UTC
I'm not sure if I should create a new bug report or add on to this one.

Product Version: NetBeans IDE 7.4 (Build 201310111528)
Java: 1.7.0_25; OpenJDK 64-Bit Server VM 23.7-b01
Runtime: OpenJDK Runtime Environment 1.7.0_25-b30
System: Linux version 3.2.0-56-generic running on amd64; UTF-8; en_US (nb)

I am having a similar issue with the new lines in the output window not being handled correctly but only when building and running on a remote Linux host.  When I build and run on the local host then printf("test\ntest\n") works correctly as:

test
test

But, when I build and run on the remote host I get:

test
    test

Indicating it is expecting a \r\n instead of just a \n.

However, when I run the executable on the remote host via a terminal and not through NetBeans then the \n are interpreted correctly and I get:

test
test

So, it works correctly when building on the local host.  The generated executable works correctly on the remote host.  But the generated executable run on the remote host by NetBeans and displayed in the output window does not handle the new lines correctly.

The remote host is running a Debian Wheezy port on a single board computer with an ARMv6 processor.

Please let me know what other info would be helpful and if I should open a new bug report.  Thanks.

-Eric
Comment 17 Jaroslav Havlin 2013-11-25 08:41:33 UTC
Are the lines wrapped incorrectly in Output Window, Terminal Emulator Window,
or both? (If you are not sure, please attach a screenshot.) Thank you.
Comment 18 Eric106 2013-11-25 11:18:58 UTC
The problem is occurring in the output window.  The built-in terminal emulator is not working so I can not say if it might be affected or not.  

When I attempt to start either a local or remote terminal in NetBeans I get a "Local Terminal is not supported on this system" error message.  I get the same error message when trying to start both local and remote terminals.  This is a lower priority problem to me since I can easily use a normal terminal window outside of NetBeans.  Because of this, I have not spent much time researching this terminal issue other than it seems to be Java related.

The output window is far more important because when debugging I need to see the program's output as I stop and start execution.  

One other thing that I noticed: the first time or two I built and ran a program on the remote host I had no program output at all in the output window.  This only happened the first time or two and has been working so far since then.  I am not sure that this is related but I thought I would mention it.

Thanks for looking in to this.  Please let me know what other information would be useful. 

-Eric
Comment 19 Jaroslav Havlin 2013-11-25 14:04:55 UTC
So, in your Project Properties -> Run -> Console Type, the value "Standard Output" is selected, right?

Can you please save an example output to a file (right click in the output tab and select "Save As...") and attach it to this issue?

Can you also attach corresponding output data file in the tmp directory (it should be the newest file starting with "output"+some long number).

If you select the text, is the whitespace at the beginning of the incorrectly indented line also highlighted?

Thank you very much.
Comment 20 Eric106 2013-11-26 12:44:39 UTC
I was not aware of the "Console Type" setting in Project Properties.  I checked and it was set to "Internal Terminal" which is apparently the default.  Even though this was set to "Internal Terminal" the internal NetBeans terminal has not been working and so the program was somehow still using the output window.  

I changed the value of the "Console Type" to "Standard Output" and now new lines are being handled correctly in the output window.

For me the issue now seems to be resolved but I am not sure why it was partially working with the "Console Type" set to "Internal Terminal" when the internal terminal is not functioning.  Somehow NetBeans was falling back to sending the programs output to the output window but with incorrect new line handling.  

This behavior should probably be corrected to either fail with an error message letting the user know that the "Console Type" is set to "Internal Terminal" but the internal terminal is not working or, to automatically change the "Console Type" setting to "Standard Output" so that output is handled correctly.

Thanks for your help.

-Eric
Comment 21 Jaroslav Havlin 2013-11-26 13:25:53 UTC
Terminal Emulator is a component that is used for the Terminal window, and can also be used for C/C++ output.
Output Window is another component, that is used for e.g. java output, and can be used for C/C++ output, too.

If the output works fine for Console Type "Standard Output", the bug is in Terminal Emulator.
I was not able to reproduce the bug, so it probably depends on configuration of the remote build host.

Reassigning to cnd/Terminalemulator. Please evaluate. Thank you.
Comment 22 soldatov 2013-11-26 19:08:31 UTC
(In reply to Eric106 from comment #16)
> The remote host is running a Debian Wheezy port on a single board computer
> with an ARMv6 processor.
It is expected behaviour on ARM. All supported platforms (binary files) you can see in netbeans/ide/bin/nativeexection folder

Linux-x86
Linux-x86_64
MacOSX-x86
MacOSX-x86_64
SunOS-sparc
SunOS-sparc_64
SunOS-x86
SunOS-x86_64
Windows-x86
Windows-x86_64
Comment 23 8514017910 2015-07-31 14:56:47 UTC
Created attachment 155092 [details]
Output Window Does not show