Bug 517837 - combobox with very long entry leads to visual glitch and/or eclipse hang
Summary: combobox with very long entry leads to visual glitch and/or eclipse hang
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted, triaged
Depends on:
Blocks:
 
Reported: 2017-06-06 01:44 EDT by Sven Rathgeber CLA
Modified: 2020-07-16 15:43 EDT (History)
3 users (show)

See Also:


Attachments
Selecting Find/Replace history -> crash (351.19 KB, image/jpeg)
2017-06-06 01:44 EDT, Sven Rathgeber CLA
no flags Details
Selecting Find/Replace history (347.57 KB, image/jpeg)
2017-06-06 01:45 EDT, Sven Rathgeber CLA
no flags Details
output from 'jstack -l PID' (19.16 KB, text/plain)
2017-06-06 02:17 EDT, Sven Rathgeber CLA
no flags Details
find history (64.00 KB, text/plain)
2017-06-07 16:50 EDT, Sven Rathgeber CLA
no flags Details
Corrupt .metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialag_settings.xml (149.17 KB, text/xml)
2017-06-07 17:10 EDT, Sven Rathgeber CLA
no flags Details
Native snippet. (1.92 KB, text/x-csrc)
2017-06-08 10:55 EDT, Leo Ufimtsev CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Rathgeber CLA 2017-06-06 01:44:30 EDT
Created attachment 268762 [details]
Selecting Find/Replace history -> crash

Find/replace: Selecting find history leads to some kind of crash.
No further interaction with X possible. (see attachement).
Killing eclipse on tty 2 is possible.

Version: Oxygen (4.7)
Build id: I20170524-2000
(update 06/06/2017)

