<html><head></head><body><div>Hi again</div><div><br></div><div>El lun, 24-09-2018 a las 08:25 +0200, Javier Celaya escribió:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>Hi</div><div><br></div><div>El mié, 19-09-2018 a las 15:30 +0200, Victor Toso escribió:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><pre>Hi,</pre><pre><br></pre><pre>On Mon, Aug 13, 2018 at 01:44:37PM +0200, Javier Celaya wrote:</pre><pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote></pre><pre>Hi, sorry for the late response, I was on holidays</pre><pre>El mar, 24-07-2018 a las 17:58 +0200, Marc-André Lureau escribió:</pre><pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote></pre><pre>On Mon, Jul 16, 2018 at 6:45 PM, Javier Celaya<javier.celaya@flexvdi.</pre><pre>com> wrote:The main channel reference d->main of SpiceWidget is</pre><pre>initialized onconstruction. However, it is used a couple of times</pre><pre>before that momentwhile setting the default values of some</pre><pre>properties, like resize-guest.This results in some annoying critical</pre><pre>log messages. This commit makessure that d->main is not used in such</pre><pre>situations if it is NULL.</pre><pre>Could you provide a reproducer of such warnings? I don't remember</pre><pre>seeing one.</pre><pre></pre><pre><br></pre><pre>I see them each time I connect to a Spice session with spicy. Follow</pre><pre>me:</pre><pre>- These warnings appear because d->main is NULL.</pre><pre>- d->main is set in spice-widget.c:channel_new function, when</pre><pre>the new channel is the main channel.</pre><pre>- channel_new is called from spice_display_constructed with the</pre><pre>list of channels that already exist; obviously, the main</pre><pre>channel is one of them.</pre><pre>- There are SpiceDisplay properties that are set during</pre><pre>construction, before spice_display_constructed is called, that</pre><pre>trigger the code I am fixing with this patch.</pre><pre></pre><pre><br></pre><pre>Makes sense.</pre><pre><br></pre><pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote></pre><pre>For instance, after setting "resize-guest" to its default value</pre><pre>TRUE, update_ready is called.So I do not see how you are not</pre><pre>seeing these warnings. It does not seem to be a race condition,</pre><pre>it happens always.</pre><pre></pre><pre><br></pre><pre>resize-guest-enable's default is FALSE so</pre><pre>spice_main_channel_update_display_enabled() would not be called</pre><pre>and not sure how you are manage to trigger it?</pre></blockquote><div><br></div><div>My bad. We use a slightly modified version of spice-gtk for the flexVDI clients, and I did not remember that one of the changes is that resize-guest is set to TRUE by default. Maybe that's the reason we see the warning and you don't.</div></blockquote><div><br></div><div>I was thinking, maybe this patch is not needed anymore since the warning only shows in our modified version. Do you still want me to submit it? We can just keep it internally.</div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><pre><br></pre><pre>I've added a g_warn_if_fail(d->main != NULL); and indeed the</pre><pre>d->main can be null at that point, so I'm keen to take the patch</pre><pre>although a different solution might be better...</pre><pre><br></pre><pre>Could you send a v2 with d->main check against NULL as Frediano</pre><pre>mentioned and add the critical you see on commit log for</pre><pre>completeness ?</pre><pre><br></pre><pre>Sorry for delay, so many patches!</pre><pre>Victor</pre></blockquote><div><br></div><div>Never mind! Patch is on its way</div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><pre><br></pre><pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote></pre><pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote></pre><pre>--- src/spice-widget.c | 4 ++-- 1 file changed, 2 insertions(+), 2</pre><pre>deletions(-)</pre><pre>diff --git a/src/spice-widget.c b/src/spice-widget.cindex</pre><pre>72f5334..5187b0c 100644--- a/src/spice-widget.c+++ b/src/spice-</pre><pre>widget.c@@ -255,7 +255,7 @@ static void update_ready(SpiceDisplay</pre><pre>*display)      * state here. If 'resize-guest' is false, we can</pre><pre>assume that the      * application will manage the state of the</pre><pre>displays.      */-    if (d->resize_guest_enable) {+    if (d-</pre><pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote></pre><pre>resize_guest_enable && d->main)</pre><pre></pre><pre>{         spice_main_channel_update_display_enabled(d->main,</pre><pre>get_display_id(display), ready, TRUE);     }</pre><pre>@@ -1247,7 +1247,7 @@ static void recalc_geometry(GtkWidget</pre><pre>*widget)                   d->area.width, d-</pre><pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote></pre><pre>area.height,                   d->ww, d->wh, zoom);</pre><pre></pre><pre>-    if (d->resize_guest_enable)+    if (d->resize_guest_enable && d-</pre><pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote></pre><pre>main)         spice_main_channel_update_display(d->main,</pre><pre></pre><pre>get_display_id(display),                                           d-</pre><pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote></pre><pre>area.x, d->area.y, d->ww / zoom, d->wh / zoom, TRUE);</pre><pre></pre><pre>It looks like this may not give you the desired display size.</pre><pre></pre><pre><br></pre><pre>Again, the warning happens when the property "scaling" is set during</pre><pre>SpiceDisplay construction, which calls scaling_update. You cannot call</pre><pre>spice_main_channel_update_display with d->main == NULL, so this check</pre><pre>is harmless.</pre><pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote></pre><pre> }--2.17.0</pre><pre>_______________________________________________Spice-devel mailing</pre><pre><a href="mailto:listSpice-devel@lists.freedesktop.orghttps">listSpice-devel@lists.freedesktop.orghttps</a>://lists.freedesktop.org/ma</pre><pre>ilman/listinfo/spice-devel</pre><pre><br></pre><pre><br></pre><pre><br></pre><pre></pre><pre>-- </pre><pre><br></pre><pre><br></pre><pre><br></pre><pre><br></pre><pre> </pre><pre><br></pre><pre><br></pre><pre><br></pre><pre><br></pre><pre><br></pre><pre>              </pre><pre>              </pre><pre>          </pre><pre>          </pre><pre>            Javier Celaya Alastrué</pre><pre>          </pre><pre>           Chief Technology Officer</pre><pre>      </pre><pre>      </pre><pre>        </pre><pre>           </pre><pre>        <a href="mailto:javier.celaya@flexvdi.com">javier.celaya@flexvdi.com</a></pre><pre>        </pre><pre>        </pre><pre>          </pre><pre>        +34696969959 </pre><pre>      </pre><pre>          </pre><pre>        j_celaya</pre><pre>        </pre><pre>        </pre><pre>          </pre><pre>        Legal Information and Privacy Policy</pre><pre>          </pre><pre>      </pre><pre>    </pre><pre>    </pre><pre>        </pre><pre>            Política de confidencialidad</pre><pre>            Este mensaje y los ficheros anexos son confidenciales dirigiéndose exclusivamente al destinatario mencionado en el encabezamiento. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y no divulgar el contenido a terceros. Los datos personales facilitados por usted o por terceros serán tratados por FLEXIBLE SOFTWARE SOLUTIONS S.L.U. con la finalidad de gestionar y mantener los contactos y relaciones que se produzcan como consecuencia de la relación que mantiene con FLEXIBLE SOFTWARE SOLUTIONS S.L.U. Normalmente, la base jurídica que legitima este tratamiento, será su consentimiento, el interés legítimo o la necesidad para gestionar una relación contractual o similar. El plazo de conservación de sus datos vendrá determinado por la relación que mantiene con nosotros. Para más información al respecto, o para ejercer sus derechos de acceso, rectificación, supresión, oposición, limitación o portabilidad, dirija una comunicación por escrito a FLEXIBLE SOFTWARE SOLUTIONS S.L.U: Avenida de Ranillas 1D, Planta 3, Oficina 3G, Zaragoza o al correo electrónico <a href="mailto:pdo@flexvdi.com">pdo@flexvdi.com</a>. En caso de considerar vulnerado su derecho a la protección de datos personales, podrá interponer una reclamación ante la Agencia Española de Protección de Datos (<a href="http://www.agpd.es">www.agpd.es</a>). </pre><pre>        </pre><pre>    </pre><pre></pre><pre><br></pre><pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote></pre><pre>_______________________________________________</pre><pre>Spice-devel mailing list</pre><pre><a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a></pre><pre><a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel">https://lists.freedesktop.org/mailman/listinfo/spice-devel</a></pre><pre></pre><pre><br></pre><pre><br></pre></blockquote><div><span><pre>-- <br></pre>


