[Spice-devel] [PATCH] server/red_worker: death to spice_printerr, too verbose by far

Alon Levy alevy at redhat.com
Mon Jul 9 07:25:51 PDT 2012


On Sat, Jul 07, 2012 at 03:26:22PM -0500, Jeremy White wrote:
> On 07/06/2012 01:47 PM, Jeremy White wrote:
> > On 07/05/2012 04:38 AM, Alon Levy wrote:
> >> Replaced mostly with spice_debug, but spice_warning & spice_error as
> >> well where appropriate.
> > 
> > Boy, I do like this patch, but oddly, it generates a startup crash for me:
> > 
> > ((null):26170): SpiceWorker-ERROR **:
> > red_worker.c:10627:dev_destroy_primary_surface: double destroy of
> > primary surface
> 
> So this is just the fact that spice_error aborts; we always got a spice_printerr earlier.
> 
> That comes from this patch:
> commit 72a0def8114073c0051f3df880f731d3968cb344
> Author: Alon Levy <alevy at redhat.com>
> Date:   Wed May 30 13:44:40 2012 +0300
> 
>     qxl_switch_mode: don't evacuate, just recreate primary surface
>     
> Specifically, we unilaterally destroy the primary on a mode switch,
> and we always perform a mode switch at start.
> 
> Is this fix as simple as moving the qxl_io_destroy_primary(qxl) call
> up into the if (qxl->primary) block?  (That seems to work here, but I don't
> quite understand the code well enough to be sure).

This is what I had locally (new commit - was part of a larger one on the
xrandr branch), does it work for you?


commit de66207883efc1f32e96907c3e64f17b2bdf6c3e
Author: Alon Levy <alevy at redhat.com>
Date:   Sun Jul 8 14:05:08 2012 +0300

    qxl_driver/qxl_switch_mode: destroy is not idempotent

diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index a6d7636..e4c477a 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -701,10 +701,9 @@ qxl_switch_mode(SWITCH_MODE_ARGS_DECL)
     {
 	qxl_surface_kill (qxl->primary);
 	qxl_surface_cache_sanity_check (qxl->surface_cache);
+        qxl_io_destroy_primary(qxl);
     }
 
-    qxl_io_destroy_primary(qxl);
-
     qxl->primary = qxl_surface_cache_create_primary (qxl->surface_cache, m);
     qxl->current_mode = m;
     qxl->bytes_per_pixel = (qxl->pScrn->bitsPerPixel + 7) / 8;

> 
> Cheers,
> 
> Jeremy
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list