Skip to content
This repository was archived by the owner on Nov 5, 2022. It is now read-only.

windows: panic when using race detector #71

Open
cookieo9 opened this issue Mar 28, 2015 · 2 comments
Open

windows: panic when using race detector #71

cookieo9 opened this issue Mar 28, 2015 · 2 comments

Comments

@cookieo9
Copy link

Similar to #70, but happens immediately instead of on first event under race detection. It may just be that an event is fired by windows on window open.

Panic output on polygon sample:

Exception 0xc0000005 0x0 0x0 0x40b137
PC=0x40b137
signal arrived during cgo execution

github.com/go-gl/glfw/v3.1/glfw._Cfunc_glfwWaitEvents()
        ??:0 +0x63
github.com/go-gl/glfw/v3.1/glfw.WaitEvents()
        P:/go/src/github.com/go-gl/glfw/v3.1/glfw/window.go:642 +0x34
github.com/google/gxui/drivers/gl.(*driver).run(0xc0820046e0)
        P:/go/src/github.com/google/gxui/drivers/gl/driver.go:88 +0xa9
github.com/google/gxui/drivers/gl.StartDriver(0x9e3208)
        P:/go/src/github.com/google/gxui/drivers/gl/driver.go:45 +0x309
main.main()
        P:/go/src/github.com/google/gxui/samples/polygon/main.go:83 +0x3f

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
        C:/go-tip/src/runtime/asm_amd64.s:2466 +0x1

goroutine 5 [chan receive]:
github.com/google/gxui.EventLoop(0x1834498, 0xc0820046e0)
        P:/go/src/github.com/google/gxui/event_loop.go:8 +0x7a
main.appMain(0x1834498, 0xc0820046e0)
        P:/go/src/github.com/google/gxui/samples/polygon/main.go:79 +0x661
created by github.com/google/gxui/drivers/gl.StartDriver
        P:/go/src/github.com/google/gxui/drivers/gl/driver.go:44 +0x2fb
rax     0x40b130
rbx     0x555e87
rcx     0x0
rdi     0x219072e
rsi     0x0
rbp     0x3016f90
rsp     0x23f820
r8      0x18
r9      0x1320000
r10     0x1540060
r11     0x206
r12     0x23f878
r13     0x1540180
r14     0x1540060
r15     0x23f930
rip     0x40b137
rflags  0x10202
cs      0x33
fs      0x53
gs      0x2b

@cookieo9
Copy link
Author

I have tested this with commit 10848b9 but at tip the race detector still causes an on-startup crash.

Unlike in darwin (OSX) this problem can't be fixed going back to go-1.4 as I get a linker error trying to link the final executable. This may be a result of golang/go#8948 as we are linking the race detector and cgo packages into the same binary.

@ben-clayton
Copy link
Contributor

I can confirm on go-1.4 I also get a linker error:

C:\dev\src\go\src\github.com\google\gxui>go run -race samples\tree\main.go
# command-line-arguments
C:\dev\go\pkg\tool\windows_amd64\6l.exe: internal fatal error.

Thanks for taking the time to look into this.

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

2 participants