Re: [spice-gtk] Fix using NULL main channel reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi again

El lun, 24-09-2018 a las 08:25 +0200, Javier Celaya escribió:
Hi

El mié, 19-09-2018 a las 15:30 +0200, Victor Toso escribió:
Hi,

On Mon, Aug 13, 2018 at 01:44:37PM +0200, Javier Celaya wrote:
Hi, sorry for the late response, I was on holidays
El mar, 24-07-2018 a las 17:58 +0200, Marc-André Lureau escribió:
On Mon, Jul 16, 2018 at 6:45 PM, Javier Celaya<javier.celaya@flexvdi.
com> wrote:The main channel reference d->main of SpiceWidget is
initialized onconstruction. However, it is used a couple of times
before that momentwhile setting the default values of some
properties, like resize-guest.This results in some annoying critical
log messages. This commit makessure that d->main is not used in such
situations if it is NULL.
Could you provide a reproducer of such warnings? I don't remember
seeing one.

I see them each time I connect to a Spice session with spicy. Follow
me:
- These warnings appear because d->main is NULL.
- d->main is set in spice-widget.c:channel_new function, when
the new channel is the main channel.
- channel_new is called from spice_display_constructed with the
list of channels that already exist; obviously, the main
channel is one of them.
- There are SpiceDisplay properties that are set during
construction, before spice_display_constructed is called, that
trigger the code I am fixing with this patch.

Makes sense.

For instance, after setting "resize-guest" to its default value
TRUE, update_ready is called.So I do not see how you are not
seeing these warnings. It does not seem to be a race condition,
it happens always.

resize-guest-enable's default is FALSE so
spice_main_channel_update_display_enabled() would not be called
and not sure how you are manage to trigger it?

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.

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.
IMHO is better to keep it internal if it doesn't fix any issue upstream.

Frediano

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]