I'm running this repo, latest main d385acefcc2405ddb863f79e3ccdb4479891008c, on Linux.
Instructions
cargo run (both with and without --release).
Click the "Flutter Plugins" tab.
Optionally flip tabs. It doesn't matter what tab you're on when you close the program.
Close the program.
Results (debug)
In a debug build, the program crashes with the following error:
../../third_party/dart/runtime/bin/thread_linux.cc: 248: error: pthread error: 16 (Device or resource busy)
version=2.14.0-228.0.dev (dev) (Sat Jun 19 18:06:49 2021 -0700) on "linux_x64"
fish: Job 1, './target/debug/nativeshell_exam…' terminated by signal SIGSEGV (Address boundary error)
Stack trace (debug)
Apparently when a stack trace includes glib signal connections, GDB renders them out of order and indented.
```
#0 0x00007ffff7c0beb1 in kDartVmSnapshotInstructions () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so
#1 0x00007ffff7af1eec in kDartVmSnapshotInstructions () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so
#2 0x00007ffff7a04423 in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so
#3 0x00007ffff79eb29f in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so
#4 0x00007ffff7ae8247 in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so
#5 0x00007ffff7ae8402 in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so
#6 0x00007ffff7ae8e0c in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so
#7 0x00007ffff78c65cb in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so
#8 0x00007ffff74b05c6 in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so
#9 0x00007ffff74a2b71 in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so
#10 0x00007ffff74a2cdb in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so
#11 0x00007ffff73ffd26 in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so
#12 0x00007ffff5281d31 in g_object_unref (_object=) at ../glib/gobject/gobject.c:3486
#13 g_object_unref (_object=0x555555c385c0) at ../glib/gobject/gobject.c:3416
#14 0x00007ffff7413b10 in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so
#15 0x00007ffff5276d12 in g_object_run_dispose (object=0x555555dab140) at ../glib/gobject/gobject.c:1226
#16 0x00007ffff595978f in gtk_overlay_forall (overlay=, include_internals=, callback=0x7ffff5a77ee0 , callback_data=0x0) at ../gtk/gtk/gtkoverlay.c:636
#17 0x00007ffff5846d8c in gtk_container_destroy (widget=0x555555e0a2a0) at ../gtk/gtk/gtkcontainer.c:1701
#21 0x00007ffff5292c64 in (instance=instance@entry=0x555555e0a2a0, signal_id=, detail=detail@entry=0) at ../glib/gobject/gsignal.c:3553
#18 0x00007ffff5274dfd in g_closure_invoke (closure=0x555555d5fd00, return_value=0x0, n_param_values=1, param_values=0x7fffffffd3e0, invocation_hint=0x7fffffffd360) at ../glib/gobject/gclosure.c:810
#19 0x00007ffff5290f51 in signal_emit_unlocked_R (node=node@entry=0x555555d84300, detail=detail@entry=0, instance=instance@entry=0x555555e0a2a0, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffd3e0) at ../glib/gobject/gsignal.c:3859
#20 0x00007ffff5292a07 in g_signal_emit_valist (instance=, signal_id=, detail=, var_args=var_args@entry=0x7fffffffd590) at ../glib/gobject/gsignal.c:3497
#22 0x00007ffff5a87f0a in gtk_widget_dispose (object=0x555555e0a2a0) at ../gtk/gtk/gtkwidget.c:12162
#23 0x00007ffff5276d12 in g_object_run_dispose (object=0x555555e0a2a0) at ../glib/gobject/gobject.c:1226
#24 0x00007ffff5a97b0a in gtk_window_forall (container=0x555555dec270, include_internals=0, callback=0x7ffff5a77ee0 , callback_data=0x0) at ../gtk/gtk/gtkwindow.c:8596
#25 0x00007ffff5846d8c in gtk_container_destroy (widget=0x555555dec270) at ../gtk/gtk/gtkcontainer.c:1701
#29 0x00007ffff5292c64 in (instance=instance@entry=0x555555dec270, signal_id=, detail=detail@entry=0) at ../glib/gobject/gsignal.c:3553
#26 0x00007ffff5274ebf in g_closure_invoke (closure=0x555555d5fd00, return_value=0x0, n_param_values=1, param_values=0x7fffffffd890, invocation_hint=0x7fffffffd810) at ../glib/gobject/gclosure.c:810
#27 0x00007ffff5290f51 in signal_emit_unlocked_R (node=node@entry=0x555555d84300, detail=detail@entry=0, instance=instance@entry=0x555555dec270, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffd890) at ../glib/gobject/gsignal.c:3859
#28 0x00007ffff5292a07 in g_signal_emit_valist (instance=, signal_id=, detail=, var_args=var_args@entry=0x7fffffffda40) at ../glib/gobject/gsignal.c:3497
#30 0x00007ffff5a87f0a in gtk_widget_dispose (object=0x555555dec270) at ../gtk/gtk/gtkwidget.c:12162
#31 0x00007ffff5a93301 in gtk_window_dispose (object=0x555555dec270) at ../gtk/gtk/gtkwindow.c:3166
#32 0x00007ffff5276d12 in g_object_run_dispose (object=0x555555dec270) at ../glib/gobject/gobject.c:1226
#33 0x00007ffff59278bb in gtk_main_do_event (event=) at ../gtk/gtk/gtkmain.c:1837
#34 gtk_main_do_event (event=) at ../gtk/gtk/gtkmain.c:1691
#35 0x00007ffff5a8aebe in send_delete_event (data=) at ../gtk/gtk/gtkwindow.c:1331
#36 0x00007ffff5671970 in gdk_threads_dispatch (data=0x555555ee2460) at ../gtk/gdk/gdk.c:769
#37 0x00007ffff517fbd5 in g_main_dispatch (context=0x555555c769e0) at ../glib/glib/gmain.c:3337
#38 g_main_context_dispatch (context=0x555555c769e0) at ../glib/glib/gmain.c:4055
#39 0x00007ffff51d4ba9 in g_main_context_iterate.constprop.0 (context=0x555555c769e0, block=block@entry=1, dispatch=dispatch@entry=1, self=) at ../glib/glib/gmain.c:4131
#40 0x00007ffff517f243 in g_main_loop_run (loop=0x55555612e7e0) at ../glib/glib/gmain.c:4329
#41 0x00007ffff591d4ef in gtk_main () at ../gtk/gtk/gtkmain.c:1329
#42 0x00005555559bc637 in gtk::auto::functions::main () at /home/nyanpasu64/.cargo/registry/src/github.com-1ecc6299db9ec823/gtk-0.9.2/src/auto/functions.rs:314
#43 0x00005555558a4aab in nativeshell::shell::platform::platform_impl::run_loop::PlatformRunLoop::run (self=0x555555c1a2f0) at /home/nyanpasu64/.cargo/registry/src/github.com-1ecc6299db9ec823/nativeshell-0.1.6/src/shell/platform/linux/run_loop.rs:63
#44 0x00005555558e781d in nativeshell::shell::run_loop::RunLoop::run (self=0x555555c1a0f0) at /home/nyanpasu64/.cargo/registry/src/github.com-1ecc6299db9ec823/nativeshell-0.1.6/src/shell/run_loop.rs:41
#45 0x00005555555feade in nativeshell_examples::main () at src/main.rs:39
```
Results (release)
In a release build, the program crashes with the following error:
../../third_party/dart/runtime/bin/thread_linux.cc: 248: error: pthread error: 16 (Device or resource busy)
fish: Job 1, './target/release/nativeshell_ex…' terminated by signal SIGABRT (Abort)
The stack trace is basically the same (aside from libflutter_linux_gtk.so being loaded to a different address) except for the top few function calls.
Stack trace (release)
```
#0 0x00007ffff62ded22 in raise () at /usr/lib/libc.so.6
#1 0x00007ffff62c8862 in abort () at /usr/lib/libc.so.6
#2 0x00007ffff7d5b8e6 in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so
#3 0x00007ffff7c6dc43 in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so
#4 0x00007ffff7c54b2f in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so
#5 0x00007ffff7d51ab7 in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so
#6 0x00007ffff7d51c72 in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so
#7 0x00007ffff7d5267c in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so
#8 0x00007ffff7b3090b in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so
#9 0x00007ffff771bda6 in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so
#10 0x00007ffff770e351 in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so
#11 0x00007ffff770e4bb in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so
#12 0x00007ffff766cd06 in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so
#13 0x00007ffff6609d31 in g_object_unref (_object=) at ../glib/gobject/gobject.c:3486
#14 g_object_unref (_object=0x5555557e95c0) at ../glib/gobject/gobject.c:3416
#15 0x00007ffff7680af0 in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so
#16 0x00007ffff65fed12 in g_object_run_dispose (object=0x55555595c140) at ../glib/gobject/gobject.c:1226
#17 0x00007ffff6ce178f in gtk_overlay_forall (overlay=, include_internals=, callback=0x7ffff6dffee0 , callback_data=0x0) at ../gtk/gtk/gtkoverlay.c:636
#18 0x00007ffff6bced8c in gtk_container_destroy (widget=0x5555559c62a0) at ../gtk/gtk/gtkcontainer.c:1701
#22 0x00007ffff661ac64 in (instance=instance@entry=0x5555559c62a0, signal_id=, detail=detail@entry=0) at ../glib/gobject/gsignal.c:3553
#19 0x00007ffff65fcdfd in g_closure_invoke (closure=0x55555591ba50, return_value=0x0, n_param_values=1, param_values=0x7fffffffd6c0, invocation_hint=0x7fffffffd640) at ../glib/gobject/gclosure.c:810
#20 0x00007ffff6618f51 in signal_emit_unlocked_R (node=node@entry=0x555555932a30, detail=detail@entry=0, instance=instance@entry=0x5555559c62a0, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffd6c0) at ../glib/gobject/gsignal.c:3859
#21 0x00007ffff661aa07 in g_signal_emit_valist (instance=, signal_id=, detail=, var_args=var_args@entry=0x7fffffffd870) at ../glib/gobject/gsignal.c:3497
#23 0x00007ffff6e0ff0a in gtk_widget_dispose (object=0x5555559c62a0) at ../gtk/gtk/gtkwidget.c:12162
#24 0x00007ffff65fed12 in g_object_run_dispose (object=0x5555559c62a0) at ../glib/gobject/gobject.c:1226
#25 0x00007ffff6e1fb0a in gtk_window_forall (container=0x555555a3a270, include_internals=0, callback=0x7ffff6dffee0 , callback_data=0x0) at ../gtk/gtk/gtkwindow.c:8596
#26 0x00007ffff6bced8c in gtk_container_destroy (widget=0x555555a3a270) at ../gtk/gtk/gtkcontainer.c:1701
#30 0x00007ffff661ac64 in (instance=instance@entry=0x555555a3a270, signal_id=, detail=detail@entry=0) at ../glib/gobject/gsignal.c:3553
#27 0x00007ffff65fcebf in g_closure_invoke (closure=0x55555591ba50, return_value=0x0, n_param_values=1, param_values=0x7fffffffdb70, invocation_hint=0x7fffffffdaf0) at ../glib/gobject/gclosure.c:810
#28 0x00007ffff6618f51 in signal_emit_unlocked_R (node=node@entry=0x555555932a30, detail=detail@entry=0, instance=instance@entry=0x555555a3a270, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffdb70) at ../glib/gobject/gsignal.c:3859
#29 0x00007ffff661aa07 in g_signal_emit_valist (instance=, signal_id=, detail=, var_args=var_args@entry=0x7fffffffdd20) at ../glib/gobject/gsignal.c:3497
#31 0x00007ffff6e0ff0a in gtk_widget_dispose (object=0x555555a3a270) at ../gtk/gtk/gtkwidget.c:12162
#32 0x00007ffff6e1b301 in gtk_window_dispose (object=0x555555a3a270) at ../gtk/gtk/gtkwindow.c:3166
#33 0x00007ffff65fed12 in g_object_run_dispose (object=0x555555a3a270) at ../glib/gobject/gobject.c:1226
#34 0x00007ffff6caf8bb in gtk_main_do_event (event=) at ../gtk/gtk/gtkmain.c:1837
#35 gtk_main_do_event (event=) at ../gtk/gtk/gtkmain.c:1691
#36 0x00007ffff6e12ebe in send_delete_event (data=) at ../gtk/gtk/gtkwindow.c:1331
#37 0x00007ffff69f9970 in gdk_threads_dispatch (data=0x555555a93c60) at ../gtk/gdk/gdk.c:769
#38 0x00007ffff6507bd5 in g_main_dispatch (context=0x555555825d00) at ../glib/glib/gmain.c:3337
#39 g_main_context_dispatch (context=0x555555825d00) at ../glib/glib/gmain.c:4055
#40 0x00007ffff655cba9 in g_main_context_iterate.constprop.0 (context=0x555555825d00, block=block@entry=1, dispatch=dispatch@entry=1, self=) at ../glib/glib/gmain.c:4131
#41 0x00007ffff6507243 in g_main_loop_run (loop=0x555555ce05e0) at ../glib/glib/gmain.c:4329
#42 0x00007ffff6ca54ef in gtk_main () at ../gtk/gtk/gtkmain.c:1329
#43 0x00005555555a27f5 in nativeshell_examples::main ()
#44 0x000055555559e8e3 in std::sys_common::backtrace::__rust_begin_short_backtrace ()
#45 0x00005555555a6349 in _ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h453ec6ed7a1f3d54E.llvm.1563536868307558524 ()
#46 0x00005555556ca16a in core::ops::function::impls::{{impl}}::call_once<(),Fn<()>> () at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/ops/function.rs:259
#47 std::panicking::try::do_call<&Fn<()>,i32> () at library/std/src/panicking.rs:379
#48 std::panicking::try> () at library/std/src/panicking.rs:343
#49 std::panic::catch_unwind<&Fn<()>,i32> () at library/std/src/panic.rs:431
#50 std::rt::lang_start_internal () at library/std/src/rt.rs:51
#51 0x00005555555a2a22 in main ()
```
I'm running this repo, latest main d385acefcc2405ddb863f79e3ccdb4479891008c, on Linux.
Instructions
cargo run
(both with and without--release
).Results (debug)
In a debug build, the program crashes with the following error:
Stack trace (debug)
Apparently when a stack trace includes glib signal connections, GDB renders them out of order and indented. ``` #0 0x00007ffff7c0beb1 in kDartVmSnapshotInstructions () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so #1 0x00007ffff7af1eec in kDartVmSnapshotInstructions () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so #2 0x00007ffff7a04423 in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so #3 0x00007ffff79eb29f in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so #4 0x00007ffff7ae8247 in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so #5 0x00007ffff7ae8402 in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so #6 0x00007ffff7ae8e0c in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so #7 0x00007ffff78c65cb in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so #8 0x00007ffff74b05c6 in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so #9 0x00007ffff74a2b71 in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so #10 0x00007ffff74a2cdb in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so #11 0x00007ffff73ffd26 in () at /home/nyanpasu64/code/nativeshell-examples/target/debug/lib/libflutter_linux_gtk.so #12 0x00007ffff5281d31 in g_object_unref (_object=Results (release)
In a release build, the program crashes with the following error:
The stack trace is basically the same (aside from libflutter_linux_gtk.so being loaded to a different address) except for the top few function calls.
Stack trace (release)
``` #0 0x00007ffff62ded22 in raise () at /usr/lib/libc.so.6 #1 0x00007ffff62c8862 in abort () at /usr/lib/libc.so.6 #2 0x00007ffff7d5b8e6 in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so #3 0x00007ffff7c6dc43 in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so #4 0x00007ffff7c54b2f in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so #5 0x00007ffff7d51ab7 in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so #6 0x00007ffff7d51c72 in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so #7 0x00007ffff7d5267c in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so #8 0x00007ffff7b3090b in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so #9 0x00007ffff771bda6 in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so #10 0x00007ffff770e351 in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so #11 0x00007ffff770e4bb in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so #12 0x00007ffff766cd06 in () at /home/nyanpasu64/code/nativeshell-examples/target/release/lib/libflutter_linux_gtk.so #13 0x00007ffff6609d31 in g_object_unref (_object=Flutter version:
Flutter 2.3.0-17.0.pre.414 • channel master • https://github.com/flutter/flutter.git Framework • revision 757c3add14 (5 hours ago) • 2021-06-20 22:29:02 -0400 Engine • revision 9520bb15b3 Tools • Dart 2.14.0 (build 2.14.0-228.0.dev)
System info:
Operating System: Arch Linux KDE Plasma Version: 5.22.1 KDE Frameworks Version: 5.83.0 Qt Version: 5.15.2 Kernel Version: 5.12.11-zen1-1-zen (64-bit) Graphics Platform: X11 Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor Memory: 15.6 GiB of RAM Graphics Processor: NVIDIA GeForce GT 730/PCIe/SSE2