Closed willl closed 3 months ago
Did you try to reboot? Did you try to reinstall Fork using installer from the website?
Yep, I did reboot and have done a fresh install from the website.
First load after the re-install was fine. But after I selected my repo, it started crashing again.
Can you try to reinstall and open some other repo?
And here's the logs from Event Viewer
It looks like the crash occurs on some other thread. Could you double check that there's no other call stack info in the Event Viewer?
P.S.
I had installed Git Butler, but then removed that tool, so unsure why there's still a reference to it in fork's logs.
Because it created and left some references in your repo. You can only remove them using low-lever git update-ref -d <ref>
command. However, it's not related to the crash.
It looks like the crash occurs on some other thread. Could you double check that there's no other call stack info in the Event Viewer?
Unfortunately, that's all that I can see.
There's a second log event, but there's nothing else relevant in there
You can only remove them using low-lever
git update-ref -d <ref>
command.
I did this and it did indeed remove that error from the logs.
Tried to re-install again after this. It loads other repos fine, but after trying to load my main repo it again crashes on load. Basically I see the UI for fork, and it seems to be trying to retrieve something from Github, and then it freezes up and crashes.
Thank you for the details.
π· 2024-06-12 16:59:49.456 Refresh 'a-repo-name' status. Updated 17 files
Is 'a-repo-name' the repo which crashes or it's the other one?
Basically I see the UI for fork, and it seems to be trying to retrieve something from Github, and then it freezes up and crashes.
Why do you think it connects to GitHub? It shouldn't be the case because automatic fetch starts only after 10 minutes after the application starts.
Can you try to disable internet connection and start Fork again? Does it still crash?
Can you send me an email to support@fork.dev and I'll make a build for you with additional logging.
@DanPristupov I am experiencing the same problem, after I cloned a new repository, Fork starts crashing immediately on startup. I removed the clone to see if it helps, but the problem remains. I will also e-mail for the special build. I haven't used Git Butler, this happens immediately after cloning a relatively simple repository for me.
@MartinZikmund check the email
Upon further testing on my side it seems the crashes happen for some specific repositories only - so far for all my private GitHub repositories for example.
Can also confirm I'm seeing the same TargetInvocationException
in event viewer:
Application: Fork.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Exception Info: System.Reflection.TargetInvocationException
at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
at <Module>.Main(System.String[])
It's so strange that the problem suddenly started occurring for both of you.
About to head to sleep, but can confirm that my issue also occurs on a private repo. Iβll try the test build tomorrow
@willl thanks. Good night!
Just to say this also started happening for me today. Funnily enough my PC did do a Windows cumulative update this morning (KB5039211 for Windows 10 22H2). The reason I'm bringing it up is because after Fork crashed when opening one of my repos I actually got File Explorer to crash several times when trying to open that same folder.
@cristian-recoseanu thank you for reporting this. I also suspect a Windows update, but couldn't find a confirmation yet. Currently 4 people started having this problem today.
Could you try this build (https://cdn.fork.dev/prerelease/ForkWin-1.98.27.zip), please? Extract it somewhere and run fork.exe. It seems that crash happens when a particular commit is selected. The 1.98.27 build doesn't select any commit by default.
I made an attempt to do some things differently. I don't have much hope, but who knows. Can you try if this build crashes? https://cdn.fork.dev/prerelease/ForkWin-1.98.28.zip
Both ForkWin-1.98.27 and ForkWin-1.98.28 crash on startup against the problematic repo. It seems removing "ActiveRepository" from settings.json allows the application to startup as it no longer starts with that last repo as active, and as expected the moment you go to the particular repo tab it crashes again.
After trying 1.98.28, it also crashes
It's still crashing on startup for me on the problematic repo (a-repo-name
).
Here's the event viewer log
And fork log
Funnily enough my PC did do a Windows cumulative update this morning (KB5039211 for Windows 10 22H2).
I also did a Windows Update before the issue occurred π€
I made a new build. Can you try whether it crashes or not? I'm commenting out random parts of the application trying to find out which one causes the crash.
I made a new build. Can you try whether it crashes or not? I'm commenting out random parts of the application trying to find out which one causes the crash.
Still crashes for me.
Also still crashes for me. Error messages in the fork log and event viewer look quite similar
Can you try this, please? https://cdn.fork.dev/prerelease/ForkWin-1.98.30.zip
I tried 1.98.30 and continues to crash.
This might give you a hint:
EDIT: This is the main(), captured from inside VS
Still crashing. Event viewer log is identical, fork log now has less data
Can you this this build? https://cdn.fork.dev/prerelease/Fork-1.98.31.zip
Still crashing
I am having same issue. It seems it all happened after windows update yesterday. Here is my repro step:
Can anyone try this one? https://cdn.fork.dev/prerelease/Fork-1.98.33.zip
The crash seems to be caused by requesting WinAPI an icon for a changed file! The 1.98.33
doesn't request icons and shouldn't crash.
@oleomachado and @willl helped to find that β€οΈ!
@DanPristupov Happy to help. Well done on figuring that one out!
The crash seems to be caused by requesting WinAPI an icon for a changed file! The
1.98.33
doesn't request icons and shouldn't crash.@oleomachado and @willl helped to find that β€οΈ!
Can confirm 1.98.33 does not crash. Well done!
If anyone curious. Fork uses SHGetFileInfoW
WinAPI function to get the file icon. Somehow it started crashing (https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shgetfileinfow).
Now I made a build which logs every file name before requesting the icon. This build must crash, but it will help to find out if a particular file extension is crashing.
https://cdn.fork.dev/prerelease/Fork-1.98.34.zip
The log file is located at %localappdata%\fork\logs\fork.log
Can you try it and tell the last file name (or extension) in the log?
Here's the log.
Corroborating frequent crashes after updating to the latest version. Never had that issue before.
@StepKie
Does 1.98.33
work for you?
On what file 1.98.34
crashes?
1.98.33 is working fine for me. Thanks!
@cristian-recoseanu
I actually got File Explorer to crash several times when trying to open that same folder.
It's possible if getting file icon using WinAPI crashes. If so, it should be a global problem.
@StepKie Does
1.98.33
work for you? On what file1.98.34
crashes?
Sorry, how do I find out which version I am running on?
About Fork just says 1.98.0.0, and Check for Updates does not find any (I have set Development channel as the source in Preferences)
It crashes in certain scenarios. Sometimes it even crashes when I have a commit selected and click on Changes to view the diff... Other times it has crashed when I had a commit selected and was trying to Strg + Leftclick another commit to see the combined diff.
sorry, I hope this is the right issue to add my crash to, I jumped to conclusion it probably is a similar cause since I saw a crash issue in the tracker with 33 comments.
Edit:
@DanPristupov Added screenshot of where it crashes reliably, and log file after crash:
@cristian-recoseanu
I actually got File Explorer to crash several times when trying to open that same folder.
It's possible if getting file icon using WinAPI crashes. If so, it should be a global problem.
Yes, it seems like something fundamental is broken in WinAPI.
For me 1.98.34
crashes after trying to load the icon for the *.sln file.
I made one more attempt. I made Fork only request the the file icon, but not process is in any way (to exclude possibility that we do something wrong on our side). Can you try it crashes, please?
@StepKie I publish develop builds here as .zip archives. You only need to extract them to a folder and run fork.exe.
I made one more attempt. I made Fork only request the the file icon, but not process is in any way (to exclude possibility that we do something wrong on our side). Can you try it crashes, please?
1.98.35 still crashes for me.
@DanPristupov yes, same crash behavior I described above with the zip you just posted
I just open Fork, click on Changes, crash
Looks like it crashes on the .sln
icon. Let's try to skip it :).
https://cdn.fork.dev/prerelease/ForkWin-1.98.36.zip
Does it crash?
yes
π· 2024-06-13 12:16:34.331
|_ |_ _ _ Fork 1.98.36.0 | | | / \ | | | |/ / Git: C:\Users\s.kieburg\AppData\Local\Fork\gitInstance\2.45.1\bin\git.exe | | | | | | \ | \ Update Channel: Stable || | ___/ ||__\ ||_\ https://fork.dev ||
π· 2024-06-13 12:16:34.357 Start IPC server Fork_Pipe43028_AskPass β½οΈ 2024-06-13 12:16:34.357 Fork_Pipe43028_AskPass: waiting for next event '963' π· 2024-06-13 12:16:34.357 Start IPC server Fork_Pipe43028_Default β½οΈ 2024-06-13 12:16:34.357 Fork_Pipe43028_Default: waiting for next event '963' π· 2024-06-13 12:16:34.599 Refresh Theme π· 2024-06-13 12:16:34.657 Log target: AppData log file π· 2024-06-13 12:16:34.754 Last update check: 13.06.2024 10:39:33. Next one: 14.06.2024 10:39:33 π· 2024-06-13 12:16:34.903 Restore workspance 'Work' with 16 tabs β½οΈ 2024-06-13 12:16:35.001 2 ms: bt_get_git_config β½οΈ 2024-06-13 12:16:35.043 0 ms: bt_get_git_config π· 2024-06-13 12:16:35.183 RefreshRepositoryData β½οΈ 2024-06-13 12:16:35.183 Lastrada RefreshRepositoryDataGitCommand All β½οΈ 2024-06-13 12:16:35.183 0 ms: bt_get_git_config β½οΈ 2024-06-13 12:16:35.183 Loading Lastrada settings β½οΈ 2024-06-13 12:16:35.194 0 ms: bt_get_git_config β½οΈ 2024-06-13 12:16:35.234 478 ms: Initialize Paddle π· 2024-06-13 12:16:35.403 WindowActivated π· 2024-06-13 12:16:35.442 App start: 365ms, AppInitialization: 513ms, MainWindowOpening: 238ms, MainWindowActivation: 548ms, Total: 1663ms π· 2024-06-13 12:16:35.517 Loaded OAuth credentials for Hottemax@https://github.com π· 2024-06-13 12:16:35.520 Refresh 'Lastrada' data. Updated. π· 2024-06-13 12:16:35.520 RefreshRepositoryStatus π· 2024-06-13 12:16:35.660 Refresh 'Lastrada' status. Updated 0 files β½οΈ 2024-06-13 12:16:35.940 425ms: GET https://api.github.com/notifications?page=1&per_page=70&all=true (200) β οΈ 2024-06-13 12:16:35.940 Cannot parse 'url' β οΈ 2024-06-13 12:16:35.940 Cannot parse GitServiceNotification β οΈ 2024-06-13 12:16:35.940 Cannot parse 'url' β οΈ 2024-06-13 12:16:35.940 Cannot parse GitServiceNotification β οΈ 2024-06-13 12:16:35.940 Cannot parse 'url' β οΈ 2024-06-13 12:16:35.940 Cannot parse GitServiceNotification β οΈ 2024-06-13 12:16:35.940 Cannot parse 'url' β οΈ 2024-06-13 12:16:35.940 Cannot parse GitServiceNotification β οΈ 2024-06-13 12:16:35.940 Cannot parse notification type 'Release' π· 2024-06-13 12:16:35.962 Save accounts π· 2024-06-13 12:16:35.990 Received 1 new notifications π· 2024-06-13 12:16:37.693 Requesting SHGetFileInfo for '.editorconfig' π· 2024-06-13 12:16:37.693 Requesting SHGetFileInfo for '.gitignore' π· 2024-06-13 12:16:37.693 Requesting SHGetFileInfo for '.yml' π· 2024-06-13 12:16:37.693 Requesting SHGetFileInfo for '.issuetracker' π· 2024-06-13 12:16:37.693 Requesting SHGetFileInfo for '.xd2' π· 2024-06-13 12:16:37.708 Requesting SHGetFileInfo for '.bat' π· 2024-06-13 12:16:37.708 Requesting SHGetFileInfo for '.ps1' π· 2024-06-13 12:16:37.708 Requesting SHGetFileInfo for '.sql' π· 2024-06-13 12:16:37.708 Requesting SHGetFileInfo for '.py' π· 2024-06-13 12:16:37.708 Requesting SHGetFileInfo for '.vcxproj' π· 2024-06-13 12:16:37.721 Requesting SHGetFileInfo for '.cpp' π· 2024-06-13 12:16:37.721 Requesting SHGetFileInfo for '.h' π· 2024-06-13 12:16:37.721 Requesting SHGetFileInfo for '.hpp' π· 2024-06-13 12:16:37.721 Requesting SHGetFileInfo for '.rc' π· 2024-06-13 12:16:37.721 Requesting SHGetFileInfo for '.filters' π· 2024-06-13 12:16:38.114 Requesting SHGetFileInfo for '.bmp' π· 2024-06-13 12:16:38.114 Requesting SHGetFileInfo for '.txt' π· 2024-06-13 12:16:38.114 Requesting SHGetFileInfo for '.sln' π· 2024-06-13 12:16:38.114 return empty icon for '.sln'
sorry, for narrowing down some more info: it seems that this is a really huge diff since somebody merged an ancient concurrent branch into master:
so maybe it runs into some kind of cache / paging issue or something? Because I can reliably reproduce for this merge commit, but clicking on changes for other commits/in other repos does not cause a crash
@StepKie
It is a memory corruption. And once an application memory is corrupted it can crash in a random place. That's why it's so difficult to find and fix. In majority of cases .net protects the developer from this kind of issues, but in this case we call a C function, which is unmanaged.
I noticed that the docs say that we must NOT call SHGetFileInfo
on UI thread (https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shgetfileinfow#remarks)
You should call this function from a background thread. Failure to do so could cause the UI to stop responding.
So, I moved the call to a background thread. Can you try it?
@DanPristupov unfortunately, still crashes. First half of log is the same, but stops after the Save accounts
line
OK, I'm out of ideas βΉοΈ.
I will probably make a build without file icons for people who can't run Fork and will wait for a fix from Microsoft.
OK, here is one more attempt: https://cdn.fork.dev/prerelease/ForkWin-1.98.38.zip
Can you try it, please?
Here's the content from the log file
Fork logs
``` π· 2024-06-12 15:47:30.907 Start IPC server Fork_Pipe29788_AskPass β½οΈ 2024-06-12 15:47:30.907 Fork_Pipe29788_AskPass: waiting for next event '214' π· 2024-06-12 15:47:30.907 Start IPC server Fork_Pipe29788_Default β½οΈ 2024-06-12 15:47:30.907 Fork_Pipe29788_Default: waiting for next event '214' π· 2024-06-12 15:47:31.604 Refresh Theme π· 2024-06-12 15:47:31.768 Log target: AppData log file π· 2024-06-12 15:47:32.022 Last update check: 12/05/2024 12:00:00 AM. Next one: 13/05/2024 12:00:00 AM π· 2024-06-12 15:47:32.422 Restore workspance 'Work' with 1 tabs π· 2024-06-12 15:47:32.648 RefreshRepositoryData β½οΈ 2024-06-12 15:47:32.664 a-repo-name RefreshRepositoryDataGitCommand All β½οΈ 2024-06-12 15:47:32.680 12 ms: bt_get_git_config β½οΈ 2024-06-12 15:47:32.695 Loading a-repo-name settings π· 2024-06-12 15:47:32.805 WindowActivated β½οΈ 2024-06-12 15:47:32.931 912 ms: Initialize Paddle β 2024-06-12 15:47:32.976 Cannot parse reference refs/gitbutler/develop π· 2024-06-12 15:47:32.976 App start: 1656ms, AppInitialization: 1159ms, MainWindowOpening: 645ms, MainWindowActivation: 566ms, Total: 4026ms π· 2024-06-12 15:47:33.108 Refresh 'a-repo-name' data. Updated. π· 2024-06-12 15:47:33.108 RefreshRepositoryStatus π· 2024-06-12 15:47:34.258 Refresh 'a-repo-name' status. Updated 17 files ``` I changed the local repo name to be `a-repo-name`. The original name is 3 words separated by a single dash.I had installed Git Butler, but then removed that tool, so unsure why there's still a reference to it in fork's logs.
And here's the logs from Event Viewer
Event Viewer entry
``` Application: Fork.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.AccessViolationException Exception Info: System.Reflection.TargetInvocationException at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[]) at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) atFork was working fine on this machine yesterday. And Git Butler was installed alongside with Fork a few months ago without issue (but only used once). I only removed Git Butler after experiencing issues with Fork, so I don't think it's the issue?
Happy to attempt to investigate this further if anyone has any hints as to what to look for?