Skip to content

UI crashes when entering to the one of the project submodules #1510

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

Closed
vikulikov opened this issue Jan 16, 2023 · 5 comments
Closed

UI crashes when entering to the one of the project submodules #1510

vikulikov opened this issue Jan 16, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@vikulikov
Copy link

Describe the bug
Pressing shift + s window with submodules opens. After selecting one of the submodules with enter and waiting for 2-3 seconds UI of gitui closes but the app is seemed to be still working because shell is unresponsive.
I have uncommited changes in the submodules. Maybe the problem is around it.

To Reproduce
Steps to reproduce the behavior:

  1. Open gitui in the project with submodules
  2. Press Shift + s to open submodules view
  3. Select any submodule with enter
  4. Wait for 2-3 secs
  5. See error

Expected behavior
To not crash

Context:

  • macOS 13.1
  • gitui 0.22.1
  • terminal alacritty 0.11.0 (8dbaa0b)
  • rustc 1.66.0 (69f9c33d7 2022-12-12)
@vikulikov vikulikov added the bug Something isn't working label Jan 16, 2023
@vikulikov
Copy link
Author

Tell me please how I can give you additional context. Because I don't see any errors on crash

@extrawurst
Copy link
Collaborator

can you run with logging enabled and share that?

@vikulikov
Copy link
Author

gitui.log

@suricactus
Copy link

suricactus commented Feb 13, 2023

Same behaviour here, Ubuntu 22.04. Stable reproduction:

  1. Install latest gitui (0.22.1)
cargo install gitui
  1. Checkout repo with submodules (reliebly reproduced with another repository too)
git clone --recurse-submodules https://github.com/opengisch/qfieldsync
cd qfieldsync
  1. Run gitui in the repo dir
  2. Press shift+s
  3. Select submodule libqfieldsync
  4. GUI loads fine
  5. Wait 1-2 seconds
  6. GUI crashes

Logs:

