Bug 480150 - NPE in ClipboardProxy.getFunc or JVM Crash on JNI_ArgumentPusherVaArg when simulating copy/paste on Linux
Summary: NPE in ClipboardProxy.getFunc or JVM Crash on JNI_ArgumentPusherVaArg when si...
Status: CLOSED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2015-10-19 13:22 EDT by Leon Blakey CLA
Modified: 2018-08-16 11:19 EDT (History)
2 users (show)

See Also:


Attachments
BreakClipboard.java (1.38 KB, text/x-java)
2015-10-19 13:22 EDT, Leon Blakey CLA
no flags Details
JVM Crash (75.98 KB, text/x-log)
2015-10-19 13:23 EDT, Leon Blakey CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leon Blakey CLA 2015-10-19 13:22:29 EDT
Created attachment 257361 [details]
BreakClipboard.java

I'm experiencing either a JVM crash or a NPE inside Clipboard proxy when using SWTBot for copy and paste tests. The attached test will open a window, try to cut and paste text, close, then repeat. A copy and paste will be successful the first time but will fail the second time. Usually I will get a NPE, but if there is text on the clipboard from Netbeans I'll usually get a JVM crash. 

JVM Crash: See comment 2
or
Exception in thread "main" java.lang.NullPointerException
	at org.eclipse.swt.dnd.ClipboardProxy.getFunc(Unknown Source)
	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(Unknown Source)
	at org.eclipse.swt.widgets.Display.eventProc(Unknown Source)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(Unknown Source)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
	at org.aph.swtcrash.BreakClipboard.doPendingSWTWork(BreakSWT.java:55)
	at org.aph.swtcrash.BreakClipboard.runTest(BreakSWT.java:43)
	at org.aph.swtcrash.BreakClipboard.main(BreakSWT.java:19)

This is reproducible on 2 different machines. Nether has glippy or other clipboard managers running. I was not able to reproduce on Gnome nor Windows 7 or 10. 

Both Environments:
Java: Oracle JDK 1.8.0_60-b27
SWT: 4.5.1 (also happened on 4.5)
org.eclipse.swtbot.swt.finder: 2.3.0.201506081302-2-SNAPSHOT
org.eclipse.jface: 3.12.0.v20150914-1638-SNAPSHOT

Environment 1:
OS: Ubuntu 14.04
DE: Openbox 3.5.2-6

Environment 2:
OS: Debian Testing
DE: i3 4.11-1

To reproduce:
Run attached BreakClipboard class with SWT, SWTBot, JFace, and hamcrest

I can provide more information if needed
Comment 1 Leon Blakey CLA 2015-10-19 13:23:13 EDT
Created attachment 257362 [details]
JVM Crash
Comment 2 Alexander Kurtakov CLA 2017-12-15 15:36:58 EST
Is this still reproducible?
Comment 3 Eric Williams CLA 2018-08-16 11:19:17 EDT
(In reply to Alexander Kurtakov from comment #2)
> Is this still reproducible?

No comment in months, closing this ticket now. Please reopen it if the issue occurs again.