[X2Go-User] Matlab in X2go

Thackeray, Neil L neilt at illinois.edu
Wed Oct 24 16:52:00 CEST 2018


Disabling xrender would be difficult to do since I think it would mean modifying the script that launches Matlab.

Just out of curiosity, what is the difference between launching Matlab directly through X2go, and launching it on a linux desktop in X2go? It works fine launching it directly.

-----Original Message-----
From: Ulrich Sibiller <uli42 at gmx.de> 
Sent: Tuesday, October 23, 2018 5:46 AM
To: Thackeray, Neil L <neilt at illinois.edu>
Cc: x2go users <x2go-user at lists.x2go.org>
Subject: Re: [X2Go-User] Matlab in X2go

https://stackoverflow.com/questions/34188495/how-can-i-work-around-the-classcastexception-in-java2d-bug-id-7172749
describes that problem and offers a workaround (JVM option
-Dsun.java2d.xrender=false)
Unfortunately that workaround is bad for the x2go environment and will probably slow down your desktop. Normally we recommend to do the opposite and ENABLE xrender rendering because then the functions that NX can accellerate are used.

Uli
On Tue, Oct 23, 2018 at 12:57 AM Thackeray, Neil L <neilt at illinois.edu> wrote:
>
> I’m having some issues using Matlab2018a in X2go. When using xfce4 (and KDE) desktop it causes some exception when the X2go window is hidden or resized. It also will hide all of the button widgets in Matlab until I mouse over them.
>
>
>
> When I change the session type to ‘Single Application: Terminal’, and then typing ‘matlab &’ in the terminal it works perfectly fine.
>
>
>
> This is the exception that Matlab throws, usually many times:
>
>
>
> Exception in thread "AWT-EventQueue-0": java.lang.ClassCastException: 
> sun.awt.image.BufImgSurfaceData cannot be cast to 
> sun.java2d.xr.XRSurfaceData
>
>                 at 
> sun.java2d.xr.XRPMBlitLoops.cacheToTmpSurface(XRPMBlitLoops.java:148)
>
>                 at 
> sun.java2d.xr.XrSwToPMBlit.Blit(XRPMBlitLoops.java:356)
>
>                 at 
> sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:959)
>
>                 at 
> sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:577)
>
>                 at 
> sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:67)
>
>                 at 
> sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:1014)
>
>                 at 
> sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:186)
>
>                 at 
> sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3318)
>
>                 at 
> sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3296)
>
>                 at javax.swing.ImageIcon.paintIcon(ImageIcon.java:425)
>
>                 at 
> com.mathworks.toolstrip.plaf.GalleryButtonUI.paintContent(GalleryButto
> nUI.java:115)
>
>                 at 
> com.mathworks.toolstrip.plaf.RegularButtonUI.paintContent(RegularButto
> nUI.java:65)
>
>                 at 
> com.mathworks.toolstrip.plaf.ToolstripButtonUI.paint(ToolstripButtonUI
> .java:198)
>
>                 at 
> javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
>
>                 at 
> javax.swing.JComponent.paintComponent(JComponent.java:780)
>
>                 at 
> com.mathworks.mwswing.MJButton.paintComponent(MJButton.java:432)
>
>                 at javax.swing.JComponent.paint(JComponent.java:1056)
>
>                 at 
> com.mathworks.mwswing.MJButton.paint(MJButton.java:410)
>
>                 at 
> javax.swing.JComponent.paintChildren(JComponent.java:889)
>
>                 at javax.swing.JComponent.paint(JComponent.java:1065)
>
>                 at 
> javax.swing.JComponent.paintChildren(JComponent.java:889)
>
>                 at javax.swing.JComponent.paint(JComponent.java:1065)
>
>                 at 
> javax.swing.JComponent.paintChildren(JComponent.java:889)
>
>                 at javax.swing.JComponent.paint(JComponent.java:1065)
>
>                 at 
> javax.swing.JComponent.paintChildren(JComponent.java:889)
>
>                 at javax.swing.JComponent.paint(JComponent.java:1065)
>
>                 at 
> javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
>
>                 at 
> javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintMan
> ager.java:1579)
>
>                 at 
> javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502
> )
>
>                 at 
> javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManage
> r.java:306)
>
>                 at 
> javax.swing.RepaintManager.paint(RepaintManager.java:1272)
>
>                 at 
> javax.swing.JComponent._paintImmediately(JComponent.java:5158)
>
>                 at 
> javax.swing.JComponent.paintImmediately(JComponent.java:4969)
>
>                 at 
> javax.swing.RepaintManager$4.run(RepaintManager.java:831)
>
>                 at 
> javax.swing.RepaintManager$4.run(RepaintManager.java:814)
>
>                 at java.security.AccessController.doPrivileged(Native 
> Method)
>
>                 at 
> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPr
> ivilege(ProtectionDomain.java:80)
>
>                 at 
> javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
>
>                 at 
> javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
>
>                 at 
> javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:73
> 8)
>
>                 at 
> javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
>
>                 at 
> javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:
> 1732)
>
>                 at 
> java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
>
>                 at 
> java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
>
>                 at java.awt.EventQueue.access$500(EventQueue.java:97)
>
>                 at java.awt.EventQueue$3.run(EventQueue.java:709)
>
>                 at java.awt.EventQueue$3.run(EventQueue.java:703)
>
>                 at java.security.AccessController.doPrivileged(Native 
> Method)
>
>                 at 
> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPr
> ivilege(ProtectionDomain.java:80)
>
>                 at 
> java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
>
>                 at 
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThrea
> d.java:201)
>
>                 at 
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.j
> ava:116)
>
>                 at 
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThrea
> d.java:105)
>
>                 at 
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
>
>                 at 
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
>
>                 at 
> java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
>
> _______________________________________________
> x2go-user mailing list
> x2go-user at lists.x2go.org
> https://lists.x2go.org/listinfo/x2go-user


More information about the x2go-user mailing list