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

[BUG] 文件历史崩溃 #888

Closed
emptylight370 opened this issue Jan 10, 2025 · 17 comments
Closed

[BUG] 文件历史崩溃 #888

emptylight370 opened this issue Jan 10, 2025 · 17 comments
Assignees
Labels
bug Something isn't working os-windows This issue only exists on Windows requires-dependencies-update Belongs to some dependencies

Comments

@emptylight370
Copy link

emptylight370 commented Jan 10, 2025

English Translated by @goran-w, thank you!

[BUG] File history crash

Description

When I select a file in the file list to view the file history, a blank file history panel opens, and then the entire app becomes unresponsive. The same goes for tracing back line by line. If you then switch out of the application, you cannot switch back again and can only stop running.

Reproduction steps

  1. First open the file list
  2. Then select a file
  3. Right-click to open the file history or trace back line by line.
  4. The application opens a new panel and then does not respond to user operations.

Environment

  • Windows 11 23h2
  • Git 2.47.1.Windows.1
  • GPGSign OpenGPG
  • Merger tool VSCode

Additional Information

If you need assistance locating or resolving the issue, please let me know.

描述

当我在文件列表中选中一个文件查看文件历史时,会打开一个空白的文件历史面板,随后整个应用会无响应。逐行追溯也是一样。随后如果切换出应用则无法重新切换回去,只能停止运行。

复现步骤

  1. 首先打开文件列表
  2. 然后选中一个文件
  3. 右键打开文件历史或者逐行追溯
  4. 应用打开新的面板随后不响应用户操作

环境

  • Windows 11 23h2
  • Git 2.47.1.Windows.1
  • GPGSign OpenGPG
  • 合并工具 VSCode

附加信息

如果需要协助来定位或解决问题,请告诉我怎么做。

@love-linger love-linger self-assigned this Jan 10, 2025
@love-linger love-linger added bug Something isn't working need-more-info Extra information or replay is needed labels Jan 10, 2025
@love-linger
Copy link
Collaborator

love-linger commented Jan 10, 2025

您能提供一个可以复现该问题的仓库吗?我这里的仓库都无法复现该问题。

我本地有个仓库可以复现该问题

@emptylight370
Copy link
Author

我的本地仓库都可以复现这个问题。我因此怀疑跟我的本地环境有关。一个可供复现的仓库是 emptylight370/siyuan-vscodelite-edit
如果有需要的话,我可以在本地测试一些Git命令的输出。

@love-linger
Copy link
Collaborator

心态崩了,只要我启动VS调试,这个问题就无法复现,而且即使使用发布包,只要这个文件出现过问题,强制关闭SourceGit后,再尝试就不出现了……

@love-linger
Copy link
Collaborator

目前确定是有问题,需要找到一个可以稳定复现的方式

@emptylight370
Copy link
Author

目前确定是有问题,需要找到一个可以稳定复现的方式

(sad) 我的电脑上目前稳定复现,不过我没有调试可用的环境。

@love-linger
Copy link
Collaborator

love-linger commented Jan 10, 2025

我提交了一版修复,可能的原因是UI上的Loading动画Block了主线程,因为经过调试输出,QueryCommits确认已经正确执行,但Dispatcher.UIThread.Invoke的操作并未被触发。目前我本地已经无法重现该问题,您可以下载最新的CI产出来测试该问题是否已经解决,地址 https://github.com/sourcegit-scm/sourcegit/actions/runs/12702768016

@love-linger
Copy link
Collaborator

哦吼,我在另一个库中仍然重现了这一问题

@emptylight370
Copy link
Author

经过测试,在启动后的第一次可以正常加载,之后第二次不管是不是同一个存储库甚至同一个文件,都会触发卡死情况

@love-linger
Copy link
Collaborator

定位到问题了,应该不是SourceGit的,是AvaloniaUI的,卡在Window.Open上了,UI线程整个卡死了。
image

目前正在想解决办法

@love-linger
Copy link
Collaborator

测试了一下macOS,应该只是Windows平台有问题。

@love-linger
Copy link
Collaborator

确定了,AvaloniaUI的问题 AvaloniaUI/Avalonia#16840

@love-linger
Copy link
Collaborator

image

同时该问题已经有相关PR被合并,并被标记为backport-candidate-11.2.x,应该会在11.2.x的下一个版本被修复。目前项目使用的是11.2.3

@love-linger love-linger added os-windows This issue only exists on Windows requires-dependencies-update Belongs to some dependencies and removed need-more-info Extra information or replay is needed labels Jan 10, 2025
@emptylight370
Copy link
Author

那就等着后端修复了

@emptylight370
Copy link
Author

NOT FIX IN 2025.03

@love-linger
Copy link
Collaborator

是的,目前AvaloniaUI并未发布新的版本

@goran-w
Copy link
Contributor

goran-w commented Feb 12, 2025

Title & description in English (Google-translated) :

[BUG] File history crash

Description
When I select a file in the file list to view the file history, a blank file history panel opens, and then the entire app becomes unresponsive. The same goes for tracing back line by line. If you then switch out of the application, you cannot switch back again and can only stop running.

Reproduction steps

  1. First open the file list
  2. Then select a file
  3. Right-click to open the file history or trace back line by line.
  4. The application opens a new panel and then does not respond to user operations.

Environment

  • Windows 11 23h2
  • Git 2.47.1.Windows.1
  • GPGSign OpenGPG
  • Merger tool VSCode

Additional Information
If you need assistance locating or resolving the issue, please let me know.

@love-linger
Copy link
Collaborator

Fixed. You can try the latest CI build from Github Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working os-windows This issue only exists on Windows requires-dependencies-update Belongs to some dependencies
Projects
None yet
Development

No branches or pull requests

3 participants