13:33:36 [TRACE] (1) gitui::watcher: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/watcher.rs:21] poll watcher: false recommended: Inotify
13:33:36 [TRACE] (6) mio::poll: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/mio-0.8.5/src/poll.rs:532] registering event source with poller: token=Token(1), interests=READABLE
13:33:36 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:119] open repo at: RefCell { value: Path(".") }
13:33:36 [TRACE] (7) mio::poll: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/mio-0.8.5/src/poll.rs:532] registering event source with poller: token=Token(0), interests=READABLE
13:33:36 [TRACE] (1) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:102] request: [hash: 4684729819045555801] (type: WorkingDir)
13:33:36 [TRACE] (1) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:102] request: [hash: 7602197626739193840] (type: Stage)
13:33:36 [TRACE] (1) gitui: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/main.rs:200] app start: 7 ms
13:33:36 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:477] update
13:33:36 [TRACE] (1) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:96] request blocked, still pending
13:33:36 [TRACE] (1) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:96] request blocked, still pending
13:33:36 [TRACE] (5) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:160] status fetched: 7602197626739193840 (type: Stage)
13:33:36 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:496] update_async: Git(Branches)
13:33:36 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:496] update_async: Git(Status)
13:33:36 [TRACE] (3) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:160] status fetched: 4684729819045555801 (type: WorkingDir)
13:33:36 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:496] update_async: Git(Status)
13:33:38 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:382] event: Input(Key(KeyEvent { code: Char('S'), modifiers: SHIFT, kind: Press, state: NONE }))
13:33:38 [TRACE] (1) asyncgit::sync::submodules: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/sync/submodules.rs:118] [sub] repo_wd: "/tmp/bugreport_gitui/qfieldsync/"
13:33:38 [TRACE] (1) asyncgit::sync::submodules: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/sync/submodules.rs:119] [sub] repo_path: "/tmp/bugreport_gitui/qfieldsync/.git/"
13:33:38 [TRACE] (1) asyncgit::sync::submodules: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/sync/submodules.rs:122] [sub] parent_path: "/tmp/bugreport_gitui"
13:33:38 [DEBUG] (8) gitui::watcher: notify events: 3
13:33:38 [DEBUG] (8) gitui::watcher: notify [0]: DebouncedEvent { path: "/tmp/bugreport_gitui/qfieldsync/.git/index", kind: Any }
13:33:38 [DEBUG] (8) gitui::watcher: notify [1]: DebouncedEvent { path: "/tmp/bugreport_gitui/qfieldsync/.git/index.lock", kind: Any }
13:33:38 [DEBUG] (8) gitui::watcher: notify [2]: DebouncedEvent { path: "/tmp/bugreport_gitui/qfieldsync/.git/gitui", kind: Any }
13:33:38 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:477] update
13:33:38 [TRACE] (1) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:102] request: [hash: 2304375740930997517] (type: WorkingDir)
13:33:38 [TRACE] (1) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:102] request: [hash: 14018173114254462703] (type: Stage)
13:33:38 [TRACE] (4) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:160] status fetched: 14018173114254462703 (type: Stage)
13:33:38 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:496] update_async: Git(Status)
13:33:38 [TRACE] (2) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:160] status fetched: 2304375740930997517 (type: WorkingDir)
13:33:38 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:496] update_async: Git(Status)
13:33:40 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:382] event: Input(Key(KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE }))
13:33:40 [TRACE] (1) gitui::watcher: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/watcher.rs:21] poll watcher: false recommended: Inotify
13:33:40 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:119] open repo at: RefCell { value: Path("/tmp/bugreport_gitui/qfieldsync/qfieldsync/libqfieldsync") }
13:33:40 [TRACE] (11) mio::poll: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/mio-0.8.5/src/poll.rs:532] registering event source with poller: token=Token(0), interests=READABLE
13:33:40 [TRACE] (1) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:102] request: [hash: 3981455647355802947] (type: WorkingDir)
13:33:40 [TRACE] (1) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:102] request: [hash: 7999239798305689242] (type: Stage)
13:33:40 [TRACE] (1) gitui: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/main.rs:200] app start: 4040 ms
13:33:40 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:477] update
13:33:40 [TRACE] (4) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:160] status fetched: 7999239798305689242 (type: Stage)
13:33:40 [TRACE] (3) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:160] status fetched: 3981455647355802947 (type: WorkingDir)
13:33:40 [TRACE] (1) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:102] request: [hash: 10708707299227051756] (type: WorkingDir)
13:33:40 [TRACE] (1) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:102] request: [hash: 4674961378082126802] (type: Stage)
13:33:40 [TRACE] (3) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:160] status fetched: 4674961378082126802 (type: Stage)
13:33:40 [TRACE] (2) asyncgit::status: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/asyncgit-0.22.1/src/status.rs:160] status fetched: 10708707299227051756 (type: WorkingDir)
13:33:40 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:496] update_async: Git(Branches)
13:33:40 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:496] update_async: Git(Status)
13:33:40 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:496] update_async: Git(Status)
13:33:40 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:496] update_async: Git(Status)
13:33:40 [TRACE] (1) gitui::app: [/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/app.rs:496] update_async: Git(Status)
13:33:42 [DEBUG] (8) gitui::watcher: notify events: 1
13:33:42 [DEBUG] (8) gitui::watcher: notify [0]: DebouncedEvent { path: "/tmp/bugreport_gitui/qfieldsync/.git/modules/qfieldsync/libqfieldsync/gitui", kind: Any }
13:33:43 [ERROR] panic: PanicInfo { payload: Any { .. }, message: Some(send error: "SendError(..)"), location: Location { file: "/home/suricactus/.cargo/registry/src/gb.xjqchip.workers.dev-1ecc6299db9ec823/gitui-0.22.1/src/watcher.rs", line: 69, col: 37 }, can_unwind: true }
trace:
   0: gitui::set_panic_handlers::{{closure}}
   1: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/alloc/src/boxed.rs:2032:9
      std::panicking::rust_panic_with_hook
             at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/panicking.rs:692:13
   2: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/panicking.rs:579:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/sys_common/backtrace.rs:137:18
   4: rust_begin_unwind
             at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/panicking.rs:575:5
   5: core::panicking::panic_fmt
             at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/panicking.rs:64:14
   6: core::result::unwrap_failed
             at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/result.rs:1791:5
   7: std::sys_common::backtrace::__rust_begin_short_backtrace
   8: core::ops::function::FnOnce::call_once{{vtable.shim}}
   9: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/alloc/src/boxed.rs:2000:9
      <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/alloc/src/boxed.rs:2000:9
      std::sys::unix::thread::Thread::new::thread_start
             at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/sys/unix/thread.rs:108:17
  10: start_thread
             at ./nptl/pthread_create.c:442:8
  11: clone3
             at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Peek 2023-02-13 15-33

@extrawurst
Copy link
Collaborator

closed via 94424eb

extrawurst added a commit that referenced this issue Feb 17, 2023
also do not allow opening submodule without workdir
IndianBoy42 pushed a commit to IndianBoy42/gitui that referenced this issue Jun 4, 2024
also do not allow opening submodule without workdir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants