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

Crashes when trying to show log in a git repo with chinese commit messages on Windows 10 #188

Closed
slaughtering opened this issue Jul 9, 2020 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@slaughtering
Copy link

slaughtering commented Jul 9, 2020

Describe the bug
Crashes when trying to show log in a git repo with chinese commit messages on Windows 10

To Reproduce
Steps to reproduce the behavior:

  1. Open cmd or pwsh and cd to a git repo with chinese commit log messages
  2. Run gitui
  3. Press 2 to show the log
  4. See error:
    panic: PanicInfo { payload: Any, message: Some(byte index 118 is not a char boundary; it is inside '里' (bytes 117..120)
    C:\repos\someproject>中文提交信息(some chinese commit message)`), location: Location { file: "/rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\src\libcore\str\mod.rs", line: 1920, col: 47 } }
    trace:
    0: <unknown>
    1: <unknown>
    2: <unknown>
    3: <unknown>
    4: <unknown>
    5: <unknown>
    6: <unknown>
    7: <unknown>
    8: <unknown>
    9: <unknown>
    10: <unknown>
    11: <unknown>
    12: <unknown>
    13: <unknown>
    14: git_libgit2_version
    15: BaseThreadInitThunk
    16: RtlUserThreadStart

Context (please complete the following information):

  • OS/Distro + Version: [Windows 10 1909]
  • GitUI Version [0.8.1]
  • Rust version: [N/A]

Additional context
The same problem in pwsh 7.0.2 and cmd.exe, gitui.exe binary from https://github.com/extrawurst/gitui/releases/tag/v0.8.1

@slaughtering slaughtering changed the title Crashes when trying to show log in a git repo with chinese commit messages Crashes when trying to show log in a git repo with chinese commit messages on Windows 10 Jul 9, 2020
@extrawurst
Copy link
Owner

@slaughtering Thanks for reporting this, to be able to reproduce this it would be super helpful to have the causing commit message, are you able to share that one?

@extrawurst extrawurst added the bug Something isn't working label Jul 9, 2020
@extrawurst extrawurst added this to the v0.9 milestone Jul 9, 2020
@slaughtering
Copy link
Author

slaughtering commented Jul 10, 2020

@slaughtering Thanks for reporting this, to be able to reproduce this it would be super helpful to have the causing commit message, are you able to share that one?

Yep, and here is one :
panic: PanicInfo { payload: Any, message: Some(byte index 118 is not a char boundary; it is inside '里' (bytes 117..120) of 1. 导入按钮由选文件改为选目录,因为整个过程中要用到多个mdb文件,这些文件是在程序里写死的,暂且这么来做,有时间了后 再做调整), location: Location { file: "/rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\src\libcore\str\mod.rs", line: 1920, col: 47 } }

The commit message :

  1. 导入按钮由选文件改为选目录,因为整个过程中要用到多个mdb文件,这些文件是在程序里写死的,暂且这么来做,有时间了后再做调整 2. cboxLine增加indexHasChanged事件 3. 到目前为止基本上实现了:点击线路弹出设置对话框的功能

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

2 participants