<br> 
<br>

<table id="sig" width="480" cellspacing="0" cellpadding="0" border-spacing="0" style="width:480px;margin:0;padding:0;"><tbody><tr><td text-align="right" style="border-right:2px solid #4a4b4a;padding-right:10px;" valign="top">
<p style="padding: 0px; text-align: right;">
              <a href="http://www.flexvdi.com" title="flexVDI"><img src="https://www.flexvdi.com/signature/logo.flexvdi.png" moz-do-not-send="true" alt="flexVDI" border="0" height="45" width="151">
              </a>
          </p>
          <p style="padding: 5px 10px 0px 0px; font-size: 15px; font-weight: bold; color: rgb(62, 93, 107); line-height: 17px; height: 17px; text-align: right;">
            <span style="float:right">Javier Celaya Alastrué</span>
          </p>
           <p style="padding: 0px 10px 0px 0px; font-size: 13px; font-style: italic; color: rgb(0, 161, 193); line-height: 17px; height: 17px; text-align: right;">Chief Technology Officer</p>
      </td>
      <td style="padding-left:18px;display:block;">
        <p style="padding: 5px 0px 0px;">
           <img src="https://flexvdi.com/signature/mail.png" moz-do-not-send="true" style="margin:1px 7px 0 0;" alt="email" align="left" height="17" width="17">
        <a href="mailto:javier.celaya@flexvdi.com" style="font-size:14px;color:#727272;line-height:17px;height:17px;">javier.celaya@flexvdi.com</a>
        </p>
        <p style="padding: 5px 0px 0px;">
          <img src="https://flexvdi.com/signature/phone.png" moz-do-not-send="true" style="margin:0 7px 0 0;" alt="Phone" align="left" height="17" width="17">
        <span style="font-size:14px;color:#727272;line-height:17px;height:17px;">+34696969959</span> 
      </p>
        <p style="padding: 5px 0px 0px;"> <img src="https://flexvdi.com/signature/skype.png" moz-do-not-send="true" style="margin:0 7px 0 0;" alt="Skype" align="left" height="17" width="17"> 
        <span style="font-size:14px;color:#727272;line-height:17px;height:17px;">j_celaya</span>
        </p>
        <p style="padding: 5px 0px 0px;">
          <img src="https://flexvdi.com/signature/legal.png" moz-do-not-send="true" style="margin:0 7px 0 0;" alt="Legal" align="left" height="17" width="17">
        <a href="https://flexvdi.com/es/legal" style="font-size:14px;font-style:italic;color:#727272;line-height:17px;height:17px;">Legal Information and Privacy Policy</a>
          </p>
      </td>
    </tr>
    <tr>
        <td colspan="2" height="300">
            <p style="font-family:Helvetica,Arial;font-size:14px;font-style:italic;color:#313131;text-align: center; font-weight: bold">Política de confidencialidad</p>
            <p style="font-family:Helvetica,Arial;font-size:10px;font-style:italic;color:#313131;text-align: justify">Este mensaje y los ficheros anexos son confidenciales dirigiéndose exclusivamente al destinatario mencionado en el encabezamiento. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y no divulgar el contenido a terceros. Los datos personales facilitados por usted o por terceros serán tratados por FLEXIBLE SOFTWARE SOLUTIONS S.L.U. con la finalidad de gestionar y mantener los contactos y relaciones que se produzcan como consecuencia de la relación que mantiene con FLEXIBLE SOFTWARE SOLUTIONS S.L.U. Normalmente, la base jurídica que legitima este tratamiento, será su consentimiento, el interés legítimo o la necesidad para gestionar una relación contractual o similar. El plazo de conservación de sus datos vendrá determinado por la relación que mantiene con nosotros. Para más información al respecto, o para ejercer sus derechos de acceso, rectificación, supresión, oposición, limitación o portabilidad, dirija una comunicación por escrito a FLEXIBLE SOFTWARE SOLUTIONS S.L.U: Avenida de Ranillas 1D, Planta 3, Oficina 3G, Zaragoza o al correo electrónico <a href="mailto:pdo@flexvdi.com" style="color:#313131">pdo@flexvdi.com</a>. En caso de considerar vulnerado su derecho a la protección de datos personales, podrá interponer una reclamación ante la Agencia Española de Protección de Datos (<a href="http://www.agpd.es" style="color:#313131">www.agpd.es</a>). </p>
        </td>
    </tr>
