gnunn1 / tilix

A tiling terminal emulator for Linux using GTK+ 3
https://gnunn1.github.io/tilix-web
Mozilla Public License 2.0
5.41k stars 293 forks source link

Tilix flatpak does not run on Silverblue #1841

Open ebassi opened 4 years ago

ebassi commented 4 years ago

The flatpak is generated by Fedora from the RPM packages.

Output of tilix --version:

Versions
    Tilix version: 1.9.1
    VTE version: 0.58
    GTK Version: 3.24.13

Tilix Special Features
    Notifications enabled=1
    Triggers enabled=0
    Badges enabled=1

Launching from the terminal, I get:

flatpak run com.gexperts.Tilix 
2020-02-18T11:50:31.095 [warning] terminal.d:2969:hostCommandExitedCallback **********COLLECT**********

(tilix:2): GLib-CRITICAL **: 11:50:31.096: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed

(tilix:2): GLib-CRITICAL **: 11:50:31.096: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed

(tilix:2): GLib-CRITICAL **: 11:50:31.096: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed

(tilix:2): GLib-CRITICAL **: 11:50:31.096: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed
2020-02-18T11:50:31.162 [warning] terminal.d:2969:hostCommandExitedCallback **********COLLECT**********

(tilix:2): GLib-CRITICAL **: 11:50:31.162: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed

(tilix:2): GLib-CRITICAL **: 11:50:31.163: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed

(tilix:2): GLib-CRITICAL **: 11:50:31.163: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed

(tilix:2): GLib-CRITICAL **: 11:50:31.163: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed

Here's the full stack trace from the first critical warning:

#0  0x00007ffff5ab5755 in _g_log_abort () at /lib64/libglib-2.0.so.0
#1  0x00007ffff5ab6a26 in g_logv () at /lib64/libglib-2.0.so.0
#2  0x00007ffff5ab6bf3 in g_log () at /lib64/libglib-2.0.so.0
#3  0x00007ffff5ac25f2 in g_atomic_ref_count_dec () at /lib64/libglib-2.0.so.0
#4  0x00007ffff5aee526 in g_variant_unref () at /lib64/libglib-2.0.so.0
#5  0x00007ffff6381eae in rt_finalize2 () at /app/lib64/libdruntime-ldc-shared.so.85
#6  0x00007ffff636c0e6 in _D2gc4impl12conservativeQw3Gcx5sweepMFNbZm () at /app/lib64/libdruntime-ldc-shared.so.85
#7  0x00007ffff636859c in _D2gc4impl12conservativeQw3Gcx11fullcollectMFNbbZm () at /app/lib64/libdruntime-ldc-shared.so.85
#8  0x00007ffff6368786 in _D2gc4impl12conservativeQw14ConservativeGC__T9runLockedS_DQCeQCeQCcQCnQBs11fullCollectMFNbZ2goFNbPSQDtQDtQDrQEc3GcxZmTQvZQCyMFNbKQBgZm ()
    at /app/lib64/libdruntime-ldc-shared.so.85
