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

x/exp/shiny: example/basic crashes on window move darwin #12268

Closed
jnjackins opened this issue Aug 22, 2015 · 3 comments
Closed

x/exp/shiny: example/basic crashes on window move darwin #12268

jnjackins opened this issue Aug 22, 2015 · 3 comments

Comments

@jnjackins
Copy link
Contributor

go version: go version devel +2468227 Fri Aug 21 22:32:43 2015 +0000 darwin/amd64
golang/x/exp: tip (a5b2ce41f70b6be92fbee9c4d6ef52738e35a8c9)

The following happens the moment I click the window title bar:

$ go run main.go 
2015/08/22 13:02:53 sendLifecycle: StageAlive
2015/08/22 13:02:53 sendLifecycle: StageVisible
2015/08/22 13:02:53 sendLifecycle: StageFocused
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x10 pc=0x7fff8c38a0e9]

runtime stack:
runtime.throw(0x417a9c0, 0x2a)
    /Users/jnj/src/go/src/runtime/panic.go:527 +0x90
runtime.sigpanic()
    /Users/jnj/src/go/src/runtime/sigpanic_unix.go:12 +0x5a

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x4003400, 0xc82005de10, 0xc800000000)
    /Users/jnj/src/go/src/runtime/cgocall.go:120 +0x11b fp=0xc82005ddf0 sp=0xc82005ddc0
golang.org/x/exp/shiny/driver/gldriver._Cfunc_startDriver()
    golang.org/x/exp/shiny/driver/gldriver/_obj/_cgo_gotypes.go:128 +0x31 fp=0xc82005de10 sp=0xc82005ddf0
golang.org/x/exp/shiny/driver/gldriver.main(0x4189c08, 0x0, 0x0)
    /Users/jnj/src/golang.org/x/exp/shiny/driver/gldriver/cocoa.go:68 +0x193 fp=0xc82005de90 sp=0xc82005de10
golang.org/x/exp/shiny/driver/gldriver.Main(0x4189c08)
    /Users/jnj/src/golang.org/x/exp/shiny/driver/gldriver/gldriver.go:26 +0x30 fp=0xc82005df20 sp=0xc82005de90
golang.org/x/exp/shiny/driver.main(0x4189c08)
    /Users/jnj/src/golang.org/x/exp/shiny/driver/driver_darwin.go:15 +0x21 fp=0xc82005df30 sp=0xc82005df20
golang.org/x/exp/shiny/driver.Main(0x4189c08)
    /Users/jnj/src/golang.org/x/exp/shiny/driver/driver.go:24 +0x21 fp=0xc82005df40 sp=0xc82005df30
main.main()
    /Users/jnj/src/golang.org/x/exp/shiny/example/basic/main.go:84 +0x23 fp=0xc82005df50 sp=0xc82005df40
runtime.main()
    /Users/jnj/src/go/src/runtime/proc.go:111 +0x2b0 fp=0xc82005dfa0 sp=0xc82005df50
runtime.goexit()
    /Users/jnj/src/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc82005dfa8 sp=0xc82005dfa0

goroutine 17 [chan receive, locked to thread]:
golang.org/x/exp/shiny/driver/gldriver.drawgl(0x44578a0)
    /Users/jnj/src/golang.org/x/exp/shiny/driver/gldriver/cocoa.go:87 +0xd1

goroutine 5 [chan receive]:
main.main.func1(0x47a42e0, 0x4208d40)
    /Users/jnj/src/golang.org/x/exp/shiny/example/basic/main.go:52 +0x65d
golang.org/x/exp/shiny/driver/gldriver.driverStarted.func1()
    /Users/jnj/src/golang.org/x/exp/shiny/driver/gldriver/cocoa.go:75 +0x47
created by golang.org/x/exp/shiny/driver/gldriver.driverStarted
    /Users/jnj/src/golang.org/x/exp/shiny/driver/gldriver/cocoa.go:77 +0x2b

goroutine 18 [select]:
golang.org/x/exp/shiny/driver/internal/pump.(*Pump).run(0xc820090080)
    /Users/jnj/src/golang.org/x/exp/shiny/driver/internal/pump/pump.go:62 +0x4df
created by golang.org/x/exp/shiny/driver/internal/pump.Make
    /Users/jnj/src/golang.org/x/exp/shiny/driver/internal/pump/pump.go:15 +0x116

goroutine 19 [runnable, locked to thread]:
golang.org/x/exp/shiny/driver/gldriver.drawLoop(0xc8200600e0, 0x44121c0)
    /Users/jnj/src/golang.org/x/exp/shiny/driver/gldriver/cocoa.go:117 +0x2a6
created by golang.org/x/exp/shiny/driver/gldriver.(*screenImpl).NewWindow
    /Users/jnj/src/golang.org/x/exp/shiny/driver/gldriver/screen.go:103 +0x28e

goroutine 34 [syscall, locked to thread]:
runtime.goexit()
    /Users/jnj/src/go/src/runtime/asm_amd64.s:1696 +0x1
exit status 2
@ianlancetaylor ianlancetaylor added this to the Unreleased milestone Aug 22, 2015
@nigeltao nigeltao assigned crawshaw and unassigned nigeltao Aug 23, 2015
@adg
Copy link
Contributor

adg commented Aug 24, 2015

Can reproduce this on my 10.10.4 machine.

@crawshaw
Copy link
Member

As the stack trace isn't helpful, here's what lldb has to say:

* thread #1: tid = 0x21283a, 0x00007fff929060e9 libobjc.A.dylib`objc_msgSend + 41, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
  * frame #0: 0x00007fff929060e9 libobjc.A.dylib`objc_msgSend + 41
    frame #1: 0x00007fff85c19cfb AppKit`forwardMethod + 126
    frame #2: 0x00007fff85c19cfb AppKit`forwardMethod + 126
    frame #3: 0x00007fff85d2230b AppKit`-[NSTitledFrame mouseDown:] + 87
    frame #4: 0x00007fff85d222ab AppKit`-[NSThemeFrame mouseDown:] + 68
    frame #5: 0x00007fff85c19cfb AppKit`forwardMethod + 126
    frame #6: 0x00007fff85c19cfb AppKit`forwardMethod + 126
    frame #7: 0x00007fff85d2205d AppKit`-[NSTitlebarView mouseDown:] + 90
    frame #8: 0x00007fff862922dc AppKit`-[NSWindow _reallySendEvent:isDelayedEvent:] + 14125
    frame #9: 0x00007fff85c21c86 AppKit`-[NSWindow sendEvent:] + 470
    frame #10: 0x00007fff85c1e212 AppKit`-[NSApplication sendEvent:] + 2504
    frame #11: 0x00007fff85b47b68 AppKit`-[NSApplication run] + 711
    frame #12: 0x000000000405b4fa main`runtime.asmcgocall + 106 at asm_amd64.s:690
    frame #13: 0x000000000420a200 main`runtime.g0 + 64

I'll take a look today.

@gopherbot
Copy link

CL https://golang.org/cl/13871 mentions this issue.

@golang golang locked and limited conversation to collaborators Aug 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants