Bug#852277: libgtk2-unique-perl: crash on starting second instance
Alexander Clausen
alex at gc-web.de
Mon Jan 23 05:59:20 UTC 2017
Package: libgtk2-unique-perl
Version: 0.05-2+b3
Severity: important
Dear Maintainer,
when trying to start a second instance of a program using Gtk2::Unique,
the first instance crashes. This happened for me when starting shutter,
but is also reproducible with a small perl script:
use Gtk2;
use Gtk2::Unique;
Gtk2->init;
my $app = Gtk2::UniqueApp->new(
"org.example.Test", undef,
test => 1
);
if ( $app->is_running ) {
$app->send_message( 1, text => '' );
} else {
$window = Gtk2::Window->new('toplevel');
$app->watch_window($window);
my $app_watch_id = $app->signal_connect(
'message-received' => sub {}
);
$window->show;
Gtk2->main;
0;
}
Backtrace of the crash:
Program received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/x86_64/strlen.S:106
106 ../sysdeps/x86_64/strlen.S: No such file or directory.
(gdb) bt
#0 0x00007ffff7396486 in strlen () at ../sysdeps/x86_64/strlen.S:106
#1 0x000055555563df43 in Perl_newSVpv (my_perl=0x555555941010, s=s at entry=0x55eec6a0 <error: Cannot access memory at address 0x55eec6a0>, len=len at entry=0)
at sv.c:9231
#2 0x00007fffef3d469a in perl_unique_app_marshall_message_received (closure=0x555555f43eb0, return_value=0x7fffffffd310, n_param_values=<optimized out>, param_values=0x7fffffffd370, invocant_hint=<optimized out>, marshal_data=<optimized out>) at xs/UniqueApp.xs:34
#6 0x00007ffff6c5bfaf in <emit signal ??? on instance 0x555555f23430 [UniqueApp]> (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ././gobject/gsignal.c:3447
#3 0x00007ffff6c40f75 in g_closure_invoke (closure=0x555555f43eb0, return_value=return_value at entry=0x7fffffffd310, n_param_values=4, param_values=param_values at entry=0x7fffffffd370, invocation_hint=invocation_hint at entry=0x7fffffffd2f0)
at ././gobject/gclosure.c:804
#4 0x00007ffff6c52f82 in signal_emit_unlocked_R (node=node at entry=0x555555f22af0, detail=detail at entry=0, instance=instance at entry=0x555555f23430, emission_return=emission_return at entry=0x7fffffffd4b0, instance_and_params=instance_and_params at entry=0x7fffffffd370) at ././gobject/gsignal.c:3635
#5 0x00007ffff6c5b66f in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args at entry=0x7fffffffd560) at ././gobject/gsignal.c:3401
#7 0x00007fffef1c9ac6 in unique_app_emit_message_received ()
---Type <return> to continue, or q <return> to quit---
que-1.0.so.0
#8 0x00007fffef1ccd3d in () at /usr/lib/libunique-1.0.so.0
#9 0x00007fffef1ccc06 in () at /usr/lib/libunique-1.0.so.0
#10 0x00007fffeefa9f78 in () at /usr/lib/x86_64-linux-gnu/libdbus-glib-1.so.2
#11 0x00007fffeed726a3 in () at /lib/x86_64-linux-gnu/libdbus-1.so.3
#12 0x00007fffeed63d24 in dbus_connection_dispatch () at /lib/x86_64-linux-gnu/libdbus-1.so.3
#13 0x00007fffeefa7a25 in () at /usr/lib/x86_64-linux-gnu/libdbus-glib-1.so.2
#14 0x00007ffff69677f7 in g_main_dispatch (context=0x555555b07b10) at ././glib/gmain.c:3203
#15 0x00007ffff69677f7 in g_main_context_dispatch (context=context at entry=0x555555b07b10) at ././glib/gmain.c:3856
#16 0x00007ffff6967a60 in g_main_context_iterate (context=0x555555b07b10, block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>)
at ././glib/gmain.c:3929
#17 0x00007ffff6967d82 in g_main_loop_run (loop=0x555555c4ec30) at ././glib/gmain.c:4125
#18 0x00007ffff20cc447 in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#19 0x00007ffff2686de5 in () at /usr/lib/x86_64-linux-gnu/perl5/5.24/auto/Gtk2/Gtk2.so
#20 0x0000555555628070 in Perl_pp_entersub (my_perl=0x555555941010) at pp_hot.c:3987
#21 0x00005555556205d6 in Perl_runops_standard (my_perl=0x555555941010) at run.c:41
#22 0x00005555555a6699 in S_run_body (oldscope=1, my_perl=0x555555941010) at perl.c:2488
#23 0x00005555555a6699 in perl_run (my_perl=0x555555941010) at perl.c:2411
#24 0x000055555557f84d in main (argc=<optimized out>, argv=<optimized out>, env=<optimized out>) at perlmain.c:116
(gdb) quit
The crash does not happen anymore if you remove the signal_connect(...)
statement. In that case, the second instance exits as expected and the
first instance keeps running.
Thanks,
Alex
-- System Information:
Debian Release: 9.0
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.8.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages libgtk2-unique-perl depends on:
ii libatk1.0-0 2.22.0-1
ii libc6 2.24-9
ii libcairo2 1.14.8-1
ii libfontconfig1 2.11.0-6.7
ii libfreetype6 2.6.3-3+b1
ii libgdk-pixbuf2.0-0 2.36.4-1
ii libglib2.0-0 2.50.2-2
ii libgtk2-perl 2:1.2499-1
ii libgtk2.0-0 2.24.31-1
ii libpango-1.0-0 1.40.3-3
ii libpangocairo-1.0-0 1.40.3-3
ii libpangoft2-1.0-0 1.40.3-3
ii libunique-1.0-0 1.1.6-5
ii perl 5.24.1-1
ii perl-base [perlapi-5.24.1] 5.24.1-1
libgtk2-unique-perl recommends no packages.
libgtk2-unique-perl suggests no packages.
-- no debconf information
More information about the pkg-perl-maintainers
mailing list