Details

    • Branch Version/s:
      6.1.x
    • Backported to Branch:
      Committed
    • Epic/Theme:
    • Fix Priority:
      4
    • Similar Issues:
      Show 5 results 

      Description

      See LPS-37433 for details. The issue was fixed by replacing the problematic PNG. We should create final fix for the problem in the code level.

        Issue Links

          Activity

          Hide
          James Falkner added a comment -

          I think the problem is somewhere in the com.liferay.portal.image.SpriteProcessorImpl::convert() method - I believe the related JRE change made its libraries deal more strictly with PNGs, and our code is now failing because of it.

          By replacing a few "gray+alpha" color space PNGs with "RGBA" color space PNGs, the problem goes away, so I suspect some of the math shenanigans going on in convert() are incorrect for gray+alpha PNGs, and previously it didn't matter, but now it does.

          Show
          James Falkner added a comment - I think the problem is somewhere in the com.liferay.portal.image.SpriteProcessorImpl::convert() method - I believe the related JRE change made its libraries deal more strictly with PNGs, and our code is now failing because of it. By replacing a few "gray+alpha" color space PNGs with "RGBA" color space PNGs, the problem goes away, so I suspect some of the math shenanigans going on in convert() are incorrect for gray+alpha PNGs, and previously it didn't matter, but now it does.
          Hide
          Peter Borkuti added a comment -

          It could be reproduce on trunk easily:

          1. get the calendar_drop_shadow.png from LP ee-6.1.20 (webapps\ROOT\html\themes\control_panel\images\calendar)
          2. replace every file in the \trunk\tomcat-7.0.40\webapps\ROOT\html\themes\classic\images with this file
          3. start portal
          Show
          Peter Borkuti added a comment - It could be reproduce on trunk easily: get the calendar_drop_shadow.png from LP ee-6.1.20 (webapps\ROOT\html\themes\control_panel\images\calendar) replace every file in the \trunk\tomcat-7.0.40\webapps\ROOT\html\themes\classic\images with this file start portal
          Hide
          Peter Borkuti added a comment - - edited

          Test files for the issue. Every file is the same. I created it with Gimp. It is 2x1 pixel, grey+Transparency. The first pixel is black, the second pixel is transparent.

          Copy all the files into this directory:
          \webapps\ROOT\html\themes\control_panel\images\calendar

          Set up a conditional breakpoint into
          SpriteProcessorImpl, line 174, condition:

          "/html/themes/control_panel/images/calendar/_sprite.png".equals(spriteFileName)

          Show
          Peter Borkuti added a comment - - edited Test files for the issue. Every file is the same. I created it with Gimp. It is 2x1 pixel, grey+Transparency. The first pixel is black, the second pixel is transparent. Copy all the files into this directory: \webapps\ROOT\html\themes\control_panel\images\calendar Set up a conditional breakpoint into SpriteProcessorImpl, line 174, condition: "/html/themes/control_panel/images/calendar/_sprite.png".equals(spriteFileName)
          Hide
          Peter Borkuti added a comment - - edited

          What throws the exception:

          ImageToolImpl.java, method getBufferedImage, line 301:

          return adapter.getAsBufferedImage();

          Java API Documentation said, that ColorModel must be not null (it is OK) and appropriate for the image's SampleModel (could this be the problem?): I attached a screenshot about it (colormodel_samplemodel.jpg).

          Other thought:

          ByteComponentRaster changed :
          http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/diff/b79d56eee18e/src/share/classes/sun/awt/image/ByteComponentRaster.java

          with this:

          scanlineStride > data.length

          Show
          Peter Borkuti added a comment - - edited What throws the exception: ImageToolImpl.java, method getBufferedImage, line 301: return adapter.getAsBufferedImage(); Java API Documentation said, that ColorModel must be not null (it is OK) and appropriate for the image's SampleModel (could this be the problem?): I attached a screenshot about it (colormodel_samplemodel.jpg). Other thought: ByteComponentRaster changed : http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/diff/b79d56eee18e/src/share/classes/sun/awt/image/ByteComponentRaster.java with this: scanlineStride > data.length
          Hide
          Peter Borkuti added a comment - - edited

          We decided to create an "Hello World" example without Liferay to prove, that the root cause is not in Liferay code.

          Another idea was to convert all images to sRGB with imageMagic before putting them into _sprite.gif.

          Show
          Peter Borkuti added a comment - - edited We decided to create an "Hello World" example without Liferay to prove, that the root cause is not in Liferay code. Another idea was to convert all images to sRGB with imageMagic before putting them into _sprite.gif.
          Hide
          Levente Hudak added a comment -

          Hey Shuyang,

          You can find all information regarding the issue in this ticket, but you can also contact me.

          Show
          Levente Hudak added a comment - Hey Shuyang, You can find all information regarding the issue in this ticket, but you can also contact me.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 29 weeks ago

                Development

                  Structure Helper Panel