<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:code+freedesktop@joelpurra.com" title="Joel Purra <code+freedesktop@joelpurra.com>"> <span class="fn">Joel Purra</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Unresponsiveness and cursor not being shown in GDM"
href="https://bugs.freedesktop.org/show_bug.cgi?id=94776">bug 94776</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>code+freedesktop@joelpurra.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Unresponsiveness and cursor not being shown in GDM"
href="https://bugs.freedesktop.org/show_bug.cgi?id=94776#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Unresponsiveness and cursor not being shown in GDM"
href="https://bugs.freedesktop.org/show_bug.cgi?id=94776">bug 94776</a>
from <span class="vcard"><a class="email" href="mailto:code+freedesktop@joelpurra.com" title="Joel Purra <code+freedesktop@joelpurra.com>"> <span class="fn">Joel Purra</span></a>
</span></b>
<pre>Created <span class=""><a href="attachment.cgi?id=138433" name="attach_138433" title="0001-Check-if-streams-array-exists-in-handle_draw_jpeg_on.patch">attachment 138433</a> <a href="attachment.cgi?id=138433&action=edit" title="0001-Check-if-streams-array-exists-in-handle_draw_jpeg_on.patch">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=94776&attachment=138433'>[review]</a>
0001-Check-if-streams-array-exists-in-handle_draw_jpeg_on.patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
- From b3dd9879786bfd9990d83b1d58581b94944cba14 Mon Sep 17 00:00:00 2001
From: Joel Purra <<a href="mailto:mig@joelpurra.se">mig@joelpurra.se</a>>
Date: Thu, 29 Mar 2018 20:00:51 +0200
Subject: [PATCH 1/1] Check if streams array exists in handle_draw_jpeg_onload
- - It seems `SpiceDisplayConn` does not always have the array
`this.o.sc.streams` set.
- - It also seems (stream?) images can be loaded before `streams` is set.
- - Without `streams`, or the specific stream matching `this.o.id`,
`this.o.sc.streams[this.o.id].frames_loading` cannot be accessed.
- - The check for the specific stream woth `this.o.id` is already in place,
this patch adds a check for `this.o.sc.streams` in `handle_draw_jpeg_onload`.
- - There might be a better place to ensure that `this.o.sc.streams` is
initialized; this quick fix saved my bacon today though.
Might be related to, and perhaps fix:
- - <a class="bz_bug_link
bz_status_NEW "
title="NEW - Unresponsiveness and cursor not being shown in GDM"
href="show_bug.cgi?id=94776">https://bugs.freedesktop.org/show_bug.cgi?id=94776</a>
- - <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1323144">https://bugzilla.redhat.com/show_bug.cgi?id=1323144</a>
Signed-off-by: Joel Purra <<a href="mailto:mig@joelpurra.se">mig@joelpurra.se</a>>
- ---
display.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/display.js b/display.js
index 7719b23..dbeffea 100644
- --- a/display.js
+++ b/display.js
@@ -883,7 +883,7 @@ function handle_draw_jpeg_onload()
var temp_canvas = null;
var context;
- - if (this.o.sc.streams[this.o.id])
+ if ("streams" in this.o.sc && this.o.sc.streams[this.o.id])
this.o.sc.streams[this.o.id].frames_loading--;
/*------------------------------------------------------------
- --
2.16.2
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEE8RgKxBDfUGwbqSwEHZ+L2wzvqUAFAlq9MtkACgkQHZ+L2wzv
qUAjaA//fscPpzFbi3B+XMjl54n7iRoHgVofrV4jC3TE2ff7FsKvLMYOonKBF/fh
k1ZH+bffHTZ1lWAjZX7J4e31wmxa/u8nsJejVDZcD5eQzL7OKgkFO4ZZdmY2ljNF
qYZAKjEw17mC4XuHdHT6pF2vnvIR/rIBH/vhIs1KJRie8RHTT6K91m8GaBwS5QKG
ejzPhS1TyBXlw/dl3AnA2aA2tRs39oDn/pnmsFSG74JpsMQDxi/QD6rh+bJ8NJJD
7qviZ7mOtE2dyauJMFedNkKHJWrONlrybdSbtFK/EZLODqrYVIe+EewOy7Aa6Sqx
Ky2zdtavPWAt2G6PHH4VjTHDsEsdNEC6UsYucBxSMGQ8CKazZH1EqhKHoIDc7k/j
meOvJZGb0kyPRN9zUe42sn4YOb0XwgmdzRlFHuIMg0hUYDQxjDkH1WNoDGSM1YMl
Nc8kbDgSpssn0oij2Oi8p8M5/HPTG1Ck26gH0wmrMqsNuzvTCGFE52ikfdYP/5Og
Am3iGV+ImZ8Lo6/vvMv6aihA/kKUC42NE+MrLHPMc5x+/q/f+pkRMS48Pxb1dWpO
T7dY9l83+N5cbPoeQGQrtKmV1HpI4+JGWJzwSnq/9nAm8/XmpUFRY8Gtj2FHI9zP
ZTM9mf9VqUJyDte/uKxgd/J4cWEFDs37GCxqKUr8JaFKZTzwRC4=
=mGUG
-----END PGP SIGNATURE-----</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>