fork-dev / TrackerWin

Bug and issue tracker for Fork for Windows
450 stars 10 forks source link

Fork crashes on startup #2232

Closed willl closed 2 weeks ago

willl commented 3 weeks ago

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) at .Main(System.String[]) ```

Fork 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?

DanPristupov commented 3 weeks ago

Did you try to reboot? Did you try to reinstall Fork using installer from the website?

willl commented 3 weeks ago

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.

DanPristupov commented 3 weeks ago

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.

willl commented 3 weeks ago

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

Details ``` Faulting application name: Fork.exe, version: 1.98.0.0, time stamp: 0x664f3f60 Faulting module name: KERNELBASE.dll, version: 10.0.22621.3733, time stamp: 0x44653e19 Exception code: 0xe0434352 Fault offset: 0x000000000005f39c Faulting process ID: 0x0x6630 Faulting application start time: 0x0x1DABC94DD2D12CB Faulting application path: C:\Users\username\AppData\Local\Fork\app-1.98.0\Fork.exe Faulting module path: C:\Windows\System32\KERNELBASE.dll Report ID: 3b025a08-527b-497e-a233-0d08adaa70ba Faulting package full name: Faulting package-relative application ID: ```

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.

App logs ``` πŸ”· 2024-06-12 16:59:48.000 Start IPC server Fork_Pipe25320_AskPass ◽️ 2024-06-12 16:59:48.000 Fork_Pipe25320_AskPass: waiting for next event '49' πŸ”· 2024-06-12 16:59:48.000 Start IPC server Fork_Pipe25320_Default ◽️ 2024-06-12 16:59:48.015 Fork_Pipe25320_Default: waiting for next event '886' πŸ”· 2024-06-12 16:59:48.204 Refresh Theme πŸ”· 2024-06-12 16:59:48.268 Log target: AppData log file πŸ”· 2024-06-12 16:59:48.362 Last update check: 12/06/2024 4:50:03 PM. Next one: 13/06/2024 4:50:03 PM πŸ”· 2024-06-12 16:59:48.566 Restore workspance 'Work' with 2 tabs πŸ”· 2024-06-12 16:59:48.725 RefreshRepositoryData ◽️ 2024-06-12 16:59:48.725 a-repo-name RefreshRepositoryDataGitCommand All ◽️ 2024-06-12 16:59:48.741 4 ms: bt_get_git_config ◽️ 2024-06-12 16:59:48.741 Loading a-repo-name settings πŸ”· 2024-06-12 16:59:48.851 WindowActivated πŸ”· 2024-06-12 16:59:48.883 Refresh 'a-repo-name' data. Updated. πŸ”· 2024-06-12 16:59:48.883 RefreshRepositoryStatus πŸ”· 2024-06-12 16:59:49.014 App start: 254ms, AppInitialization: 394ms, MainWindowOpening: 288ms, MainWindowActivation: 458ms, Total: 1394ms ◽️ 2024-06-12 16:59:49.456 1089 ms: Initialize Paddle πŸ”· 2024-06-12 16:59:49.456 Refresh 'a-repo-name' status. Updated 17 files ```
DanPristupov commented 3 weeks ago

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.

MartinZikmund commented 3 weeks ago

@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.

DanPristupov commented 3 weeks ago

@MartinZikmund check the email

MartinZikmund commented 3 weeks ago

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[])
DanPristupov commented 3 weeks ago

It's so strange that the problem suddenly started occurring for both of you.

willl commented 3 weeks ago

About to head to sleep, but can confirm that my issue also occurs on a private repo. I’ll try the test build tomorrow

DanPristupov commented 3 weeks ago

@willl thanks. Good night!

cristian-recoseanu commented 3 weeks ago

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.

DanPristupov commented 3 weeks ago

@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.

DanPristupov commented 3 weeks ago

Could this be related? https://answers.microsoft.com/en-us/msoffice/forum/all/kb5039211-190454529-breaks-ms-access-2016-and-2013/bfe4bc2f-c87f-46dd-9536-452d195afce7

DanPristupov commented 3 weeks ago

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

cristian-recoseanu commented 3 weeks ago

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.

willl commented 3 weeks ago

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

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) at .Main(System.String[])

And fork log

Fork logs πŸ”· 2024-06-13 08:47:51.170 Start IPC server Fork_Pipe30552_AskPass ◽️ 2024-06-13 08:47:51.170 Fork_Pipe30552_AskPass: waiting for next event '54' πŸ”· 2024-06-13 08:47:51.170 Start IPC server Fork_Pipe30552_Default ◽️ 2024-06-13 08:47:51.170 Fork_Pipe30552_Default: waiting for next event '54' πŸ”· 2024-06-13 08:47:51.378 Refresh Theme πŸ”· 2024-06-13 08:47:51.439 Log target: AppData log file πŸ”· 2024-06-13 08:47:51.518 Last update check: 12/06/2024 4:50:03 PM. Next one: 13/06/2024 4:50:03 PM πŸ”· 2024-06-13 08:47:51.724 Restore workspance 'Work' with 2 tabs πŸ”· 2024-06-13 08:47:51.897 RefreshRepositoryData ◽️ 2024-06-13 08:47:51.897 a-repo-name RefreshRepositoryDataGitCommand All ◽️ 2024-06-13 08:47:51.897 3 ms: bt_get_git_config ◽️ 2024-06-13 08:47:51.897 Loading a-repo-name settings πŸ”· 2024-06-13 08:47:51.996 WindowActivated πŸ”· 2024-06-13 08:47:52.067 Refresh 'a-repo-name' data. Updated. πŸ”· 2024-06-13 08:47:52.067 RefreshRepositoryStatus πŸ”· 2024-06-13 08:47:52.105 App start: 258ms, AppInitialization: 395ms, MainWindowOpening: 285ms, MainWindowActivation: 381ms, Total: 1319ms πŸ”· 2024-06-13 08:47:52.459 Loaded OAuth credentials for willl@https://github.com πŸ”· 2024-06-13 08:47:52.524 Refresh 'a-repo-name' status. Updated 17 files ◽️ 2024-06-13 08:47:52.600 1066 ms: Initialize Paddle ◽️ 2024-06-13 08:47:53.779 1322ms: GET https://api.github.com/notifications?page=1&per_page=70&all=true (200) ⚠️ 2024-06-13 08:47:53.779 Cannot parse notification type 'Release' ⚠️ 2024-06-13 08:47:53.779 Cannot parse notification type 'Release'
willl commented 3 weeks ago

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 πŸ€”

DanPristupov commented 3 weeks ago

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.

https://cdn.fork.dev/prerelease/ForkWin-1.98.29.zip

cristian-recoseanu commented 3 weeks ago

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.

https://cdn.fork.dev/prerelease/ForkWin-1.98.29.zip

Still crashes for me.

willl commented 3 weeks ago

Also still crashes for me. Error messages in the fork log and event viewer look quite similar

DanPristupov commented 3 weeks ago

Can you try this, please? https://cdn.fork.dev/prerelease/ForkWin-1.98.30.zip

oleomachado commented 3 weeks ago

I tried 1.98.30 and continues to crash.

This might give you a hint:

image

EDIT: This is the main(), captured from inside VS

willl commented 3 weeks ago

Still crashing. Event viewer log is identical, fork log now has less data

Details πŸ”· 2024-06-13 16:51:16.401 Refresh Theme πŸ”· 2024-06-13 16:51:16.476 Log target: AppData log file πŸ”· 2024-06-13 16:51:16.574 Last update check: 12/06/2024 4:50:03 PM. Next one: 13/06/2024 4:50:03 PM πŸ”· 2024-06-13 16:51:16.741 Restore workspance 'Work' with 2 tabs πŸ”· 2024-06-13 16:51:16.917 RefreshRepositoryData ◽️ 2024-06-13 16:51:16.922 a-repo-name RefreshRepositoryDataGitCommand All ◽️ 2024-06-13 16:51:16.922 Loading ow-ready-contracts settings πŸ”· 2024-06-13 16:51:17.060 WindowActivated πŸ”· 2024-06-13 16:51:17.114 Refresh 'a-repo-name' data. Updated. πŸ”· 2024-06-13 16:51:17.114 RefreshRepositoryStatus πŸ”· 2024-06-13 16:51:17.240 App start: 294ms, AppInitialization: 488ms, MainWindowOpening: 258ms, MainWindowActivation: 507ms, Total: 1547ms ◽️ 2024-06-13 16:51:17.785 1209 ms: Initialize Paddle πŸ”· 2024-06-13 16:51:17.886 Refresh 'a-repo-name' status. Updated 17 files
DanPristupov commented 3 weeks ago

Can you this this build? https://cdn.fork.dev/prerelease/Fork-1.98.31.zip

willl commented 3 weeks ago

Still crashing

Fork log πŸ”· 2024-06-13 17:22:58.607 Start IPC server Fork_Pipe31344_AskPass ◽️ 2024-06-13 17:22:58.607 Fork_Pipe31344_AskPass: waiting for next event '539' πŸ”· 2024-06-13 17:22:58.607 Start IPC server Fork_Pipe31344_Default ◽️ 2024-06-13 17:22:58.607 Fork_Pipe31344_Default: waiting for next event '539' πŸ”· 2024-06-13 17:22:59.026 Refresh Theme πŸ”· 2024-06-13 17:22:59.135 Log target: AppData log file πŸ”· 2024-06-13 17:22:59.231 Last update check: 12/06/2024 4:50:03 PM. Next one: 13/06/2024 4:50:03 PM πŸ”· 2024-06-13 17:22:59.558 Restore workspance 'Work' with 2 tabs πŸ”· 2024-06-13 17:22:59.757 RefreshRepositoryData ◽️ 2024-06-13 17:22:59.757 a-repo-name RefreshRepositoryDataGitCommand All ◽️ 2024-06-13 17:22:59.827 Loading a-repo-name settings πŸ”· 2024-06-13 17:22:59.858 WindowActivated ◽️ 2024-06-13 17:22:59.858 103 ms: bt_get_git_config πŸ”· 2024-06-13 17:23:00.007 App start: 591ms, AppInitialization: 685ms, MainWindowOpening: 417ms, MainWindowActivation: 455ms, Total: 2147ms πŸ”· 2024-06-13 17:23:00.085 Loaded OAuth credentials for willl@https://github.com πŸ”· 2024-06-13 17:23:00.121 Refresh 'a-repo-name' data. Updated. πŸ”· 2024-06-13 17:23:00.122 RefreshRepositoryStatus ◽️ 2024-06-13 17:23:00.401 1168 ms: Initialize Paddle πŸ”· 2024-06-13 17:23:00.735 Refresh 'a-repo-name' status. Updated 17 files ◽️ 2024-06-13 17:23:00.849 766ms: GET https://api.github.com/notifications?page=1&per_page=70&all=true (200) ⚠️ 2024-06-13 17:23:00.849 Cannot parse notification type 'Release' ⚠️ 2024-06-13 17:23:00.849 Cannot parse notification type 'Release'
Event viewer log 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 .Main(System.String[])
JRahnama commented 3 weeks ago

I am having same issue. It seems it all happened after windows update yesterday. Here is my repro step:

  1. New installation of fork
  2. Until cloning any repository it stays up on the screen
  3. the moment I cloned a public repo for example: https://github.com/dotnet/SqlClient.git cloning completed and app crashed after 5-10 seconds

image

DanPristupov commented 3 weeks ago

Can anyone try this one? https://cdn.fork.dev/prerelease/Fork-1.98.33.zip

DanPristupov commented 3 weeks ago

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 ❀️!

willl commented 3 weeks ago

@DanPristupov Happy to help. Well done on figuring that one out!

cristian-recoseanu commented 3 weeks ago

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!

DanPristupov commented 3 weeks ago

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?

willl commented 3 weeks ago

Here's the log.

Details πŸ”· 2024-06-13 18:22:38.983 Start IPC server Fork_Pipe38496_AskPass ◽️ 2024-06-13 18:22:38.983 Fork_Pipe38496_AskPass: waiting for next event '73' πŸ”· 2024-06-13 18:22:38.998 Start IPC server Fork_Pipe38496_Default ◽️ 2024-06-13 18:22:38.998 Fork_Pipe38496_Default: waiting for next event '432' πŸ”· 2024-06-13 18:22:39.370 Refresh Theme πŸ”· 2024-06-13 18:22:39.464 Log target: AppData log file πŸ”· 2024-06-13 18:22:39.582 Last update check: 13/06/2024 6:08:11 PM. Next one: 14/06/2024 6:08:11 PM πŸ”· 2024-06-13 18:22:39.840 Restore workspance 'Work' with 1 tabs πŸ”· 2024-06-13 18:22:40.014 RefreshRepositoryData ◽️ 2024-06-13 18:22:40.014 a-repo-name RefreshRepositoryDataGitCommand All ◽️ 2024-06-13 18:22:40.076 Loading a-repo-name settings ◽️ 2024-06-13 18:22:40.106 85 ms: bt_get_git_config πŸ”· 2024-06-13 18:22:40.159 WindowActivated πŸ”· 2024-06-13 18:22:40.243 Refresh 'a-repo-name' data. Updated. πŸ”· 2024-06-13 18:22:40.243 RefreshRepositoryStatus πŸ”· 2024-06-13 18:22:40.266 App start: 513ms, AppInitialization: 622ms, MainWindowOpening: 370ms, MainWindowActivation: 432ms, Total: 1938ms πŸ”· 2024-06-13 18:22:40.659 Loaded OAuth credentials for willl@https://github.com πŸ”· 2024-06-13 18:22:40.707 Requesting SHGetFileInfo for .cs... πŸ”· 2024-06-13 18:22:40.734 Requesting SHGetFileInfo for .csproj... ◽️ 2024-06-13 18:22:40.734 1147 ms: Initialize Paddle πŸ”· 2024-06-13 18:22:40.734 Refresh 'a-repo-name' status. Updated 17 files πŸ”· 2024-06-13 18:22:40.754 Requesting SHGetFileInfo for .sql... πŸ”· 2024-06-13 18:22:40.768 Requesting SHGetFileInfo for .config... πŸ”· 2024-06-13 18:22:40.768 Requesting SHGetFileInfo for .aspx... πŸ”· 2024-06-13 18:22:40.785 Requesting SHGetFileInfo for .vb... πŸ”· 2024-06-13 18:22:40.797 Requesting SHGetFileInfo for .proj... πŸ”· 2024-06-13 18:22:40.797 Requesting SHGetFileInfo for .json... πŸ”· 2024-06-13 18:22:40.797 Requesting SHGetFileInfo for .rptproj... πŸ”· 2024-06-13 18:22:40.797 Requesting SHGetFileInfo for .sln... ◽️ 2024-06-13 18:22:41.666 1011ms: GET https://api.github.com/notifications?page=1&per_page=70&all=true (200) ⚠️ 2024-06-13 18:22:41.674 Cannot parse notification type 'Release' ⚠️ 2024-06-13 18:22:41.674 Cannot parse notification type 'Release'
StepKie commented 3 weeks ago

Corroborating frequent crashes after updating to the latest version. Never had that issue before.

DanPristupov commented 3 weeks ago

@StepKie Does 1.98.33 work for you? On what file 1.98.34 crashes?

oleomachado commented 3 weeks ago

1.98.33 is working fine for me. Thanks!

DanPristupov commented 3 weeks ago

@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 commented 3 weeks ago

@StepKie Does 1.98.33 work for you? On what file 1.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:

fork.log

fork-crash
cristian-recoseanu commented 3 weeks ago

@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.

DanPristupov commented 3 weeks ago

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?

https://cdn.fork.dev/prerelease/ForkWin-1.98.35.zip

DanPristupov commented 3 weeks ago

@StepKie I publish develop builds here as .zip archives. You only need to extract them to a folder and run fork.exe.

cristian-recoseanu commented 3 weeks ago

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?

https://cdn.fork.dev/prerelease/ForkWin-1.98.35.zip

1.98.35 still crashes for me.

StepKie commented 3 weeks ago

@DanPristupov yes, same crash behavior I described above with the zip you just posted

I just open Fork, click on Changes, crash

fork.log

DanPristupov commented 3 weeks ago

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?

StepKie commented 3 weeks ago

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'

StepKie commented 3 weeks ago

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:

image

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

DanPristupov commented 3 weeks ago

@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?

https://cdn.fork.dev/prerelease/ForkWin-1.98.37.zip

StepKie commented 3 weeks ago

@DanPristupov unfortunately, still crashes. First half of log is the same, but stops after the Save accounts line

DanPristupov commented 3 weeks ago

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.

DanPristupov commented 3 weeks ago

OK, here is one more attempt: https://cdn.fork.dev/prerelease/ForkWin-1.98.38.zip

Can you try it, please?