GNOME Bugzilla – Bug 719666
crashing with --background option
Last modified: 2013-12-16 20:25:46 UTC
So, first I start Gnote in the background as follows: gnote --background A "WARNING" is output to the terminal, but this doesn't have any obvious consequence at this point. Next, I use a Custom Application Launcher from the MATE panel to open a specific note in Gnote as follows: gnote --open-note "name_of_note" The note opens instantaneously and without issue. I close the note without issue. I open it again without issue. When I close it the second time, some "GLib-GObject-CRITICAL" errors and "Segmentation fault" are output to the terminal, and the gnote background process crashes. Here is the terminal output ... [Geraldine@localhost ~]$ gnote --background ** (gnote:1554): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. (gnote:1554): GLib-GObject-CRITICAL **: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed (gnote:1554): GLib-GObject-CRITICAL **: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed Segmentation fault
> ** (gnote:1554): WARNING **: Couldn't register with accessibility bus: Did not > receive a reply. Possible causes include: the remote application did not send a > reply, the message bus security policy blocked the reply, the reply timeout > expired, or the network connection was broken. This seems to be the issue with accessibility. In GNOME 3 it's always on and available. Is it on in MATE. Honestly, I don't know if this is the cause, as Gnome doesn't do anything here, it's GTK+ working. > (gnote:1554): GLib-GObject-CRITICAL **: g_object_get_qdata: assertion > 'G_IS_OBJECT (object)' failed > > (gnote:1554): GLib-GObject-CRITICAL **: g_object_get_qdata: assertion > 'G_IS_OBJECT (object)' failed > Segmentation fault Stack trace would help here. Could you provide it?
How would I provide a stack trace? I don't know if accessibility is on. It doesn't look like there's anything related to that in the startup applications....
If I try the same thing using the Cinnamon desktop environment, I get the same result, except that there is no "WARNING" ... If I try to run gnote --background in Gnome, it seems to treat it the same as if I hadn't used the --background option at all....
Ok, so here are few things to check: - What distribution do you use - What is the version of GTK+ - Is Gnote running on start-up (is there gnote process when you execute the command) Finally, try get the stacktrace: gdb gnote --background run # wait for crash bt Thanks.
-- What distribution do you use -> Fedora 20 beta (I can try on Fedora 19 final, if that would be helpful) -- What is the version of GTK+ -> Not sure which of these you need: gtk+1:1.2.10-76 / gtk2-2.24.22-2 / gtk3-3.10.5-1 -- Is Gnote running on start-up (is there gnote process when you execute the command) -> Gnote is not running on startup for MATE or Cinnamon, but it is for Gnome (which I presume explains why the --background option seemed to be ignored in Gnome). (I don't know how Gnote is starting automatically in Gnome, since it's not in the "Startup Applications," nor is the option to remember running applications checked, but anyway....) Now that I know Gnote is running at startup in Gnome, I have tested gnote --open-note "name_of_note" with the same result reported in the report description (well, since I don't have the gnote --background process running from a terminal, I can't see exactly what the error is, but I can see the process crashes at the same point in System Monitor, and the Automatic Bug Reporting Tool notified me of the same). I will attach the backtrace momentarily ...
Created attachment 264148 [details] backtrace -- using MATE desktop environment
Created attachment 264224 [details] [review] Use hold() instead of background window Try to apply this patch, this should solve the issue.
> I don't know how Gnote is starting automatically in Gnome, since it's > not in the "Startup Applications," nor is the option to remember running > applications checked, but anyway... Gnote integrates with GNOME Shell search and is started by shell. Can you try the patch I've just attached, I think it will help.
I've openned Bug 720491 for --background openning new window.
Could you instruct me how to apply this patch automatically (or must it be done by manually editing the source files)? Also, the source tar for Gnote 3.11.0 has a README which says "See the INSTALL file" for compiling, but the INSTALL file seems to be absent. It's been a while since I've compiled anything; do I just?: ./configure make make install
(In reply to comment #10) > Could you instruct me how to apply this patch automatically (or must it be done > by manually editing the source files)? The best way is to get Gnote version for git: git clone git://git.gnome.org/gnote then cd to gnote directory and apply the patch: git am <patch_file> Or you can apply it using patch, from inside gnote dir run: patch -p 1 < <patch_file> > Also, the source tar for Gnote 3.11.0 has a README which says "See the INSTALL > file" for compiling, but the INSTALL file seems to be absent. It's been a while > since I've compiled anything; do I just?: > ./configure > make > make install Pretty much, except that you need if using git version. On fedora you need to pass --prefix=/usr to configure. If you're on 64bit, then also --libdir=/usr/lib64 So it's (libdir only on 64 bit): ./autogen.sh --prefix=/usr --libdir=/usr/lib64 or ./configure --prefix=/usr --libdir=/usr/lib64 make make install
The patch works brilliantly! This will be included in the next release of Gnote, I assume? Thanks, Aurimas :-)
> The patch works brilliantly! This will be included in the next release of > Gnote, I assume? Committed to master, will backport to 3.10 branch. Hopefully a bug-fix release this year :)