Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322871 - GTK: Eclipse crashes with SIGABRT when using a "select folder" dialog with a file name
Summary: GTK: Eclipse crashes with SIGABRT when using a "select folder" dialog with a ...
Status: CLOSED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-17 02:55 EDT by Manuel Maier CLA
Modified: 2016-12-19 14:59 EST (History)
7 users (show)

See Also:


Attachments
stacktrace produced with gdb (8.23 KB, text/plain)
2010-08-17 02:57 EDT, Manuel Maier CLA
no flags Details
Screenshot of "Import File System" dialog (24.92 KB, image/gif)
2010-08-17 04:00 EDT, Martin Oberhuber CLA
no flags Details
A slightly better backtrace (2.93 KB, text/plain)
2010-08-17 04:12 EDT, Martin Oberhuber CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Maier CLA 2010-08-17 02:55:45 EDT
Build Identifier: I20100608-0911

Eclipse 3.6:

If you try to import a "File System" into a project by copy/pasting a filepath(e.g.: /home/directory/file.txt) first in the From: text field and then also the same path in the Browse dialogue' s Location: text field, Eclipse will crash without any warning or error after clicking the OK button.

Reproducible: Always

Steps to Reproduce:
1. Create a project(e.g. a java project)
2. Do, Import -> General -> File System
3. Copy/Paste a filepath, e.g.: /home/directory/file.txt (not a directorypath) to the "From:" text field
4. Click Browse
5. paste the same filepath to the "Location:" text field
6. click OK -> Eclipse crashes
Comment 1 Manuel Maier CLA 2010-08-17 02:57:12 EDT
Created attachment 176758 [details]
stacktrace produced with gdb
Comment 2 Martin Oberhuber CLA 2010-08-17 04:00:37 EDT
Created attachment 176762 [details]
Screenshot of "Import File System" dialog

CQ:WIND00226880

The trick here is that our user pasted a *file name* where the dialog expected a *folder name* - see attached screenshot. I reproduced this on RHEL 5.3 (Tikanga) x86_64. rpm -q shows:

gtk2-2.10.4-20.el5
gtk+-1.2.10-56.el5
glib2-2.12.3-2.fc6
glib-1.2.10-20.el5

Eclipse dies with a SIGABRT, not even a hs_err*.log is created.
Comment 3 Martin Oberhuber CLA 2010-08-17 04:09:28 EDT
The same problem can be reproduced in the "Select Workspace" dialog:

1. Launch Eclipse
2. As workspace location, paste "/folk/mober/WRTest/bar.txt"
3. Press Browse button
4. In "Browse for folder" location field, paste "/folk/mober/WRTest/bar.txt"
5. Press OK 

--> Eclipse crashes with SIGABRT.

I noticed that the crash only occurs when the "browse for folder" dialog is already initialized with a file name instead of a folder (step 2). So while GTK may be the culprit for the crash, it may be easy to fix the issue on the SWT / Eclipse side by ensuring that the "browse for folder" dialog is always initialized with a valid folder and never a file name.
Comment 4 Martin Oberhuber CLA 2010-08-17 04:12:19 EDT
Created attachment 176763 [details]
A slightly better backtrace

Here is a backtrace I got on RHEL5 with Eclipse SDK M20100728-0800 as follows:

/jre/1.5.0_11/bin/java -jar org.eclipse.equinox.launcher_1.1.0.v20100507.jar
gdb /jre/1.5.0_11/bin/java 4925
(gdb) cont
Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
Comment 5 Martin Oberhuber CLA 2010-08-17 04:34:09 EDT
On Ubuntu 9.04, I could not see this issue - pressing OK with the filename pasted just does nothing. Our Ubuntu host has

libgtk2.0-bin version 2.16.1-0ubuntu2

I still think though it would be prudent to ensure that a "Select folder" dialog is not initialized with a file name.
Comment 6 Helmut J. Haigermoser CLA 2011-08-22 09:37:25 EDT
Hi All :)
I just reproduced this using Eclipse 3.7, can we get a technical comment from platform.swt about the issue, is this an issue you can acknowledge, what's the time frame for a fix, how can we best help?
TIA,
Ciao, hh
Comment 7 Felipe Heidrich CLA 2011-08-23 10:47:01 EDT
Arun, Bogdan, can you guys reproduce this problem ?
Comment 8 Bogdan Gheorghe CLA 2011-08-23 17:26:06 EDT
I tried to reproduce this on RHEL 6 (32) and Ubuntu 11 (64) with no dice. I'll try to track down a RHEL5 64 bit machine to test on.
Comment 9 Helmut J. Haigermoser CLA 2011-08-24 04:48:30 EDT
(In reply to comment #8)
> I tried to reproduce this on RHEL 6 (32) and Ubuntu 11 (64) with no dice. I'll
> try to track down a RHEL5 64 bit machine to test on.

Thanks Boghdan! :)
I've seen this on my RH5.3(64), newer system might not react so drastically to the problem...
Helmut
Comment 10 Eric Williams CLA 2016-12-19 14:59:58 EST
I can't reproduce this issue.