Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8147542

Linux: ClassCastException when repainting after display resolution change

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b131

      Backports

        Description

        OS: Ubuntu 14.04 Linux, Unity / GNOME + HiDPI display (but the issue is also reproducible on non-HiDPI display), JDK9 b101

        Please run test code from JDK-8147016
        1. 1x image is displayed. is it what expected (see JDK-8147557)?
        2. try to switch display resolution. No image is displayed after repaint, ClassCastException is reported:

        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:145)
        at sun.java2d.xr.XrSwToPMBlit.Blit(XRPMBlitLoops.java:354)
        at sun.java2d.SurfaceDataProxy.updateSurfaceData(SurfaceDataProxy.java:498)
        at sun.java2d.SurfaceDataProxy.replaceData(SurfaceDataProxy.java:455)
        at sun.java2d.SurfaceData.getSourceSurfaceData(SurfaceData.java:233)
        at sun.java2d.pipe.DrawImage.renderImageScale(DrawImage.java:629)
        at sun.java2d.pipe.DrawImage.scaleImage(DrawImage.java:724)
        at sun.java2d.pipe.DrawImage.scaleImage(DrawImage.java:1069)
        at sun.java2d.pipe.ValidatePipe.scaleImage(ValidatePipe.java:219)
        at sun.java2d.SunGraphics2D.scaleImage(SunGraphics2D.java:3180)
        at sun.java2d.SunGraphics2D.drawHiDPIImage(SunGraphics2D.java:3166)
        at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3399)
        at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3383)
        at MultiRes.paint(MultiRes.java:50)
                ...

        (please find the logs attached)

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  avu Alexey Ushakov
                  Reporter:
                  avstepan Alexander Stepanov (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: