ICEpdf
  1. ICEpdf
  2. PDF-966

Rendering PDF causes JRE crash

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.0.2
    • Fix Version/s: 6.1.1
    • Component/s: Core/Rendering
    • Labels:
      None
    • Environment:
      All

      Description

      When rendering the provided PDF file (a single page of a larger document) it causes ICEpdf/JRE to crash.

        Issue Links

          Activity

          Hide
          Patrick Corless added a comment -

          I've dug into this one a little further and it appears that there are 6 very small shapes that are being painted which is causing the JVM to crash, or at least on windows.

          I need to take a little more time to try and figure out what is so special about these shapes.

          Show
          Patrick Corless added a comment - I've dug into this one a little further and it appears that there are 6 very small shapes that are being painted which is causing the JVM to crash, or at least on windows. I need to take a little more time to try and figure out what is so special about these shapes.
          Hide
          Patrick Corless added a comment -

          We've had a very similar test case in the past but it was too complex to narrow down the exact cause. Adding it as a second test case.

          Show
          Patrick Corless added a comment - We've had a very similar test case in the past but it was too complex to narrow down the exact cause. Adding it as a second test case.
          Hide
          Patrick Corless added a comment -

          For the first example there shape counts to filter out the offending shapes are:

          count++;
          if (count == 562 || count == 602 || count == 606 || count == 656|| count == 750|| count == 796)

          Adding this to the ShapeDrawCmd can get the PDF to render. Further investigation is needed.

          Show
          Patrick Corless added a comment - For the first example there shape counts to filter out the offending shapes are: count++; if (count == 562 || count == 602 || count == 606 || count == 656|| count == 750|| count == 796) Adding this to the ShapeDrawCmd can get the PDF to render. Further investigation is needed.
          Hide
          Patrick Corless added a comment -

          Similar dashed line issue.

          Show
          Patrick Corless added a comment - Similar dashed line issue.
          Hide
          Patrick Corless added a comment -

          Similar dash issue.

          Show
          Patrick Corless added a comment - Similar dash issue.
          Hide
          Patrick Corless added a comment -

          Finally managed to isolate the draw operation that was causing the JVM to crash. The issue is related to a dash array values that are < 0.5 user unites. From what I can tell some encoders are using the wrong space when writing out the value or values. I've put in a little logic that converts a really small value back to users units. These avoids the dreaded jvm failure but also get the dash stroke to paint correctly.

          Show
          Patrick Corless added a comment - Finally managed to isolate the draw operation that was causing the JVM to crash. The issue is related to a dash array values that are < 0.5 user unites. From what I can tell some encoders are using the wrong space when writing out the value or values. I've put in a little logic that converts a really small value back to users units. These avoids the dreaded jvm failure but also get the dash stroke to paint correctly.

            People

            • Assignee:
              Patrick Corless
              Reporter:
              Arran Mccullough
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: