<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 --- - segfault in sna_set_cursor_position with PRIME + opengl compositing"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=77053">77053</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>chris@chris-wilson.co.uk
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>segfault in sna_set_cursor_position with PRIME + opengl compositing
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>haagch.christoph@googlemail.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Driver/intel
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>xorg
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=96902" name="attach_96902" title="gdb with bt and bt full">attachment 96902</a> <a href="attachment.cgi?id=96902&action=edit" title="gdb with bt and bt full">[details]</a></span>
gdb with bt and bt full

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor
Graphics Controller (rev 09)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
Wimbledon XT [Radeon HD 7970M] (rev ff)

mesa, xf86-video-ati and xf86-video-intel from latest git, xorg 1.15 stable.

It only happens in relatively specific circumstances.

I have reproduced it with wine + space engine, wine + furmark (both times with
a virtual 1920x1080 wine desktop) and antichamber (native version from humble
bundle).

With xrender compositing everything is fine. With OpenGL compositing I get this
segfault.

With OpenGL compositing and PRIME there is sometimes this bug:
<a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED --- - prime: black window"
   href="show_bug.cgi?id=69101">https://bugs.freedesktop.org/show_bug.cgi?id=69101</a> (there are multiple issues
described, I am talking about the window content not being rendered initially,
but only after resizing the window/minimizing+restoring etc.). It might or
might not be related but I believe in every instance the crash happened the
initial rendering didn't work. Strangely the usual workaround of minimizing and
restoring a window doesn't seem to "fix" the rendering now.

For wine+space engine this happens every time: I start it with DRI_PRIME=1
GALLIUM_HUD=fps wine SpaceEngine.exe, wait a bit until the menu should be
loaded, but the screen is blank. I hit the shortcut for minimizing the window,
X crashes. This only happens since recently I believe, but I have not yet
investigated since when.

For antichamber it's kind of the opposite, as minimizing works and the crash
happened as soon as I managed to get it to render the contents.

Anyway, attached is "bt" and "bt full" from gdb.

The variable "cursor" is a null pointer.

>From how I see it the cursor variable gets initialized with NULL, but never
set.

It looks like f98b2e164637292c2425f6e6d2c22bd9a2800f8e broke it by removing    
    cursor = __sna_get_cursor(sna, crtc); among some other changes, so perhaps
this is just some leftover stuff that was forgotten to be changed.

<a href="http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=f98b2e164637292c2425f6e6d2c22bd9a2800f8e">http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=f98b2e164637292c2425f6e6d2c22bd9a2800f8e</a></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>