java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData

For help and support with Linux-specific issues
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
excaliburr
Posts: 27
Joined: Thu Feb 11, 2016 10:03 am

java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData

Post by excaliburr » Sat Dec 31, 2016 10:45 am

I am on Debian 64 using the 64 bit version of Oracle Java

16:42:59 INFO Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData
16:42:59 INFO at sun.java2d.xr.XRPMBlitLoops.cacheToTmpSurface(XRPMBlitLoops.java:145)
16:42:59 INFO at sun.java2d.xr.XrSwToPMBlit.Blit(XRPMBlitLoops.java:353)
16:42:59 INFO at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:959)
16:42:59 INFO at sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:577)
16:42:59 INFO at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:86)
16:42:59 INFO at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:1030)
16:42:59 INFO at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:196)
16:42:59 INFO at sun.java2d.SunGraphics2D.copyImage(SunGraphics2D.java:3229)
16:42:59 INFO at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3270)
16:42:59 INFO at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3214)
16:42:59 INFO at sun.awt.X11.XTrayIconPeer$IconCanvas.paint(XTrayIconPeer.java:601)
16:42:59 INFO at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
16:42:59 INFO at sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:64)
16:42:59 INFO at sun.awt.RepaintArea.paint(RepaintArea.java:240)
16:42:59 INFO at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:584)
16:42:59 INFO at java.awt.Component.dispatchEventImpl(Component.java:4965)
16:42:59 INFO at java.awt.Component.dispatchEvent(Component.java:4711)
16:42:59 INFO at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
16:42:59 INFO at java.awt.EventQueue.access$500(EventQueue.java:97)
16:42:59 INFO at java.awt.EventQueue$3.run(EventQueue.java:709)
16:42:59 INFO at java.awt.EventQueue$3.run(EventQueue.java:703)
16:42:59 INFO at java.security.AccessController.doPrivileged(Native Method)
16:42:59 INFO at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
16:42:59 INFO at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
16:42:59 INFO at java.awt.EventQueue$4.run(EventQueue.java:731)
16:42:59 INFO at java.awt.EventQueue$4.run(EventQueue.java:729)
16:42:59 INFO at java.security.AccessController.doPrivileged(Native Method)
16:42:59 INFO at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
16:42:59 INFO at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
16:42:59 INFO at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
16:42:59 INFO at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
16:42:59 INFO at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
16:42:59 INFO at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
16:42:59 INFO at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
16:42:59 INFO at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
16:43:00 INFO Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData
16:43:00 INFO at sun.java2d.xr.XRPMBlitLoops.cacheToTmpSurface(XRPMBlitLoops.java:145)
16:43:00 INFO at sun.java2d.xr.XrSwToPMBlit.Blit(XRPMBlitLoops.java:353)
16:43:00 INFO at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:959)
16:43:00 INFO at sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:577)
16:43:00 INFO at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:86)
16:43:00 INFO at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:1030)
16:43:00 INFO at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:196)
16:43:00 INFO at sun.java2d.SunGraphics2D.copyImage(SunGraphics2D.java:3229)
16:43:00 INFO at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3270)
16:43:00 INFO at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3214)
16:43:00 INFO at sun.awt.X11.XTrayIconPeer$IconCanvas.paint(XTrayIconPeer.java:601)
16:43:00 INFO at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
16:43:00 INFO at sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:64)
16:43:00 INFO at sun.awt.RepaintArea.paint(RepaintArea.java:240)
16:43:00 INFO at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:584)
16:43:00 INFO at java.awt.Component.dispatchEventImpl(Component.java:4965)
16:43:00 INFO at java.awt.Component.dispatchEvent(Component.java:4711)
16:43:00 INFO at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
16:43:00 INFO at java.awt.EventQueue.access$500(EventQueue.java:97)
16:43:00 INFO at java.awt.EventQueue$3.run(EventQueue.java:709)
16:43:00 INFO at java.awt.EventQueue$3.run(EventQueue.java:703)
16:43:00 INFO at java.security.AccessController.doPrivileged(Native Method)
16:43:00 INFO at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
16:43:00 INFO at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
16:43:00 INFO at java.awt.EventQueue$4.run(EventQueue.java:731)
16:43:00 INFO at java.awt.EventQueue$4.run(EventQueue.java:729)
16:43:00 INFO at java.security.AccessController.doPrivileged(Native Method)
16:43:00 INFO at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
16:43:00 INFO at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
16:43:00 INFO at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
16:43:00 INFO at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
16:43:00 INFO at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
16:43:00 INFO at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
16:43:00 INFO at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
16:43:00 INFO at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

User avatar
Nadahar
Developer
Posts: 868
Joined: Tue Jun 09, 2015 5:57 pm

Re: java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData

Post by Nadahar » Sat Dec 31, 2016 8:34 pm

This is a JRE/JDK bug: https://bugs.openjdk.java.net/browse/JDK-7172749

Update to one of the "fixed" versions of Java, or (knowing how extremely slow Debian is with making updates available) downgrade to Java 7 which doesn't have this bug AFAICU.

EventHorizon
Posts: 2
Joined: Mon Feb 13, 2017 5:31 pm

Re: java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData

Post by EventHorizon » Wed May 10, 2017 4:34 pm

I get this now on UMS under Ubuntu 17.04, running latest Java 8 OpenJDK 8u121-b13-4.

Switched to Java7 as per this and it seems to work fine (for now).

Post Reply