41

Sublime & from Terminal, opens a Sublime Text window, but keep getting this message:

(sublime: 6476): GLib-CRITICAL **; Source ID 1982 was not found when attempting to remove it. 

The Source ID keeps changing. Using Ubuntu 14.04.

Any ideas what could be going on? Thanks!

1
  • 1
    My terminal is also throwing this error. Nothing is crashing or breaking (as far as I can tell), so it's more of a nuisance than anything. Please post here if you find a fix.
    – Jesse
    May 13, 2014 at 16:16

4 Answers 4

18

This page in Ubuntu's bug tracker describes this particular situation. Apparently this is a known bug with 14.04, possibly because of a regression with GLib, or a mismatch between GLib and GTK (so says one of the commenters).

Nothing is trying to remove Sublime, it's just an error in a programming library. If nothing is crashing on you, or becoming unusable, just ignore it...

EDIT This issue has been fixed in 14.10 and onwards. You can upgrade your distribution, or simply upgrade glib and the error should go away. Upgrading to Sublime Text 3 (which is highly recommended anyway) will also fix the problem.

3
  • 1
    Did search using the error code.. did not find the Ubuntu bug tracker page. Appreciate you taking the time. Thank you.
    – Janeway
    Apr 19, 2014 at 5:17
  • 1
    Sorry for the late reply to this comment, but do you know whether this is going to fill up any log files? I just want to make sure that ignoring it won't cause some log file to grow to some ridiculous size over time.
    – Mo2
    Sep 13, 2014 at 22:11
  • 1
    @Mo2 sorry, just saw your comment. This message is going to your standard error output, so unless your system is set up to log every single error message that any program puts out (and I don't believe a vanilla install of Ubuntu would do that), I wouldn't worry about anything. At any rate, most log files are compressed and rotated after a period of time, and depending on the setup the old files are likely to get deleted, so you should be OK. If you're like me, random downloads will fill up your disk faster than error messages :)
    – MattDMo
    Nov 16, 2014 at 3:14
11

This ended up being way too annoying to ignore so I have a pretty sloppy solution. Here is a function which runs sublime inside nohup. At first I tried just creating an alias for running sublime with nohup, but it would produce a log file .output and leave it in whatever directory I'm working in. To get around this the function sblmruns sublime in nohup which hides the errors from the terminal, and then it sends the output log to /dev/null

Now that I have a function sblm I simply use the alias sublime to override the normal sublime function.

Paste all of this into your .bash_aliases file.

#Function to deal with the annoying sublime errors
#Send annoying .output logs to /dev/null
function sblm
{
    nohup sublime $1 >/dev/null 2>&1 &
} 

#Call my sublime function
alias sublime="sblm"
2
  • 4
    You could also write alias sblm='sublime_text . &>/dev/null'. Oct 20, 2014 at 20:16
  • 1
    That was useful! :D But the problem now comes when you need to open multiple files using the command line. If you write sublime *.cpp& it just opens up the first .cpp file. How can you edit your function in order to accept arguments (file paths) afterwards? Oct 23, 2014 at 12:54
10

I upgraded to sublime 3 and I stopped receiving those messages. Hope it works for you too.

[EDIT] You can follow this quick tutorial to upgrade to sublime text 3: Tutorial from WebUpd8

3
  • Do you have any idea what it was that actually caused the error?
    – skrrgwasme
    Aug 4, 2014 at 20:28
  • Not sure but like Jander mentioned it's most likely the improper use of the g_source_remove() function.
    – Yeysides
    Aug 6, 2014 at 8:31
  • Did the same as Yeysides, solved the problem. I'm editing his answer to add a link to a tutorial on how to upgrade to Sublime 3.
    – Kulgar
    Aug 6, 2014 at 9:43
4

It looks like there is a double-free bug in ConsoleKit.

This has been showing up in a lot of Gnome programs lately, but ConsoleKit users are particularly affected since (in my experience) the warning happens on every keypress. The source of the message is Glib's g_source_remove(), but what it means is that the caller is trying to use g_source_remove() improperly. g_source_remove() is a resource-freeing function much like libc's free(), so the most likely cause is calling it twice on the same object.

From https://bugzilla.gnome.org/show_bug.cgi?id=721369#c7:

GLib recently started throwing a warning when g_source_remove() is passed garbage (as per warning). Your applications have probably been broken for a while, and there's no telling what could actually have happened in the past when g_source_remove() would happily close any random source because the programmer got the wrong argument to g_source_remove().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.