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

when select log[2] panic #542

Closed
jellybobbin opened this issue Feb 24, 2021 · 10 comments
Closed

when select log[2] panic #542

jellybobbin opened this issue Feb 24, 2021 · 10 comments

Comments

@jellybobbin
Copy link

jellybobbin commented Feb 24, 2021

env

macos     10.14.6
gitui     0.8.1
iterm2    3.3.4

git log (It's a test, usually not very long)

commit 060deab38708174af142e79dee5f1abddee2bcd5 (HEAD -> master, origin/master)
Author: jelly <jellybobbin@gmail.com>
Date:   Thu Feb 25 09:18:16 2021 +0800

    兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼
容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報
基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功
能兼容力報基础功能

屏幕快照 2021-02-25 09 26 59

gitui

panic: PanicInfo { payload: Any, message: Some(byte index 100 is not a char boundary; it is inside '容' (bytes 99..102) of `兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基础功能兼容力報基`[...]), location: Location { file: "/private/tmp/rust-20200705-74315-rfuccz/rustc-1.44.1-src/src/libcore/str/mod.rs", line: 1920, col: 47 } }
trace:
   0: backtrace::capture::Backtrace::new
   1: gitui::set_panic_handlers::{{closure}}
   2: std::panicking::rust_panic_with_hook
   3: _rust_begin_unwind
   4: core::panicking::panic_fmt
   5: core::str::slice_error_fail
   6: core::str::traits::<impl core::slice::SliceIndex<str> for core::ops::range::Range<usize>>::index::{{closure}}
   7: core::str::traits::<impl core::ops::index::Index<I> for str>::index
   8: asyncgit::sync::commits_info::get_message
   9: asyncgit::sync::commits_info::get_commits_info
  10: gitui::tabs::revlog::Revlog::update
  11: gitui::main
  12: std::rt::lang_start::{{closure}}
  13: _main

屏幕快照 2021-02-25 09 32 14

But when the item window is properly sized, it is normal:

屏幕快照 2021-02-25 09 43 50

@extrawurst
Copy link
Owner

extrawurst commented Feb 24, 2021

To allow me to reproduce this I would need to have the full commit message or author name that contains this Unicode character.

edit: also please provide the terminal size you tried this in

the Issue template asks for more information like the gitui version you used, please provide them

@extrawurst
Copy link
Owner

see #188 as reference

@jellybobbin
Copy link
Author

jellybobbin commented Feb 24, 2021

ok,thanks...
but it happened in my work, not at home (version 0.11.0), I need to confirm the version information tomorrow...

I will describe the process of reappearance tomorrow.

@extrawurst
Copy link
Owner

but it happened in my work, not at home (version 0.11.0), I need to confirm the version information tomorrow...

please also provide me with as much data as possible to reproduce this, the problem must be some unicode rendering that breaks but In order for this to be reproducible I need the message/author name that makes it break

@jellybobbin
Copy link
Author

but it happened in my work, not at home (version 0.11.0), I need to confirm the version information tomorrow...

please also provide me with as much data as possible to reproduce this, the problem must be some unicode rendering that breaks but In order for this to be reproducible I need the message/author name that makes it break

No problem. In fact, it happened in two existing warehouses

@extrawurst
Copy link
Owner

No problem. In fact, it happened in two existing warehouses

I assume a warehouse is a git repository? :)
if so its no wonder, its utf8 related and you probably use a lot multibyte characters in your names and commit messages

@jellybobbin
Copy link
Author

No problem. In fact, it happened in two existing warehouses

I assume a warehouse is a git repository? :)
if so its no wonder, its utf8 related and you probably use a lot multibyte characters in your names and commit messages

Yes, it's a git repository, so is it normal?

@jellybobbin
Copy link
Author

jellybobbin commented Feb 25, 2021

@extrawurst

I used itrem2. I found it related to the size of the itrem2 window. When the itrem2 window is just the right size, it's normal. There are problems with everything else.

@extrawurst
Copy link
Owner

extrawurst commented Feb 25, 2021

@jellybobbin I just realize you created the same issue already in the past: #420
Now that you provided the information that this happens in gitui 0.8.1 the answer is going to be the exact same:

version 0.8.1 is super old and this bug is already fixed. please update or provide a reproduction that still crashes the most recent version.

the fix for this is in cb3b968 and was released in version 0.9.0 (on 29 Jul 2020)

@jellybobbin
Copy link
Author

maybe it's too long and I forgot it.,thx..

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

No branches or pull requests

2 participants