System (uname -a)
Linux dhcp1100.se.dfs.de 4.11.3-200.fc25.x86_64 #1 SMP Thu May 25 19:03:07 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Most current Fedora 25 (update 06/06/2017)
Comment 1 Sven Rathgeber CLA 2017-06-06 01:45:15 EDT
Created attachment 268763 [details]
Selecting Find/Replace history
Comment 2 Andrey Loskutov CLA 2017-06-06 02:02:51 EDT
Please atttach jstack dump.
Comment 3 Sven Rathgeber CLA 2017-06-06 02:17:39 EDT
Created attachment 268764 [details]
output from 'jstack -l PID'
Comment 4 Andrey Loskutov CLA 2017-06-06 02:29:38 EDT
(In reply to Sven Rathgeber from comment #3)
> Created attachment 268764 [details]
> output from 'jstack -l PID'

Thanks, stack shows idling UI. So you can't do anything, neither in the dialog nor in the editor? Moving to SWT.
Comment 5 Sven Rathgeber CLA 2017-06-06 03:00:24 EDT
> So you can't do anything, neither in the dialog nor in the editor?
Thanks for replying so quickly. 
That's right. Can not do anything with X. Neither eclipse, nor any other UI functionality.
Comment 6 Leo Ufimtsev CLA 2017-06-06 14:10:40 EDT
(In reply to Sven Rathgeber from comment #0)
> Created attachment 268762 [details]
> Selecting Find/Replace history -> crash
> 
> Find/replace: Selecting find history leads to some kind of crash.
> No further interaction with X possible. (see attachement).
> Killing eclipse on tty 2 is possible.
> 
> Version: Oxygen (4.7)
> Build id: I20170524-2000
> (update 06/06/2017)
> 
> System (uname -a)
> Linux dhcp1100.se.dfs.de 4.11.3-200.fc25.x86_64 #1 SMP Thu May 25 19:03:07
> UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
> 
> Most current Fedora 25 (update 06/06/2017)

I have a similar setup:
Build id: I20170530-0800
Linux fc25.x86_64 

I can't seem to reproduce. Can you post *exact* steps to reproduce? What do you mean by "history" in the find part?

Which Java do you use? If you're using Oracle java, can you try OpenJDK?
It's possible that you're missing some java package, try installing all avaliable and relevant OpenJDK packages on your system.

sudo dnf list installed | grep i openjdk
java-1.8.0-openjdk.x86_64          1:1.8.0.131-1.b12.fc25     @updates          
java-1.8.0-openjdk-debuginfo.x86_64
java-1.8.0-openjdk-devel.x86_64    1:1.8.0.131-1.b12.fc25     @updates          
java-1.8.0-openjdk-headless.x86_64 1:1.8.0.131-1.b12.fc25     @updates          
java-1.8.0-openjdk-javadoc.noarch  1:1.8.0.131-1.b12.fc25     @updates          
java-1.8.0-openjdk-src.x86_64      1:1.8.0.131-1.b12.fc25     @updates
Comment 7 Sven Rathgeber CLA 2017-06-06 14:50:18 EDT
> I can't seem to reproduce. Can you post *exact* steps to reproduce? What do you > mean by "history" in the find part?

Please look at the second attachment. The mouse is pointing to the "history".
I mean the drop down menue, containing the search expressions, I used before.

So opening find/replace, then opening the "history"/dropDownMenue. Results in
the picture from the first attachement.

> Which Java do you use? If you're using Oracle java, can you try OpenJDK?
We use oracle java 1.8.131. I can not change that, due to company requirements.

This afternoon we checked the (pretty) similiar environment of a co-worker. 
He can not reproduce the crash either.

KDE settings? Docking Station? Multi monitor enviroment ?
Comment 8 Leo Ufimtsev CLA 2017-06-07 12:57:58 EDT
(In reply to Sven Rathgeber from comment #7)
> > I can't seem to reproduce. Can you post *exact* steps to reproduce? What do you > mean by "history" in the find part?
> 
> Please look at the second attachment. The mouse is pointing to the "history".
> I mean the drop down menue, containing the search expressions, I used before.
> 

Ahhh. Cool, so we have a history, I never noticed this feature. 
With that said, the issue doesn't occur on my system.

> > Which Java do you use? If you're using Oracle java, can you try OpenJDK?
> We use oracle java 1.8.131. I can not change that, due to company
> requirements.

Do you still have openjdk installed? As oppose to setting java globally, you could try to tell Eclipse to launch via a specific java version:
- edit eclipse.ini
- *before* vmargs, add:  (exactly as below, with new line)

  -vm
  PATH_TO_openJDK

My path look like this:
readlink -f /usr/bin/java | sed "s:jre/bin/java::"
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-1.b12.fc25.x86_64/

You can tell which java is used by eclipse via:
jcmd # note pid of your eclipse
jcmd PID VM.version

> This afternoon we checked the (pretty) similiar environment of a co-worker. 
> He can not reproduce the crash either.
> 
> KDE settings? Docking Station? Multi monitor enviroment ?

You have KDE installed? ~I have never tested this. 
But it could be an issue. KDE uses QT as backend, where as Eclipse uses Gtk as backend. For Gtk to work on KDE, KDE creates an X11 Window and gives control to X11. This nesting might cause some issues. You could potentially try to kill KDE and launch a gnome instance and see if that's the cause of the problem.

You could try using a single monitor to narrow down monitor. But I use 4 monitors (laptop + 3 external) and do not see such behaviour.

Btw, since you're on KDE, I presume you're running X11 as backend? (as oppose to wayland). If on wayland, does this occur on X11 (on login screen of gnome, you can switch to 'classic' mode, which is x11).

There might also be some issue with drawing libraries maybe..

Normally when eclipse crashes, there's a crash dump involved. jstack is there if Eclipse 'hangs' and you get a dump manually. Can you clarify, do you actually get a crash or does eclipse 'hang' for you?
If you have a crash, do you have the .pid crash file at hand anywhere?
Comment 9 Sven Rathgeber CLA 2017-06-07 16:50:39 EDT
Created attachment 268801 [details]
find history
Comment 10 Sven Rathgeber CLA 2017-06-07 16:53:59 EDT
What I tried so far. 

- installed GNOME -> same problem
- used new, empty workspace -> NO problem

.... I was wondering what is so special about my workspace. Hmm, the
find history, since I used regular expressions.

You asked wether it crashes or hangs. It hangs. Using kde it did not recover. But 
using gnome it recovers, giving me access to the history. 
The history is exploded. See attachment.

Looks like the history, which consisted of several entries, is merged into one line. Can that cause the problem ?
Comment 11 Sven Rathgeber CLA 2017-06-07 17:10:09 EDT
Created attachment 268802 [details]
Corrupt .metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialag_settings.xml
Comment 12 Sven Rathgeber CLA 2017-06-07 17:12:26 EDT
I looked, where eclipse saves its find/replace history.
.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml

I used this file in the new, emtpy workspace and can reproduce the bug.
(attached dialog_settings.xml)
Comment 13 Leo Ufimtsev CLA 2017-06-07 17:31:42 EDT
(In reply to Sven Rathgeber from comment #12)
> I looked, where eclipse saves its find/replace history.
> .metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml
> 
> I used this file in the new, emtpy workspace and can reproduce the bug.
> (attached dialog_settings.xml)

With this, the issue reproduces. ~sort of. 

I get a popup that's huge, and it's content is a copy of my screen instead of the meue. I.e, no-functional.

I think there's probably a limit on how big a menu item can be on gtk. Fix might be to force a maximum size on this one. We do something similar for shell:
Bug 472743 – [GTK] Shell.setBounds() with specific values crashes JVM or makes the shell non functional

I.e, we should investigate combo.add(), and see what length string causes breakage, and once found either report to gtk community and/or set a hard limit.
Comment 14 Leo Ufimtsev CLA 2017-06-07 17:38:17 EDT
(In reply to Sven Rathgeber from comment #10)
> What I tried so far. 
> 
> - installed GNOME -> same problem
> - used new, empty workspace -> NO problem
> 
> .... I was wondering what is so special about my workspace. Hmm, the
> find history, since I used regular expressions.
> 

Btw, thank you for savvy investigation & narrowing this down. It helped a lot.
Comment 15 Leo Ufimtsev CLA 2017-06-08 10:55:37 EDT
Created attachment 268823 [details]
Native snippet.

Not tested myself, but my colleague said that if you change the 3rd invocation of:
gtk_list_store_insert_with_values
And make the string really really long:
C 12345678901234 ... like 1000's of characters,

Then gnome shell crashes.

We should investigate if this is a known gtk bug, if not report it to gtk developers.
Comment 16 Eclipse Genie CLA 2020-07-16 15:43:38 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.