Xpra: Ticket #8: Xpra sun.awt.X11.XlibWrapper.XGetAtomName issue

When trying to run http://www.mucommander.com/ on xpra i got an error about the atom name but on local X i don't have this.

I Try with the svn version of xpra.

Wed, 10 Aug 2011 14:32:57 GMT - nicolyon:

the application is mucommander and can be downloaded at http://www.mucommander.com/

Tue, 29 Nov 2011 17:04:45 GMT - Antoine Martin: owner, status changed

Apparently, this affects other applications like matlab...

Here is the error:

Atom was 0
Atom was 0
[2011-11-30 00:01:57.016] SEVERE Launcher#main,609 Startup failed
java.lang.NullPointerException: Failed to retrieve atom name.
	at sun.awt.X11.XlibWrapper.XGetAtomName(Native Method)
	at sun.awt.X11.XAtom.getName(XAtom.java:186)
	at sun.awt.X11.XDataTransferer.getTargetNameForAtom(XDataTransferer.java:141)
	at sun.awt.X11.XDataTransferer.getNativeForFormat(XDataTransferer.java:130)
	at sun.awt.datatransfer.DataTransferer.getFlavorsForFormatsAsSet(DataTransferer.java:861)
	at sun.awt.datatransfer.SunClipboard.formatArrayAsDataFlavorSet(SunClipboard.java:350)
	at sun.awt.datatransfer.SunClipboard.addFlavorListener(SunClipboard.java:378)
	at com.mucommander.ui.dnd.ClipboardNotifier.<init>(ClipboardNotifier.java:53)
	at com.mucommander.ui.action.impl.PasteClipboardFilesAction.<init>(PasteClipboardFilesAction.java:54)
	at com.mucommander.ui.action.impl.PasteClipboardFilesAction$Factory.createAction(PasteClipboardFilesAction.java:74)
	at com.mucommander.ui.action.ActionManager.getActionInstance(ActionManager.java:316)
	at com.mucommander.ui.action.ActionManager.getActionInstance(ActionManager.java:266)
	at com.mucommander.ui.main.menu.MainMenuBar.<init>(MainMenuBar.java:190)
	at com.mucommander.ui.main.MainFrame.init(MainFrame.java:188)
	at com.mucommander.ui.main.MainFrame.<init>(MainFrame.java:296)
	at com.mucommander.ui.main.WindowManager.createNewMainFrame(WindowManager.java:338)
	at com.mucommander.ui.main.WindowManager.createNewMainFrame(WindowManager.java:305)
	at com.mucommander.Launcher.main(Launcher.java:574)

The problem is somewhere within the clipboard code. Simply using the -no-clipboard allows the application to run. In winswitch there is a GUI option when starting a session called: "Clipboard Sharing"

Wed, 30 Nov 2011 19:14:39 GMT - Antoine Martin:

An almost identical stacktrace (from awt.X11 down) was submitted as #52

Fri, 03 Feb 2012 12:01:06 GMT - sergio:

Maybe it is something similar to this issue that was going on with synergy:


I think that in such case the issue was an atom with zero value getting added to a list of clipboard formats (targets). In that case the bug was there only on 64 bit systems. Can someone confirm if it is the case now? Even if the causes are different, I think that the above bug report incorporates a snappet of C code that helps verifying what is going on with the clipboard calls, so it may still be useful.

Tue, 07 Feb 2012 20:23:58 GMT - Antoine Martin:

More up-to-date link: http://synergy-foss.org/tracker/issues/27

Will take another look at the clipboard code, it is a bit obscure.. Relevant pygtk doc: Supplying The Selection

Wed, 08 Feb 2012 19:32:12 GMT - Antoine Martin: status changed; resolution set

Thanks for the pointers, proved very useful. I eventually found the (very old) bug with X11 atoms vs GdkAtoms, and also another one in bitness (64 vs 32 with struct) - both fixed in r490 You should now be able to use the clipboard with all Java apps.

Mon, 20 Feb 2012 19:18:16 GMT - Antoine Martin: version, component changed

Mon, 20 Feb 2012 19:37:23 GMT - Antoine Martin: milestone changed

Sat, 23 Jan 2021 04:43:04 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/8