<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:jadahl@gmail.com" title="Jonas Ådahl <jadahl@gmail.com>"> <span class="fn">Jonas Ådahl</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - XWayland crashes during startup if output data is received"
href="https://bugs.freedesktop.org/show_bug.cgi?id=95337">bug 95337</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>jadahl@gmail.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - XWayland crashes during startup if output data is received"
href="https://bugs.freedesktop.org/show_bug.cgi?id=95337#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - XWayland crashes during startup if output data is received"
href="https://bugs.freedesktop.org/show_bug.cgi?id=95337">bug 95337</a>
from <span class="vcard"><a class="email" href="mailto:jadahl@gmail.com" title="Jonas Ådahl <jadahl@gmail.com>"> <span class="fn">Jonas Ådahl</span></a>
</span></b>
<pre>(In reply to Olivier Fourdan from <a href="show_bug.cgi?id=95337#c1">comment #1</a>)
<span class="quote">> Created <span class=""><a href="attachment.cgi?id=123617" name="attach_123617" title="Possible fix">attachment 123617</a> <a href="attachment.cgi?id=123617&action=edit" title="Possible fix">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=95337&attachment=123617'>[review]</a> [review]
> Possible fix
>
> (In reply to Mike Blumenkrantz from <a href="show_bug.cgi?id=95337#c0">comment #0</a>)
> > [...]
> > ConnectionInfo is NULL, as InitInput is called before the connection data is
> > initialized, meaning that anything trying to access it before this point
> > will trigger a crash.
>
> Huh...
>
> I am not sure, why we'd need to call the wl_display_roundtrip() in
> InitInput()?
>
> This and initializing xwl_screen->expecting_event to 0 will be done again
> later again in xwl_screen_init() where it seems more appropriate, and events
> can safely be queued up meanwhile.</span >
I think that if we don't roundtrip here, we might end up in a situation where
various places expects to be able to know things about wl_seat's etc, that'd
now start to crash if we loose the race against the wl_seat global being
discovered.
AFAICS InitInput() is done after InitOutput() which is where xwl_screen_init
and the first roundtrips are done.
<span class="quote">>
> Does this patch help? I haven't detected any ill effect in my light initial
> testing.</span >
I wonder if it'd be better to move the initialization roundtrip to after
CreateConnectionBlock(), while adapting everything that is in response to the
global object discovery to be able to wait until that stage. I don't know what
would break, but at least I think we need to either make sure Xwayland can deal
with working without any seat, or ensure we have discovered and created all the
seat objects before finishing initialization.</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>