| Summary: | [GTK3] SWTBot makes Eclipse hang | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Technology] SWTBot | Reporter: | Marc-André Laperle <malaperle> | ||||
| Component: | SWTBot | Assignee: | Project Inbox <swtbot-inbox> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | akurtakov, arunkumar.thondapu, mistria | ||||
| Version: | 2.2.1 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Marc-André Laperle
Created attachment 242918 [details]
test project
Indeed, in SWTBot, AWT is used and it loads GTK2. With the Oracle JDK (tested version 8) this problem is not present. To verify this, I removed the AWT code from SWTBot and it worked on openjdk. But it doesn't look easy to remove this cleanly so it might be better to fix this in openjdk. @Marc-Andre: did you identify which parts of SWTBot depend on AWT? Ideally, it would make a lot of sense to simply avoid using AWT APIs in SWTBot. However, we need to evaluate whether it's really possible. I know for example that javax.awt.Robot is used for some drag'n'drops. If we can implement the same thing with SWT, let's do this, but I'm not sure of a good way to do this. I did a grep for .awt. and this came up: ./org.eclipse.swtbot.swt.finder.test/src/org/eclipse/swtbot/swt/finder/keyboard/KeyboardLayoutFilter.java:13:import java.awt.im.InputContext; ./org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/utils/SWTBotPreferences.java:15:import java.awt.im.InputContext; ./org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/keyboard/KeyboardFactory.java:13:import java.awt.Robot; ./org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/keyboard/AWTKeyboardStrategy.java:13:import java.awt.AWTException; ./org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/keyboard/AWTKeyboardStrategy.java:14:import java.awt.Robot; ./org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/keyboard/AWTKeyboardStrategy.java:15:import java.awt.event.KeyEvent; ./org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/widgets/AbstractSWTBot.java:19:import java.awt.AWTException; ./org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/widgets/AbstractSWTBot.java:20:import java.awt.Robot; ./org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/widgets/AbstractSWTBot.java:21:import java.awt.event.InputEven So yeah, it's mostly drag and drop and input code. Since the attached test code doesn't use drag and drop or keyboard, I was able to quickly test by removing it all. Marc, this looks as a duplicate of bug 431330. AWT loads GTK2 only if Gnome L'n'F (verified with Oracle JDK on Ubuntu and with OpenJDK on RHEL/Fedora) so setting the L'n'F to something else would prevent the crash. For some reason OpenJDK on Ubuntu loads Gnome L'n'F always (haven't tested it myself, swt bug reports claim so) so I don't have a recommendation for this case. (In reply to Alexander Kurtakov from comment #6) > For some reason OpenJDK on Ubuntu loads Gnome L'n'F > always (haven't tested it myself, swt bug reports claim so) so I don't have > a recommendation for this case. A minor correction - OpenJDK (IcedTea) does not load Gnome L'n'F always, instead it loads GTK+ 2 regardless of the L'n'F mode used (which is probably what was meant above too but just to clarify it better). (In reply to Alexander Kurtakov from comment #6) > Marc, this looks as a duplicate of bug 431330. Yes, sorry I should have marked it as such to me more clear. *** This bug has been marked as a duplicate of bug 431330 *** |