#9  0x00000000005489d5 in _D2gx5tilix8terminalQj8Terminal25hostCommandExitedCallbackUPS3gio1c5types15GDBusConnectionPxaQdQfQhPS4glibQBpQBq8GVariantPSQErQErQEoQErQEj21HostCommandExitedArgsZv ()
#10 0x00007ffff5ce94f8 in emit_signal_instance_in_idle_cb () at /lib64/libgio-2.0.so.0
#11 0x00007ffff5aabe3b in g_idle_dispatch () at /lib64/libglib-2.0.so.0
#12 0x00007ffff5aaf510 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#13 0x00007ffff5aaf8a0 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#14 0x00007ffff5aaf943 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#15 0x00007ffff7a30cbe in _D4glib11MainContextQn9iterationMFbZb (this=0x1, mayBlock=<optimized out>) at MainContext.d:342
#16 0x0000000000547a7a in _D2gx5tilix8terminalQj8Terminal25captureHostToolboxCommandMFAyaQdAiZQi ()
#17 0x0000000000546a66 in _D2gx5tilix8terminalQj8Terminal12getHostShellMFZAya ()
#18 0x0000000000541a43 in _D2gx5tilix8terminalQj8Terminal20spawnTerminalProcessMFAyaQdZv ()
#19 0x000000000054b2a0 in _D2gx5tilix8terminalQj8Terminal12initTerminalMFAyabZv ()
#20 0x00000000005a0ffe in _D2gx5tilix9appwindow9AppWindow16createNewSessionMFAyaQdQfZv ()
#21 0x00000000005a5b04 in gx.tilix.appwindow.AppWindow.initialize() ()
#22 0x00000000005a94f0 in gx.tilix.application.Tilix.createAppWindow() ()
#23 0x00000000005aa2c7 in _D2gx5tilix11application5Tilix13onAppActivateMFC3gio11ApplicationQnZv ()
#24 0x00007ffff5b99742 in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#25 0x00007ffff5bad604 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#26 0x00007ffff5bb63ae in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#27 0x00007ffff5bb69d3 in g_signal_emit () at /lib64/libgobject-2.0.so.0
#28 0x00000000005a9bde in _D2gx5tilix11application5Tilix13onCommandLineMFS4glib1c5types__T6ScopedTC3gio22ApplicationCommandLineQyZQBoCQBj11ApplicationQnZi ()
#29 0x00007ffff78f0518 in _D7gobject8DClosureQj__T17d_closure_marshalTDFS4glib1c5types__T6ScopedTC3gio22ApplicationCommandLineQyZQBoCQBj11ApplicationQnZiZQEaUPSQFcQDhQDi8GClosurePSQFwQEbQEc6GValuekQtPvQcZv
    (closure=0x8c5090, return_value=0x7fffffffcdb0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=<optimized out>)
    at /builddir/build/BUILD/GtkD-3.8.5/generated/gtkd/gobject/DClosure.d:123
#30 0x00007ffff5b99742 in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#31 0x00007ffff5bad604 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#32 0x00007ffff5bb5a21 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#33 0x00007ffff5bb69d3 in g_signal_emit () at /lib64/libgobject-2.0.so.0
#34 0x00007ffff5cc0243 in g_application_call_command_line () at /lib64/libgio-2.0.so.0
#35 0x00007ffff5cc2af9 in g_application_real_local_command_line () at /lib64/libgio-2.0.so.0
#36 0x00007ffff5cc2cc2 in g_application_run () at /lib64/libgio-2.0.so.0
#37 0x00000000005af292 in D main ()

It seems something is attempting to release a reference on a GVariant that has already been destroyed.

phw commented 4 years ago

Can you replicate this with the latest code build from source? There have been quite some changes since the 1.9.1 release you use, including GTKD updates. Instead of trying to shove some third party binary RPM of an older release into a Flatpak container I think it would be better to try a source build first and then update the Flatpak to build directly from source.

ebassi commented 4 years ago

Instead of trying to shove some third party binary RPM of an older release into a Flatpak container

Ideally, I agree; sadly, this is how Silverblue works at the moment—take the existing distro packages and creating a run time and an application bundle; unless somebody takes Tilix and publishes a Flatpak build on Flathub, of course.

I can test an actual Flatpak build, but it's unlikely I'll be able to run the Tilix build from scratch, as I have no experience of programming in D.

lineber commented 3 years ago

I had tilix working in the fedora flatpak via Silverblue. It dependant on fedora's flatpak repo, and was the only on still running Fedora 33. When I tried to update all my flatpaks it was this app the gave an X11 error. I imagine it would work better if it was running via flathub. Either way, I uninstalled the flatpak and reinstalled it as a rpm-ostree layer.

JayDoubleu commented 2 years ago

@phw Related issues : https://github.com/gnunn1/tilix/issues/1997, https://github.com/gnunn1/tilix/issues/2038

It crashes with any version, including 1.9.4 crashes with below:

[📦 com.gexperts.Tilix tilix]$ tilix -v
Versions
    Tilix version: 1.9.4
    VTE version: 0.66
    GTK Version: 3.24.30

Tilix Special Features

(tilix:18): GLib-GObject-WARNING **: 20:10:12.257: invalid (NULL) pointer instance

(tilix:18): GLib-GObject-CRITICAL **: 20:10:12.257: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
    Notifications enabled=1
    Triggers enabled=0
    Badges enabled=1
[📦 com.gexperts.Tilix tilix]$ tilix --new-process

(tilix:21): GLib-GObject-WARNING **: 20:10:21.696: invalid (NULL) pointer instance

(tilix:21): GLib-GObject-CRITICAL **: 20:10:21.696: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(tilix:21): GLib-CRITICAL **: 20:10:21.702: g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed

(tilix:21): GLib-CRITICAL **: 20:10:21.702: g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed

(tilix:21): GLib-CRITICAL **: 20:10:21.702: g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed
2022-01-03T20:10:21.705 [warning] terminal.d:2958:hostCommandExitedCallback **********COLLECT**********

(tilix:21): GLib-CRITICAL **: 20:10:21.707: g_atomic_ref_count_dec: assertion 'old_value > 0' failed

The problem must be with HostCommand/flatpak-spawn

With 1.9.1 version it spawns first terminal on host without an error. Second split screen/spawn works but throws the error with COLLECT Spawning third terminal throws segfault. Or, spawning second shell in tab or split screen and waiting roughly 5 minutes without doing anything will also cause segfault.

2022-01-03T23:02:43.302 [warning] terminal.d:2969:hostCommandExitedCallback **********COLLECT**********

(tilix:120): GLib-CRITICAL **: 23:02:43.303: g_atomic_ref_count_dec: assertion 'old_value > 0' failed

(tilix:120): GLib-CRITICAL **: 23:02:43.303: g_atomic_ref_count_dec: assertion 'old_value > 0' failed

(tilix:120): GLib-CRITICAL **: 23:02:43.303: g_atomic_ref_count_dec: assertion 'old_value > 0' failed

(tilix:120): GLib-CRITICAL **: 23:02:43.303: g_atomic_ref_count_dec: assertion 'old_value > 0' failed

(tilix:120): GLib-CRITICAL **: 23:02:43.303: g_atomic_ref_count_dec: assertion 'old_value > 0' failed

(tilix:120): GLib-CRITICAL **: 23:02:43.303: g_atomic_ref_count_dec: assertion 'old_value > 0' failed
2022-01-03T23:02:54.344 [warning] terminal.d:2969:hostCommandExitedCallback **********COLLECT**********

(tilix:120): GLib-CRITICAL **: 23:02:54.345: g_atomic_ref_count_dec: assertion 'old_value > 0' failed

(tilix:120): GLib-CRITICAL **: 23:02:54.345: g_atomic_ref_count_dec: assertion 'old_value > 0' failed

(tilix:120): GLib-CRITICAL **: 23:02:54.345: g_atomic_ref_count_dec: assertion 'old_value > 0' failed

(tilix:120): GLib-CRITICAL **: 23:02:54.345: g_atomic_ref_count_dec: assertion 'old_value > 0' failed

(tilix:120): GLib-CRITICAL **: 23:02:54.345: g_atomic_ref_count_dec: assertion 'old_value > 0' failed

(tilix:120): GLib-CRITICAL **: 23:02:54.345: g_atomic_ref_count_dec: assertion 'old_value > 0' failed

(tilix:120): GLib-CRITICAL **: 23:02:54.345: g_atomic_ref_count_dec: assertion 'old_value > 0' failed

(tilix:120): GLib-CRITICAL **: 23:02:54.345: g_atomic_ref_count_dec: assertion 'old_value > 0' failed

Thread 1 "tilix" received signal SIGSEGV, Segmentation fault.
0xffffffff00000000 in ?? ()
(gdb) 

With 1.9.4 version it doesn't open at all and crashes straight away with **********COLLECT********** error but not SIGSEGV

1player commented 2 years ago

This can probably be closed, works fine now on Fedora Silverblue 36

EDIT: nevermind, crashed when trying to open the Preferences

guerra08 commented 2 years ago

Same behaviour on my Silverblue 36 machine.