Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Crash on Windows when first opening a diff #2

Open
vfaronov opened this issue May 31, 2021 · 0 comments
Open

Crash on Windows when first opening a diff #2

vfaronov opened this issue May 31, 2021 · 0 comments

Comments

@vfaronov
Copy link
Owner

vfaronov commented May 31, 2021

On Windows, when you request a diff in Gunison, and Windows doesn’t recognize the .diff file type, it pops up a window to select an application. On my Windows 8.1 system, Gunison crashes either immediately when that window pops up, or once you make a selection in it. “exit status 3221226356” is printed to the console, which is 0xC0000374 = STATUS_HEAP_CORRUPTION.

If Windows already has an application associated with .diff, that application starts and Gunison doesn’t crash. The association can be reset by deleting the registry key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.diff.

I couldn’t quickly reduce this to a reproducer program without GTK. May be some kind of conflict with GTK.

Gunison opens files via github.com/skratchdot/open-golang, which runs rundll32.exe url.dll,FileProtocolHandler. I tried replacing it with a direct call to ShellExecute, like this:

import "golang.org/x/sys/windows"
p, _ := windows.UTF16PtrFromString(pathToDiff)
windows.ShellExecute(0, nil, p, nil, nil, windows.SW_NORMAL)

— but this changed nothing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant