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

panic in tracing #769

Closed
extrawurst opened this issue Nov 20, 2021 · 0 comments · Fixed by #770 or #781
Closed

panic in tracing #769

extrawurst opened this issue Nov 20, 2021 · 0 comments · Fixed by #770 or #781

Comments

@extrawurst
Copy link
Contributor

extrawurst commented Nov 20, 2021

06:45:16 [ERROR] panic: PanicInfo { payload: Any { .. }, message: Some(called `Result::unwrap()` on an `Err` value: Utf8Error { valid_up_to: 17, error_len: Some(1) }), location: Location { file: "/Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/github.com-1ecc6299db9ec823/git2-0.13.21/src/tracing.rs", line: 79, col: 58 } }
trace:
   0: backtrace::capture::Backtrace::new
   1: gitui::set_panic_handlers::{{closure}}
   2: std::panicking::rust_panic_with_hook
   3: std::panicking::begin_panic_handler::{{closure}}
   4: std::sys_common::backtrace::__rust_end_short_backtrace
   5: _rust_begin_unwind
   6: core::panicking::panic_fmt
   7: core::result::unwrap_failed
   8: core::result::Result<T,E>::unwrap
   9: git2::tracing::tracing_cb_c
  10: _git_trace__write_fmt
  11: _stream_write
  12: _git_http_client_send_body
  13: _http_stream_write
  14: _stream_thunk
  15: _write_one
  16: _write_pack
  17: _git_smart__push
  18: _git_push_finish
  19: _git_remote_upload
  20: _git_remote_push
  21: git2::remote::Remote::push
  22: std::sys_common::backtrace::__rust_begin_short_backtrace
  23: core::ops::function::FnOnce::call_once{{vtable.shim}}
  24: std::sys::unix::thread::Thread::new::thread_start
  25: _pthread_jit_write_protect_np

this was reported here: extrawurst/gitui#881 (comment)

probably caused because our tracing implementation (the callback) did not expect libgit2 sending non-utf8 tracing. turns out libgit2 traces arbitrary byte buffers. so its no wonder our to_str.unwrap chokes on it 🙈

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