Bug 94776 - Unresponsiveness and cursor not being shown in GDM
Summary: Unresponsiveness and cursor not being shown in GDM
Status: RESOLVED MOVED
Alias: None
Product: Spice
Classification: Unclassified
Component: html5-client (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Spice Bug List
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-01 11:46 UTC by Fabiano Fidêncio
Modified: 2018-06-03 10:18 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
0001-Check-if-streams-array-exists-in-handle_draw_jpeg_on.patch (1.50 KB, patch)
2018-03-29 18:40 UTC, Joel Purra
Details | Splinter Review

Description Fabiano Fidêncio 2016-04-01 11:46:40 UTC
From fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=1323144

Description of problem:
When connecting with spice-html5 to Fedora 23 Workstation VM and GDM is shown, the client becomes very unresponsive and the 

Version-Release number of selected component (if applicable):
Master branch from github


How reproducible:
Open the example client and connect to a fedora 23 virtual machine.


Steps to Reproduce:
1. Created a boxes machine in Fedora 23
2. Installed Fedora 23 workstation from official ISO
3. Updated packages
4. Opened spice-html5 example client webpage
5. Connected to localhost:5900
6. Wait for machine to boot to GDM

Actual results:
Very slow response and cursor not being shown

Expected results:
Acceptable responsiveness and cursor beign shown to know where we are clicking

Additional info:
The package Fleet Commander at https://github.com/fleet-commander/fc-admin uses an implementation of spice-html5 for connecting to virtual machines using libvirt/spice and we are having this problem too.
Comment 1 Pavel Grunt 2016-08-17 14:00:10 UTC
Hey, I believe it is QXL driver issue, try changing vga to virtio
Comment 2 Joel Purra 2018-03-29 18:40:11 UTC
Created attachment 138433 [details] [review]
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 <mig@joelpurra.se>
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:

- - https://bugs.freedesktop.org/show_bug.cgi?id=94776
- - https://bugzilla.redhat.com/show_bug.cgi?id=1323144

Signed-off-by: Joel Purra <mig@joelpurra.se>
- ---
 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-----
Comment 3 Joel Purra 2018-03-29 18:41:36 UTC
Experienced the same symptoms.

- Using spice-html5 from macOS to connect to a Debian machine.
- Can connect without a problem, and can see the Debian machine console login prompt.
- Can not enter the username nor interact in any other way.

Using the browser's developer console, I found an array reference error triggered again and again; luckily it was easy to fix.

See patch (which I accidentally added as a comment with my pgp signature) before this comment.
Comment 4 GitLab Migration User 2018-06-03 10:18:59 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/spice/spice-html5/issues/1.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.