-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: build with race flag crash with fatal error on windows #1554
Comments
Thanks for reporting this issue and using Wails. The race detector flag also executes some unsafe pointer arithmetic checks, and has found a violation here. This needs to be fixed in the native library used in Wails. For the time being you could simply disable the race detector until we have fix for that and you should be able to run your application. Also sounds like we have never run an app with active race detector on Windows. So there might be other cases as well, which needs some fixes. |
I tried the Minimal Demo in https://github.com/tadvi/winc with
|
Hi @hminbdxxxx - there's a fix in the linked PR. Please let us know how you get on 👍 |
Hi @leaanthony |
Wow, great spotting! Perhaps it needs to be a reference to itself rather than a copy. You could try just a |
@hminbdxxxx we have updated the PR with another approach to fix this. Would it be possible for you to give it another try? |
I believe this is working, however we aren't out of the woods yet as the recent screen dimensions PR seems to now be exhibiting the same behaviour, specifically:
I'll see if I can update this. |
Oh that's interesting, I would have expected this to work because it maps to a valid memory location retrieved by succeeded := w32.EnumDisplayMonitors(dc, nil, syscall.NewCallback(EnumProc), uintptr(unsafe.Pointer(&monitorContainer))) |
I can confirm that not calling |
Pushed a fix. I think this is good to go |
It works fine now, thank you 👍 |
Description
All dependencies are installed. Use
wails init -n example
andwails build -debug -race
, launch the exe and it will showfatal error: checkptr: pointer arithmetic computed bad pointer value
.I tried use
wails build -race
instead and the exe showed nothing.To Reproduce
Expected behaviour
exe and race detactor should work
Screenshots
No response
Attempted Fixes
No response
System Details
Additional context
full stack trace
The text was updated successfully, but these errors were encountered: