Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: optional last tab page #1238

Merged
merged 1 commit into from
Sep 29, 2024
Merged

refactor: optional last tab page #1238

merged 1 commit into from
Sep 29, 2024

Conversation

flxzt
Copy link
Owner

@flxzt flxzt commented Sep 29, 2024

ground work to continue progress on #1196

@flxzt flxzt merged commit f20775c into main Sep 29, 2024
2 checks passed
@anesthetice
Copy link
Contributor

There's a weird issue when opening files:

issue.mp4
(rnote:93079): Gtk-WARNING **: 12:32:08.994: Unknown key gtk-modules in /home/oether/.config/gtk-4.0/settings.ini

(rnote:93079): Adwaita-WARNING **: 12:32:09.007: Using GtkSettings:gtk-application-prefer-dark-theme with libadwaita is unsupported. Please use AdwStyleManager:color-scheme instead.

(rnote:93079): Gtk-WARNING **: 12:32:09.199: Creating a portal monitor failed: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Inhibit” on object at path /org/freedesktop/portal/desktop

(rnote:93079): Adwaita-CRITICAL **: 12:32:09.280: adw_tab_view_append: assertion 'gtk_widget_get_parent (child) == NULL' failed
thread 'main' panicked at /home/oether/Documents/Rust/rnote/_mesonbuild/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/libadwaita-0.7.0/src/auto/tab_page.rs:14:1:
assertion failed: !ptr.is_null()
stack backtrace:
   0:     0x55a0a87143d5 - std::backtrace_rs::backtrace::libunwind::trace::h58eed11393533053
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:     0x55a0a87143d5 - std::backtrace_rs::backtrace::trace_unsynchronized::h6af9bae28ebb6388
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55a0a87143d5 - std::sys_common::backtrace::_print_fmt::hb6748916642a4fb2
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x55a0a87143d5 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3692694645b1bb6a
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x55a0a87404ab - core::fmt::rt::Argument::fmt::h7aa93977ba74ae0f
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/fmt/rt.rs:165:63
   5:     0x55a0a87404ab - core::fmt::write::h5131d80b4c69b88d
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/fmt/mod.rs:1168:21
   6:     0x55a0a871124f - std::io::Write::write_fmt::h1fb327a7d8b0eb36
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/io/mod.rs:1835:15
   7:     0x55a0a87141ae - std::sys_common::backtrace::_print::he6ebb7b9d89f4456
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x55a0a87141ae - std::sys_common::backtrace::print::h998d75b840f75a73
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x55a0a8715779 - std::panicking::default_hook::{{closure}}::h18ec7fe6a38b9da0
  10:     0x55a0a871551a - std::panicking::default_hook::hfb3f22c2e4075a6a
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:298:9
  11:     0x55a0a8715c13 - std::panicking::rust_panic_with_hook::h51af00bcb4660c4e
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:795:13
  12:     0x55a0a8715abb - std::panicking::begin_panic_handler::{{closure}}::h39f76aa863fbe8ce
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:656:13
  13:     0x55a0a8714899 - std::sys_common::backtrace::__rust_end_short_backtrace::h4d10fc2251b89840
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:171:18
  14:     0x55a0a8715827 - rust_begin_unwind
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:652:5
  15:     0x55a0a7949263 - core::panicking::panic_fmt::h319840fcbcd912ef
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/panicking.rs:72:14
  16:     0x55a0a794930c - core::panicking::panic::h19def44c80243eda
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/panicking.rs:146:5
  17:     0x55a0a7b04903 - <libadwaita::auto::tab_page::TabPage as glib::translate::FromGlibPtrNone<*mut libadwaita_sys::AdwTabPage>>::from_glib_none::h401585966927c157
                               at /home/oether/Documents/Rust/rnote/_mesonbuild/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/glib-0.20.3/src/object.rs:894:17
  18:     0x55a0a7b04903 - glib::translate::from_glib_none::hd5c37f39192b3eb6
                               at /home/oether/Documents/Rust/rnote/_mesonbuild/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/glib-0.20.3/src/translate.rs:1626:5
  19:     0x55a0a7b04903 - libadwaita::auto::tab_view::TabView::append::h3db2d30a599e583a
                               at /home/oether/Documents/Rust/rnote/_mesonbuild/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/libadwaita-0.7.0/src/auto/tab_view.rs:64:13
  20:     0x55a0a7aa556d - rnote::appwindow::RnAppWindow::append_wrapper_new_tab::hd11cfd1f410cf18d
                               at /home/oether/Documents/Rust/rnote/crates/rnote-ui/src/appwindow/mod.rs:347:20
  21:     0x55a0a7a59a0a - rnote::appwindow::RnAppWindow::try_open_file::{{closure}}::h8eba119561cac8dc
                               at /home/oether/Documents/Rust/rnote/crates/rnote-ui/src/appwindow/mod.rs:560:25
  22:     0x55a0a7a59a0a - rnote::appwindow::RnAppWindow::open_file_w_dialogs::{{closure}}::h6c5990d77986b483
                               at /home/oether/Documents/Rust/rnote/crates/rnote-ui/src/appwindow/mod.rs:506:14
  23:     0x55a0a7a521ee - rnote::app::imp::RnApp::new_appwindow_init_show::{{closure}}::h2b6a4dd40ace9b15
                               at /home/oether/Documents/Rust/rnote/crates/rnote-ui/src/app/mod.rs:144:80
  24:     0x55a0a7a521ee - glib::main_context_futures::<impl glib::auto::main_context::MainContext>::spawn_local_with_priority::{{closure}}::hba98d97fdd825521
                               at /home/oether/Documents/Rust/rnote/_mesonbuild/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/glib-0.20.3/src/main_context_futures.rs:579:24
  25:     0x55a0a86e2701 - <glib::main_context_futures::FutureWrapper as core::future::future::Future>::poll::h127851f35c36832b
  26:     0x55a0a86e2701 - glib::main_context_futures::TaskSource::poll::{{closure}}::{{closure}}::h8f93e36d6bbe8e21
                               at /home/oether/Documents/Rust/rnote/_mesonbuild/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/glib-0.20.3/src/main_context_futures.rs:248:25
  27:     0x55a0a86e2701 - core::ops::function::FnOnce::call_once::h3f63380551008dee
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/ops/function.rs:250:5
  28:     0x55a0a86e2701 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hff1fb62145bf2ebf
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/panic/unwind_safe.rs:272:9
  29:     0x55a0a86e2701 - std::panicking::try::do_call::hdd9d7e24d22d0d21
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:559:40
  30:     0x55a0a86e2701 - std::panicking::try::h6ca484884a7e00df
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:523:19
  31:     0x55a0a86e2701 - std::panic::catch_unwind::h67635503d3f4f3e8
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panic.rs:149:14
  32:     0x55a0a86e2701 - glib::main_context_futures::TaskSource::poll::{{closure}}::h5b2e008bbbc6314f
                               at /home/oether/Documents/Rust/rnote/_mesonbuild/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/glib-0.20.3/src/main_context_futures.rs:247:31
  33:     0x55a0a86e2701 - glib::main_context::<impl glib::auto::main_context::MainContext>::with_thread_default::h3ffcf817cb0e65e5
                               at /home/oether/Documents/Rust/rnote/_mesonbuild/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/glib-0.20.3/src/main_context.rs:154:12
  34:     0x55a0a86de6a3 - glib::main_context_futures::TaskSource::poll::h64f12e84cf886aaf
                               at /home/oether/Documents/Rust/rnote/_mesonbuild/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/glib-0.20.3/src/main_context_futures.rs:239:9
  35:     0x55a0a86de6a3 - glib::main_context_futures::TaskSource::dispatch::h34c543a4d77b7034
                               at /home/oether/Documents/Rust/rnote/_mesonbuild/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/glib-0.20.3/src/main_context_futures.rs:75:34
  36:     0x7d35c40db559 - <unknown>
  37:     0x7d35c413e157 - <unknown>
  38:     0x7d35c40daa55 - g_main_context_iteration
  39:     0x7d35c3dd5c36 - g_application_run
  40:     0x55a0a7bea3fe - gio::application::ApplicationExtManual::run_with_args::h5e17fb1239d207d4
                               at /home/oether/Documents/Rust/rnote/_mesonbuild/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/gio-0.20.1/src/application.rs:29:13
  41:     0x55a0a7bea3fe - gio::application::ApplicationExtManual::run::h8a8641273274b4bf
                               at /home/oether/Documents/Rust/rnote/_mesonbuild/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/gio-0.20.1/src/application.rs:22:9
  42:     0x55a0a7b81947 - rnote::main::h79096961e922184a
                               at /home/oether/Documents/Rust/rnote/crates/rnote-ui/src/main.rs:86:5
  43:     0x55a0a7b9c303 - core::ops::function::FnOnce::call_once::h000a4e9eef7c4b89
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/ops/function.rs:250:5
  44:     0x55a0a7b9c303 - std::sys_common::backtrace::__rust_begin_short_backtrace::ha375c7dd8aedcf46
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:155:18
  45:     0x55a0a7ab9b59 - std::rt::lang_start::{{closure}}::hf1ce436be780aff2
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/rt.rs:159:18
  46:     0x55a0a870901d - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hb84c63630a35bb05
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/ops/function.rs:284:13
  47:     0x55a0a870901d - std::panicking::try::do_call::h8d62108d97b3e028
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:559:40
  48:     0x55a0a870901d - std::panicking::try::h0c0b9a214b9691f1
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:523:19
  49:     0x55a0a870901d - std::panic::catch_unwind::ha8912f28da143edb
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panic.rs:149:14
  50:     0x55a0a870901d - std::rt::lang_start_internal::{{closure}}::h2baf77487fc7f90d
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/rt.rs:141:48
  51:     0x55a0a870901d - std::panicking::try::do_call::h36fdc82521d3343f
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:559:40
  52:     0x55a0a870901d - std::panicking::try::h58aa1415c41e30ec
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:523:19
  53:     0x55a0a870901d - std::panic::catch_unwind::h3c4b5a8c3b1c4acf
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panic.rs:149:14
  54:     0x55a0a870901d - std::rt::lang_start_internal::h63a185b0ddd212e9
                               at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/rt.rs:141:20
  55:     0x55a0a7b81c9c - main
  56:     0x7d35c2b33e08 - <unknown>
  57:     0x7d35c2b33ecc - __libc_start_main
  58:     0x55a0a7949df5 - _start
  59:                0x0 - <unknown>

@flxzt flxzt deleted the fz/optional-tab-page branch October 13, 2024 09:12
@flxzt
Copy link
Owner Author

flxzt commented Oct 13, 2024

@anesthetice thanks for pointing this out. This was a logic error in the try_open_file() function and should be fixed with commit 4e4df93

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants