| Summary: | Eclipse crashes when to much is written to a single line of the Console | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Kevin Stedman <kstedman9> | ||||||||
| Component: | SWT | Assignee: | Felipe Heidrich <eclipse.felipe> | ||||||||
| Status: | RESOLVED WONTFIX | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | alexeys, andreas, billy.biggs, c1234, cedster, daniel_megert, david.perez.ingeniero, eric, fvogt, gheorghe, hauser, hendrik, jed, karltk, kleinhenz, milianwolff, mlists, muntyan, snorthov, snpe, tim.morrow, u1305_00, veronika_irvine, zorzella | ||||||||
| Version: | 3.1 | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Linux-GTK | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
possibly a bug in Text? Code doesn't crash Eclipse on mac. Don't have a Solaris box to test on. Moving to SWT for comment. Billy, please investigate and advise. This also happens on my x86 laptop running Ubuntu breezy, xorg-x11 6.8.2-77, Sun JDK 1.5.0_05, gtk 2.8.6-0ubuntu2, while running some JUnit test which produce a lot of output to the Console. Problem persists with JDK 1.5.0_05, and is reproducible with both Eclipse 3.1 and 3.1.1 Closing the Console before running the JUnit tests does not help, as it is automatically reopened, but minimizing it avoids the problem. The instant before crashing, the second line of the Console is overwritten multiple times with text, as if proper line breaking does not take place. The problem is quite recent for me, and may coincide with an upgrade I did from Hoary to Breezy. If I limit myself to less than about 100000 characters per line, I get the following error. If I print significantly more than 100000 characters per line, I only get the two first lines of this error: The program 'Eclipse' received an X Window System error. This probably reflects a bug in the program. The error was 'BadDrawable (invalid Pixmap or Window parameter)'. (Details: serial 440174 error_code 9 request_code 66 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) If I set the limit somewhat less than 30000, it stops crashing altogether. (In reply to comment #1) > possibly a bug in Text? Code doesn't crash Eclipse on mac. Don't have a Solaris > box to test on. Moving > to SWT for comment. I get weird things happening with the console on the Mac, when printing long lines eg: public static void main(String[] args) { System.out.print("Counting"); StringBuffer buffer = new StringBuffer(); for (int i=0; i<28504; i++) { buffer.append("*"); } System.out.print(" some more"); System.out.println(buffer); System.out.println("Complete"); } The output I get from this is as follows: Counting some Complete ie the long string of '*' isn't displayed and overwrites part of the preceding output. Steve *** Bug 120983 has been marked as a duplicate of this bug. *** *** Bug 123528 has been marked as a duplicate of this bug. *** *** Bug 116596 has been marked as a duplicate of this bug. *** Can confirm this on Suse 10.0 with Version: 3.2.0 Build id: I20051215-1506 and java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) A quick solution is to tell the console to break after a specific line width in the run menu. Created attachment 35904 [details]
Screenshot of console with very long line.
This is a screenshot of the console if I print a very large Collection to it. If I make it even larger (i.e. from a set which contains 1024 elements, each of string length about 16 chars, so a total length of about 18450, to a set of 3515), it crashes.
Some quick testing gave me that a string of length 8000 gives no problem, whereas 8500 makes the chars to become scrambled (written over each other). Then until 21000 the same, and from 22000, Eclipse crashes.
There are clearly a couple of ways we can crash on long strings, potentially bugs in pango/fribidi (the original report), and also through crashing X due to creating widgets past the maximum size constraints. I'm using this bug to track both issues. *** Bug 23270 has been marked as a duplicate of this bug. *** *** Bug 132710 has been marked as a duplicate of this bug. *** A workaround if this is annoying the hell out you! Open up Window -> Preferences Run/Debug -> Console Select fixed width console, Maximum character width 80 (or whatever is appropriate). Stops the worst of the problem, but I don't think the problem is confined to the console. Same issue happens everywhere eclipse tries to print really long strings. *** Bug 124789 has been marked as a duplicate of this bug. *** *** Bug 128649 has been marked as a duplicate of this bug. *** I'm not sure if I should create a new bug report but I encounter just the same bug but in a normal editor (not the console), when I open a file with lots of contents in one line. First I see it normally but as soon as I try to scroll my system crashes completly (hard freeze, restart required). These are the last few lines in my .metadata/.log: http://nopaste.php-q.net/221891 I'm using 3.1.2 with some plugins (subclipse, php and webdev mainly) and this bug happens in different editors in eclipse. System: kubuntu dapper with java-sun-1.5.0_06 (In reply to comment #14) > A workaround if this is annoying the hell out you! > > Open up Window -> Preferences > Run/Debug -> Console > > Select fixed width console, Maximum character width 80 (or whatever is > appropriate). running Eclipse v3.2 on Ubuntu (dapper drake) I can confirm that this still exists and that this workaround fixes the hang. For me Eclipse consumes 100% cpu and never returns. Will attach a thread dump. cheers, - jed. Created attachment 45684 [details]
threaddump during 100%cpu usage when outputting long line to console
first time I tried to attach this it ended up on another bug entirely :-(
Not entirely sure, but http://bugzilla.gnome.org/show_bug.cgi?id=127731 would seem to be the problem. I get the same behaviour in gedit with long lines. It seems longer lines show exponentially worse behaviour. Moving to Felipe to investigate. This looks like a WONTFIX to me. I can't see how we can know in advance which operating systems crash when passed a long line. *** Bug 158289 has been marked as a duplicate of this bug. *** from bug 159289: This only happens with the nvidia-drivers in eclipse. When I am using the vesa-driver, this doesn't happen, although the debug-line doesn't get displayed correctly either. It also doesn't happen, when running the application standalone and watching the output in a shell window. Here is some information about my setup. OS: Gentoo Linux Kernel: Linux 2.6.17-gentoo-r4 X: xorg-x11 7.1 nVidia: nvidia-drivers 1.0.8774 Eclipse: Version: 3.2.0 Build id: M20060629-1905 I am using Ubuntu with an Intel i915GMS, so it can't be limited to NVidia. On my machine it draws garbage but it doesn't crash. It is a Fedora Core 5, gtk 2.8.20, video card NVIDIA Quadro FX 1400, I'm using the "nv" driver from the dist (not "nvidia" from Nvidia). I'll do some work search in this area but probably this problem will be marked as WONTFIX. I installed the "nvidia" drive from NVIDIA and now it crashes. The following seems to explain the issue(s): http://nvidia.custhelp.com/cgi-bin/nvidia.cfg/php/enduser/std_adp.php?p_faqid=1971 Thanks for the link Ismael. As I wrote, this problem is not dependant on the chipset or graphics driver used. Why is this bug marked WONTFIX? It should certainly be fixed! The nvidia link explained that there were two separate issues that caused similar behaviour. One was an XFree86/X.Org server bug and another was an nvidia driver's bug. In the former case, you don't need an nvidia driver at all. Having said this, it could be that you're seeing a third problem with the same symptoms. The easiest way to check is to see if the X.Org server version you are using already contains the fix for the problem mentioned on that link. (In reply to comment #25 and comment #30) I've had the same problem (on Suse 9.1) but could fix it (the crash of the X-Server) by upgrading the nvidia-driver to 1.0.8776. Nevertheless I propose to reopen the issue (and maybe to change the severity to "enhancement"). The behavior of the console and editor windows in the present isn't really acceptable. IMHO both should insert some linebreaks, because the garbage produced in the output by very long lines isn't readable and that should be fixed. Heinz P.S.: Thanks to Ismael for the link in comment #28. *** Bug 163299 has been marked as a duplicate of this bug. *** Created attachment 68593 [details]
same phenomenon in text editor
I propose to reopen this as well, since not only the console seems to have this problem. If I save/redirect the console output which shows this behavior to a file and open that file with eclipse, the text editor has the same problem.
Versie: 3.2.0
Build-ID: M20070212-1330
I also noticed that the editor quit with an OOME when I tried to open a similar file as in the screenshot above. It only has 70Mb, but very long lines. > It only has 70Mb, but very long lines.
Sorry, but that's not "only". It's quite big and I wonder how you would edit such a large file. This is currently not well supported (see related bugs in Platform Text).
*** Bug 122964 has been marked as a duplicate of this bug. *** For me things seem to be even worse, not just crashing Eclipse but the whole X server. This is on Ubuntu and occurs when I select certain objects in the debugger that happen to print lots of output using their toString() method. Can someone still reproduce this bug? If yes, could you please get a backtrace and post it at http://bugzilla.gnome.org/show_bug.cgi?id=127731 *** Bug 287924 has been marked as a duplicate of this bug. *** |
When using System.out.print to write to the Console tab in Eclipse, if you write to many characters (approximately 200,000) it will crash Eclipse with a Segmentation Fault. Here is a simple example that crashes my Eclipse everytime: for (int y = 0; y < 20000; y++) { for (int x = 0; x < 10; x++ ) { System.out.print(x); } } The core file from the crash shows it received a Segmentation Fault in the function "fribidi_analyse_string". If you need a core file I can repeat the problem and provide it at anytime.