On Fri, 31 Mar 2023 19:00:32 GMT, Sergey Bylokhov <[email protected]> wrote:
>> src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java line 605:
>>
>>> 603: if (((Window)target).isVisible()) {
>>> 604: updateIconImages();
>>> 605: }
>>
>> Will we call "updateIconImages" when later we show the window or an update
>> of the icons will be missed if the notification come when the window is
>> invisible?
>>
>> Are you sure that it is not possible to trigger the next "trace" in the
>> application w/o using "updateIconImages"?
>>
>> at
>> sun.java2d.loops.GraphicsPrimitiveMgr.initIDs(java.desktop@21-ea/Native
>> Method)
>> - waiting on the Class initialization monitor for sun.java2d.loops.Blit
>> at
>> sun.java2d.loops.GraphicsPrimitiveMgr.<clinit>(java.desktop@21-ea/GraphicsPrimitiveMgr.java:56)
>> at sun.java2d.loops.DrawLine.locate(java.desktop@21-ea/DrawLine.java:51)
>> at
>> sun.java2d.SurfaceData.makeRenderLoops(java.desktop@21-ea/SurfaceData.java:884)
>> at
>> sun.awt.image.BufImgSurfaceData.getSolidLoops(java.desktop@21-ea/BufImgSurfaceData.java:412)
>> - locked <0x00000000c3fdd920> (a java.lang.Class for
>> sun.awt.image.BufImgSurfaceData)
>> at
>> sun.awt.image.BufImgSurfaceData.initSolidLoops(java.desktop@21-ea/BufImgSurfaceData.java:397)
>> at
>> sun.awt.image.BufImgSurfaceData.createData(java.desktop@21-ea/BufImgSurfaceData.java:256)
>> at
>> sun.awt.image.BufImgSurfaceData.createData(java.desktop@21-ea/BufImgSurfaceData.java:74)
>> at
>> sun.awt.image.BufImgSurfaceManager.<init>(java.desktop@21-ea/BufImgSurfaceManager.java:55)
>> at
>> sun.awt.image.SurfaceManager.getManager(java.desktop@21-ea/SurfaceManager.java:79)
>> at
>> sun.java2d.SurfaceData.getPrimarySurfaceData(java.desktop@21-ea/SurfaceData.java:275)
>> at
>> sun.java2d.SunGraphicsEnvironment.createGraphics(java.desktop@21-ea/SunGraphicsEnvironment.java:132)
>> at
>> java.awt.image.BufferedImage.createGraphics(java.desktop@21-ea/BufferedImage.java:1183)
>> at
>> sun.awt.SunToolkit.getScaledIconImage(java.desktop@21-ea/SunToolkit.java:1032)
>> at
>> sun.awt.SunToolkit.getScaledIconData(java.desktop@21-ea/SunToolkit.java:1046)
>> at
>> sun.awt.windows.WWindowPeer.updateIconImages(java.desktop@21-ea/WWindowPeer.java:468)
>> at
>> sun.awt.windows.WWindowPeer.updateGC(java.desktop@21-ea/WWindowPeer.java:603)
>
> It seems that the root cause is a cyclic dependency between
> GraphicsPrimitiveMgr and Blit during static initialization
> Will we call "updateIconImages" when later we show the window or an update of
> the icons will be missed if the notification come when the window is
> invisible?
updateIconImages() will still be called from WWindowPeer.initialize() when we
show a new window
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13263#discussion_r1155745077