Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322025

Summary: Text using SWT.MULTI style causes eclipse to crash on Enterprise Linux 5.4
Product: [Eclipse Project] Platform Reporter: Ravishankar K (Oracle) <ravis_bea>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: critical    
Priority: P3 CC: eclipse.felipe, ericwill, ravis_bea, remy.suen
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
gdb command output for the core file none

Description Ravishankar K (Oracle) CLA 2010-08-06 15:26:46 EDT
Build Identifier: Build id: I20100608-0911

I am using the release version of eclipse 3.6 helios.
 
I have the following configuration of linux:

bash-3.2$ uname -a && cat /etc/*release
Linux dadvml0178 2.6.18-164.0.0.0.1.el5xen #1 SMP Wed Sep 2 22:48:20 EDT 2009 i686 i686 i386 GNU/Linux
Enterprise Linux Enterprise Linux Server release 5.4 (Carthage)
Red Hat Enterprise Linux Server release 5.4 (Tikanga)

 
If i create 2 SWT Text controls using the SWT.MULTI style, i see that eclipse crashes silently without any log messages (in the .log file or under the eclipse folder) after a while.
 
new Text(composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL |SWT.WRAP);
 
I don't have this problem on the following configuration:
bash-3.00$ uname -a && cat /etc/*release
Linux dadvml0046 2.6.9-89.0.0.0.1.ELxenU #1 SMP Tue May 19 04:48:26 EDT 2009 i686 i686 i386 GNU/Linux
Enterprise Linux Enterprise Linux AS release 4 (October Update 8)
Red Hat Enterprise Linux AS release 4 (Nahant Update 8)


Please let me know if this is a known issue or suggest a workaround for this issue. I have plenty of code which uses SWT.MULTI and i don't want to change that code.

Reproducible: Always

Steps to Reproduce:
1. Create 2 SWT Text controls using the SWT.MULTI style
2. Type soem text in one control and go to the other text control
3. When you are typing the text in the other control (or if you go out of focus), eclipse hangs for a while and then crashes without emitting any messages in the .log file or anything under the eclipse folder
Comment 1 Remy Suen CLA 2010-08-06 16:35:18 EDT
(In reply to comment #0)
> 1. Create 2 SWT Text controls using the SWT.MULTI style

Is this inside an Eclipse plug-in or can you reproduce the problem with a regular SWT snippet? Please provide the code to reproduce the problem.

Are you using the Motif or GTK+ SWT build?

> 3. When you are typing the text in the other control (or if you go out of
> focus), eclipse hangs for a while and then crashes without emitting any
> messages in the .log file or anything under the eclipse folder

Which VM are you using? Are you using HotSpot? Please search your system for hs_err_pid* log files.
Comment 2 Ravishankar K (Oracle) CLA 2010-08-06 19:36:06 EDT
I am using the GTK+ SWT build.

Here's what i am using:

bash-3.2$ java -version
java version "1.6.0_20-rev"
Java(TM) Platform, Standard Edition for Business (build 1.6.0_20-rev-b03)
Java HotSpot(TM) Server VM (build 16.3-b02, mixed mode)


I cannot reproduce this issue in a standalone SWT snippet. It is failing within an eclipse plugin, specifically when displaying within the peoprty sheet:

here's some code:

Composite composite = getWidgetFactory().createFlatFormComposite(parent);

nameText = controlFactory.createText(composite, SWT.SINGLE);
descriptionText = controlFactory.createText(composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.WRAP);


In the code above, i don't have any issues with the nameText but i have issues when i edit and go away from descriptionText.

I will try to create a small eclipse plugin and see if i can reproduce this.
Comment 3 Ravishankar K (Oracle) CLA 2010-08-09 19:19:05 EDT
Created attachment 176199 [details]
gdb command output for the core file

gdb command output
Comment 4 Ravishankar K (Oracle) CLA 2010-08-09 19:21:24 EDT
I saw a core file when eclipse crashed. I could not locate the hs_err_id log file. Please let me know if you see anything useful in the file i have attached. Here's the best information i could see in the log file:

Thread 1 (process 23356):
#0  0xb7faf402 in __kernel_vsyscall ()
#1  0x00be6040 in raise () from /lib/i686/nosegneg/libc.so.6
#2  0x00be7a21 in abort () from /lib/i686/nosegneg/libc.so.6
#3  0x0037ab32 in g_logv () from /lib/libglib-2.0.so.0
#4  0x0037ab69 in g_log () from /lib/libglib-2.0.so.0
#5  0x0037abe6 in g_assert_warning () from /lib/libglib-2.0.so.0
#6  0x00753c2b in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#7  0x00753f35 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#8  0x00693100 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#9  0x003ee639 in ?? () from /lib/libgobject-2.0.so.0
#10 0x003efe98 in g_closure_invoke () from /lib/libgobject-2.0.so.0
#11 0x004013f5 in ?? () from /lib/libgobject-2.0.so.0
#12 0x004020af in g_signal_emit_valist () from /lib/libgobject-2.0.so.0
#13 0x004024a9 in g_signal_emit () from /lib/libgobject-2.0.so.0
#14 0x007a7628 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#15 0x0068c5a3 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#16 0x0068d7a7 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#17 0x6e667cba in Java_org_eclipse_swt_internal_gtk_OS__1gtk_1main_1do_1event ()
   from /scratch/foomachine/ravi-tests/downloads/src/.metadata/.plugins/org.eclipse.pde.core/New_configuration/org.eclipse.osgi/bundles/1464/1/.cp/libswt-pi-gtk-3650.so
#18 0xb41151e0 in ?? ()
#19 0x09986918 in ?? ()
#20 0xb73f21dc in ?? ()
#21 0x72f35ea0 in ?? ()
#22 0x09986f84 in ?? ()
#23 0xb73f21b0 in ?? ()
#24 0xb73f21b4 in ?? ()
#25 0x00000000 in ?? ()
Comment 5 Felipe Heidrich CLA 2010-08-10 11:19:50 EDT
In the machine where the problem happens,
What is the version of gtk ? 
What is the locale, is there an input method problem running ? Which one ?
Is accessibility enabled ? If so, turning it off fixes the problem ?

Please, try to find that hs_err_id log file. Thank you
Comment 6 Ravishankar K (Oracle) CLA 2010-08-10 15:40:22 EDT
GTK version:
============
$ rpm -q gtk2
gtk2-2.10.4-20.el5

Locale:
=======
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

In the System->Preferences->Input Method, i see that it's set to "Follow the System-wide configuration [SCIM]"

I did a system wide search and i could not locate the hs_err_pid log file.
Comment 7 Ravishankar K (Oracle) CLA 2010-08-10 15:46:26 EDT
I also see that Accessibility is turned OFF on this System.
Comment 8 Felipe Heidrich CLA 2010-08-10 15:50:53 EDT
Can you turn off SCIM ? Does it make a difference ?
Comment 9 Ravishankar K (Oracle) CLA 2010-08-10 16:51:38 EDT
I turned SCIM off and set it to "Never Use Input Methods" and i still see the problem.

As a side note, i noticed that if i use StyledText instead of Text i have no problems.
Comment 10 Felipe Heidrich CLA 2010-08-12 15:27:34 EDT
Can you please attach a snippet that I can use to reproduce the crash ?
Comment 11 Ravishankar K (Oracle) CLA 2010-08-12 16:06:32 EDT
This crash happens when using Text(SWT.MULTI) in the tabbed property sheet only. I don't see an issue if i use Text anywhere else like the editor and dialogs.

And on top of it i tried a small plugin which uses the Text Multi in the property sheet and i cannot seem to reproduce the problem.  That's been the difficulty in attaching a reproducer. This makes me think that there is some other thing in my product which may be causing this side effect.
Comment 12 Felipe Heidrich CLA 2010-08-12 16:37:02 EDT
I understand, but without a reproducible test case and without the log file I don't know how to provide futher help to you.

Please let me know of any future information that can help us here.
Comment 13 Ravishankar K (Oracle) CLA 2010-08-12 20:56:11 EDT
After looking at http://wiki.eclipse.org/IRC_FAQ#Crashers.2C_Freezing.2C_and_other_Major_Issues
(bug 215234)

Since my machine was indeed using GTK 2.10, I added the following line to my eclipse.ini:

-Dorg.eclipse.swt.internal.gtk.disablePrinting

and i have no problems now.
Comment 14 Ravishankar K (Oracle) CLA 2010-08-16 17:43:19 EDT
This flag will work as a workaround for now. Do you see how the flag can affect Text functionality?

Also, i am not sure why i could not have the hs_err* log file generated. Should i do anything specific to see this logfile ? I tried passing in the -XX:ErrorFile=<logfilename>  and i still don't see the log file.
Comment 15 Eric Williams CLA 2016-10-04 10:38:44 EDT
I can't reproduce this crash, and the system this bug happened on isn't supported any longer.