Open miklaine opened 1 year ago
Experiencing the same on Windows 10 22H2 (19045.2486) with similar usage. It seems to be happening after a certain amount of data is transmitted. Also sometimes I don't get a crash, it just stops receiving data.
Similar problem here. My program kept crashing after starting sending data
Same is for me. My app connects to 2 Switchbots, subscribes to notifications and writes to each device at least once per 2 minutes (to keep connection alive). Crashes after 2-7 minutes without panicing, like ExitProcess is called inside WinRT, it only prints "Process xxx has exited with status 0xc0000005".
But sometimes the app doesn't crash, it stops receiving notifications instead. And if I don't enable notifications at all it just works fine (a poor way out though).
I also have problems with my app crashing on windows after receiving data for a few seconds, i don't get a stack trace however, just exit status 0xc0000005 (Access Violation)
Have you checked whether the latest release of the bluetooth package fixes this issue? It may have been fixed in https://github.com/tinygo-org/bluetooth/pull/208.
It's not fixed by #208
for test i'm using GOOS=windows GOARCH=amd64 tinygo.org/x/bluetooth v0.8.1-0.20240221113924-0087e0549b0b (dev branch today) github.com/saltosystems/winrt-go v0.0.0-20240110120258-ad49e9790c38
if i set GOGC="off" (turning of garbage collector) then it stops crashing
if i set GOGC="off" (turning of garbage collector) then it stops crashing
That's very useful information! Sounds like it might be a finalizer that incorrectly frees some memory. @jagobagascon any idea what might be wrong here?
@aykevl I think we are mixing different problems here. Setting GOGC="off"
does not help with the error we are seeing in 32 bit windows (at least for me). I still get the exit status 0xc0000005
.
This issue was originally opened for an issue we fixed about a year ago:
I our case the exception seems to be happening on a Windows DLL 😕 => https://github.com/saltosystems/winrt-go/issues/83
@aykevl I think we are mixing different problems here. Setting
GOGC="off"
does not help with the error we are seeing in 32 bit windows (at least for me). I still get theexit status 0xc0000005
.This issue was originally opened for an issue we fixed about a year ago:
- fatal error: unexpected signal during runtime execution saltosystems/winrt-go#63
- codegen: remove go pointers from structs allocated in the heap saltosystems/winrt-go#64
I our case the exception seems to be happening on a Windows DLL 😕 => saltosystems/winrt-go#83
I have separate issues, the 32bit issue i am talking to you in https://github.com/saltosystems/winrt-go/issues/83 about is a separate thing. It's still crashing no matter GC or not when i build it 32bit
What i described in here I am hitting when compiling with GOARCH=amd64
if i build with 64bit and run with GOGC=off then the 64 bit program runs fine and i can talk to the device back and fourth without problems. but as soon as i turn on GC again it crashes after receiving data for a a few second
While integrating a 3rd party BLE device on Windows 10, I encountered a repeated crash after 3-4 minutes of data transmission. The device continues to work normally, but the app crashes. Based on the logs, it appears that the issue is coming from the CGO side. The crash also happens when the app's memory footprint reaches ~32.5MB.
Any help is appreciated.
Here's the source code
Here's the log