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
runtime: http/net exception - in dll context #26952
Comments
@code34 please include the full text of the crash you received (please do not include a screenshot of the text) |
done i just added the log file at the end of post |
Thank you. I don't understand where this exception is being produced. Is it possible to get the Go stack trace? |
yes of course. how can i retrieve it ? |
I'm sorry I don't know. Hopefully someone else can help you. |
the body exception message change during each execution. I thought that a go routine continues to run when the dll finishes its execution. If i add a fmt.Println(data), i see the result is well returned. |
You can send the |
Looking at your program you are calling
memmove(output, result, len(output))
so if the length of output is larger than the result, memmove will copy
more bytes than is in result and cause an exception.
…On 13 August 2018 at 18:22, Nicolas BOITEUX ***@***.***> wrote:
the body exception message change during each execution. I thought that a
go routine continues to run when the dll finishes its execution. If i add a
fmt.Println(data), i see the result is well returned.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#26952 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAcA-Vg1FNmXy1OysnOFtYpdlIKAjZnks5uQTc5gaJpZM4V6CB0>
.
|
for the memmove it has been tested, you can for exemple return: without http/net code it works, with http there is an exception. how can i send kill -ABRT on windows ? is it a simple kill throught task manager ? |
i test again and effectively you are right. there is something relative to the memmove but i dont understand what. Cause when i use a very large string ouput it doesn't create any exception. |
@code34 is this the test you mean?
Do you see that |
thanks you davecheney i better understand now 👍 i only manage the return of long variable size not the short. |
What version of Go are you using (
go version
)?go 1.10 windows / amd64
Does this issue reproduce with the latest release?
i don't know
What operating system and processor architecture are you using (
go env
)?windows
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\code34\AppData\Local\go-build
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\code34\go
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\code34\AppData\Local\Temp\go-build638089086=/tmp/go-build -gno-record-gcc-switches
What did you do?
I have a C program wich call a GO dll. The GO dll use net/http to retrieve a distant json. You can retrieve the C program and the go source file at this URL:
https://www.dropbox.com/s/21k6nm75zlxn68q/armaws_x64.zip?dl=0
You only have to call it in powershell, it will load automatically the dll file
.\callextension_x64.exe .\test_script.sqf
What did you expect to see?
The content of my http request. The same code source works when it's a simple .exe file.
What did you see instead?
An exception crash
Exception log file is at this place:
log.txt
The text was updated successfully, but these errors were encountered: