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

[v2] Windows: random access violations during DispatchMessage #1083

Closed
stffabi opened this issue Jan 17, 2022 · 0 comments · Fixed by leaanthony/winc#12
Closed

[v2] Windows: random access violations during DispatchMessage #1083

stffabi opened this issue Jan 17, 2022 · 0 comments · Fixed by leaanthony/winc#12
Labels
Bug Something isn't working

Comments

@stffabi
Copy link
Collaborator

stffabi commented Jan 17, 2022

Description
We have seen several reports from users with AccessViolations during DispatchMessage/GetMessage in RunMainLoop

Exception 0xc0000005 0x0 0x7ff811db0998 0x7ff911b3d98c
PC=0x7ff911b3d98c
runtime.cgocall(0x86060, 0x9888a0)
    /usr/local/go/src/runtime/cgocall.go:156 +0x4a fp=0xc000115af8 sp=0xc000115ac0 pc=0x2404a
syscall.Syscall(0x7ff967eb0bf0, 0x1, 0xc00037c0f0, 0x0, 0x0)
    /usr/local/go/src/runtime/syscall_windows.go:483 +0xf4 fp=0xc000115b30 sp=0xc000115af8 pc=0x80c74
syscall.Syscall(0x0, 0x100, 0x10, 0x9, 0xc000115be8)
    <autogenerated>:1 +0x2b fp=0xc000115b80 sp=0xc000115b30 pc=0x86f4b
syscall.(*Proc).Call(0x2d507, {0xc00038c020, 0x488c00, 0x82401})
    /usr/local/go/src/syscall/dll_windows.go:183 +0xc6 fp=0xc000115c70 sp=0xc000115b80 pc=0x9e9e6
syscall.(*LazyProc).Call(0xc000188f00, {0xc00038c020, 0x1, 0x1})
    /usr/local/go/src/syscall/dll_windows.go:340 +0x50 fp=0xc000115ca0 sp=0xc000115c70 pc=0x9fd50
github.com/leaanthony/winc/w32.DispatchMessage(...)
    /builds/app/vendor/github.com/leaanthony/winc/w32/user32.go:326
github.com/leaanthony/winc.RunMainLoop()
...

To Reproduce
Steps to reproduce the behaviour: This is very hard, because it only manifests randomly. Fortunatelay we had one user on whose machine it happened during every startup of the Application. Apart from this user, we only had panics which occurred randomly.

Additional context
After some investigation I've found several Go projects, which also run Windows MessageLoops, to have reports of similar AccessViolations during DispatchMessage/GetMessage, e.g. lxn/walk or go-sciter. Many thanks to @zx2c4 who created a PR for lxn/walk#493 which fixed the issue there. It turned out it also fixed our issue for that user.

I'm going to provide a PR for winc which will introduce the same fix as in lxn/walk#493.

@stffabi stffabi added the Bug Something isn't working label Jan 17, 2022
stffabi added a commit to stffabi/winc that referenced this issue Jan 17, 2022
This fixes random AccessViolations during Dispatch/GetMessage.

See lxn/walk#493

Fix wailsapp/wails#1083
stffabi added a commit to stffabi/wails that referenced this issue Jan 17, 2022
MikeSchaap pushed a commit to MikeSchaap/wails that referenced this issue Jan 23, 2022
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

Successfully merging a pull request may close this issue.

1 participant