<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - "In pixman_region32_init_rect: Invalid rectangle passed" when viewing a certain PDF"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=71177">71177</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>poppler-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>"In pixman_region32_init_rect: Invalid rectangle passed" when viewing a certain PDF
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>gpoo@gnome.org
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>glib frontend
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>poppler
          </td>
        </tr></table>
      <p>
        <div>
        <pre>From Evince: <a href="https://bugzilla.gnome.org/show_bug.cgi?id=706567">https://bugzilla.gnome.org/show_bug.cgi?id=706567</a>

A summary of the comments:

----------------
When viewing the attached PDF and scrolling to the end, evince shows the
following warnings on the console (but continues to function properly without
apparent rendering issues):
{{{
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug
}}}

A PDF test case (8.8MB) is in
<a href="http://media.zweitausendeins.de/download/?pdf/merkheft/271%2FMH271_interaktiv.pdf">http://media.zweitausendeins.de/download/?pdf/merkheft/271%2FMH271_interaktiv.pdf</a>

-----------------
The ouput of gdb shows a corrupted rectangle:

$2 = {extents = {x1 = 501, y1 = 479, x2 = 483, y2 = 504}, data = 0x7bae00}
(gdb) print *region->data
$3 = {size = 8105376, numRects = 8106176}
(gdb) print region->data
$4 = (pixman_region32_data_t *) 0x7bae00
(gdb) print *(region->data)
$5 = {size = 8105376, numRects = 8106176}

-----------------
Finally Carlos said:

It's a poppler bug actually that is giving us incorrect rectangles as selection
region. That document is a challenge for poppler, it contains vertical text and
even inclined text. Poppler doesn't support it, it assumes that all characters
in a line are at the same yMin - yMax range. So, there are several approaches
to solve/workaround the issue. We can check rectangles are valid in evince and
ignore the invalid ones, maybe showing a warning, but I think it would be
better to do it in poppler, either poppler glib or directly in TextOutputDev.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>