</tbody></table></span></div></blockquote><div><span><pre>-- <br></pre>


<br> 
<br>

<table id="sig" width="480" cellspacing="0" cellpadding="0" border-spacing="0" style="width:480px;margin:0;padding:0;"><tbody><tr><td text-align="right" style="border-right:2px solid #4a4b4a;padding-right:10px;" valign="top">
<p style="padding: 0px; text-align: right;">
              <a href="http://www.flexvdi.com" title="flexVDI"><img src="https://www.flexvdi.com/signature/logo.flexvdi.png" moz-do-not-send="true" alt="flexVDI" border="0" height="45" width="151">
              </a>
          </p>
          <p style="padding: 5px 10px 0px 0px; font-size: 15px; font-weight: bold; color: rgb(62, 93, 107); line-height: 17px; height: 17px; text-align: right;">
            <span style="float:right">Javier Celaya Alastrué</span>
          </p>
           <p style="padding: 0px 10px 0px 0px; font-size: 13px; font-style: italic; color: rgb(0, 161, 193); line-height: 17px; height: 17px; text-align: right;">Chief Technology Officer</p>
      </td>
      <td style="padding-left:18px;display:block;">
        <p style="padding: 5px 0px 0px;">
           <img src="https://flexvdi.com/signature/mail.png" moz-do-not-send="true" style="margin:1px 7px 0 0;" alt="email" align="left" height="17" width="17">
        <a href="mailto:javier.celaya@flexvdi.com" style="font-size:14px;color:#727272;line-height:17px;height:17px;">javier.celaya@flexvdi.com</a>
        </p>
        <p style="padding: 5px 0px 0px;">
          <img src="https://flexvdi.com/signature/phone.png" moz-do-not-send="true" style="margin:0 7px 0 0;" alt="Phone" align="left" height="17" width="17">
        <span style="font-size:14px;color:#727272;line-height:17px;height:17px;">+34696969959</span> 
      </p>
        <p style="padding: 5px 0px 0px;"> <img src="https://flexvdi.com/signature/skype.png" moz-do-not-send="true" style="margin:0 7px 0 0;" alt="Skype" align="left" height="17" width="17"> 
        <span style="font-size:14px;color:#727272;line-height:17px;height:17px;">j_celaya</span>
        </p>
        <p style="padding: 5px 0px 0px;">
          <img src="https://flexvdi.com/signature/legal.png" moz-do-not-send="true" style="margin:0 7px 0 0;" alt="Legal" align="left" height="17" width="17">
        <a href="https://flexvdi.com/es/legal" style="font-size:14px;font-style:italic;color:#727272;line-height:17px;height:17px;">Legal Information and Privacy Policy</a>
          </p>
      </td>
    </tr>
    <tr>
        <td colspan="2" height="300">
            <p style="font-family:Helvetica,Arial;font-size:14px;font-style:italic;color:#313131;text-align: center; font-weight: bold">Política de confidencialidad</p>
            <p style="font-family:Helvetica,Arial;font-size:10px;font-style:italic;color:#313131;text-align: justify">Este mensaje y los ficheros anexos son confidenciales dirigiéndose exclusivamente al destinatario mencionado en el encabezamiento. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y no divulgar el contenido a terceros. Los datos personales facilitados por usted o por terceros serán tratados por FLEXIBLE SOFTWARE SOLUTIONS S.L.U. con la finalidad de gestionar y mantener los contactos y relaciones que se produzcan como consecuencia de la relación que mantiene con FLEXIBLE SOFTWARE SOLUTIONS S.L.U. Normalmente, la base jurídica que legitima este tratamiento, será su consentimiento, el interés legítimo o la necesidad para gestionar una relación contractual o similar. El plazo de conservación de sus datos vendrá determinado por la relación que mantiene con nosotros. Para más información al respecto, o para ejercer sus derechos de acceso, rectificación, supresión, oposición, limitación o portabilidad, dirija una comunicación por escrito a FLEXIBLE SOFTWARE SOLUTIONS S.L.U: Avenida de Ranillas 1D, Planta 3, Oficina 3G, Zaragoza o al correo electrónico <a href="mailto:pdo@flexvdi.com" style="color:#313131">pdo@flexvdi.com</a>. En caso de considerar vulnerado su derecho a la protección de datos personales, podrá interponer una reclamación ante la Agencia Española de Protección de Datos (<a href="http://www.agpd.es" style="color:#313131">www.agpd.es</a>). </p>
        </td>
    </tr>
</tbody></table></span></div></body></html>