GNOME Bugzilla – Bug 662586
Crash when starting a second vinagre
Last modified: 2012-07-23 23:56:59 UTC
Forwarding https://bugzilla.novell.com/show_bug.cgi?id=722709 It's a crash easy to reproduce: 1) in a terminal, start "vinagre test" 2) in a second terminal, start "vinagre test2" Bam, crash. The issue, I guess, is that app_command_line() uses a global variable to parse arguments, which apparently doesn't work too well once you start a second instance via GApplication.
Another interesting thing: if you call "vinagre --help" while vinagre is already running, your instance of vinagre exits. This is actually documented: see example 19 at http://developer.gnome.org/gio/stable/GApplicationCommandLine.html
This still happens with vinagre 3.4.2
Created attachment 219451 [details] [review] Fix up handling of commandline options The handling of commandlines in the primary instance was not really working at all. Fix things up by creating a new GOptionContext for each instance, and do the extra work to send --help output back to the remote instance. Also return a nonzero exit status when commandline parsing fails.
(In reply to comment #3) > Created an attachment (id=219451) [details] [review] > Fix up handling of commandline options Added this patch to a package for testing and this indeed works without directly recognizable errors... so from a functional PoV a go.
Review of attachment 219451 [details] [review]: Thanks Matthias, this looks great! Feel free to commit this yourself, or I can once I reach GUADEC.
The following fix has been pushed: 5140ed1 Fix up handling of commandline options
Created attachment 219539 [details] [review] Fix up handling of commandline options The handling of commandlines in the primary instance was not really working at all. Fix things up by creating a new GOptionContext for each instance, and do the extra work to send --help output back to the remote instance. Also return a nonzero exit status when commandline parsing fails.