After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 694353 - gnome-shell log handler broken with NULL domains
gnome-shell log handler broken with NULL domains
Status: RESOLVED DUPLICATE of bug 663601
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-02-21 12:13 UTC by Allison Karlitskaya (desrt)
Modified: 2013-02-21 12:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Allison Karlitskaya (desrt) 2013-02-21 12:13:04 UTC
gnome-shell installs this log handler from main.c:

static void
default_log_handler (const char     *log_domain,
                     GLogLevelFlags  log_level,
                     const char     *message,
                     gpointer        data)
{
  TpDebugSender *sender = data;
  GTimeVal now;

  g_get_current_time (&now);

  tp_debug_sender_add_message (sender, &now, log_domain, log_level, message);

  /* Filter out telepathy-glib logs, we don't want to flood Shell's output
   * with those. */
  if (!g_str_has_prefix (log_domain, "tp-glib"))
    g_log_default_handler (log_domain, log_level, message, data);
}


The problem is that log_domain can be NULL and g_str_has_prefix() requires a non-NULL first argument.  This causes g_str_has_prefix() to throw a g_return_if_fail() message which causes re-entry into the logging code, leading to an abort.
Comment 1 Florian Müllner 2013-02-21 12:49:33 UTC
Oh, I actually had an older local patch for that ...

*** This bug has been marked as a duplicate of bug 663601 ***