[Spice-devel] [PATCH v3 04/11] Rephrase assertion section

Christophe Fergeau cfergeau at redhat.com
Wed Feb 14 13:05:05 UTC 2018


On Tue, Feb 13, 2018 at 02:40:38PM +0100, Christophe de Dinechin wrote:
> 
> 
> > On 13 Feb 2018, at 14:39, Frediano Ziglio <fziglio at redhat.com> wrote:
> > 
> >>> 
> >>> On 12 Feb 2018, at 17:58, Frediano Ziglio <fziglio at redhat.com> wrote:
> >>> 
> >>> In SPICE, as in Glib, ERROR is more "strong" than CRITICAL
> >>> (I don't know where this came, even in Solaris CRITICAL is more
> >>> strong like Linux, maybe an initial mistake).
> >>> By default CRITICAL is fatal (it calls abort) so ERROR is too.
> >> 
> >> I’ve not tested with the agent, but I know that for spicy, I regularly get
> >> “CRITICAL” about assertions without an abort:
> >> 
> >> (spicy:53020): GLib-GObject-CRITICAL **: g_object_get: assertion 'G_IS_OBJECT
> >> (object)' failed
> >> (spicy:53020): GLib-GObject-CRITICAL **: g_object_unref: assertion
> >> 'G_IS_OBJECT (object)' failed
> >> 
> >> If the desired behavior is an abort, we are not configuring it properly.
> >> 
> >> 
> >> Christophe
> >> 
> > 
> > But this is a CRITICAL in spicy, not a ERROR in the server.
> > By default g_critical is not fatal, spice_critical yes.
> > Both g_error and spice_error are fatal.
> 
> My point was that an assertion failure was not aborting.
> 
> Do you feel that it’s logical and consistent? For me, it’s remarkably confusing ;-)

g_assert() failures are aborting the program, g_{warn,return}_if_fail()
are triggering the kind of messages you quoted will not abort the
program unless you set G_DEBUG=fatal-criticals (there's also
fatal-warnings).

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180214/e1bdb1bd/attachment.sig>


More information about the Spice-devel mailing list