forked from BurntSushi/xgb
-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
Hi, I wrote a program that uses xgb and xgbutil.
Sometimes it will freeze in the following circumstance:
(dlv) goroutine 1
Switched from 0 to 1 (thread 15150)
(dlv) bt
0 0x000000000043c1ce in runtime.gopark
at /usr/lib/go/src/runtime/proc.go:403
1 0x000000000044d605 in runtime.selectgo
at /usr/lib/go/src/runtime/select.go:327
2 0x000000000053582f in github.com/jezek/xgb.(*Conn).NewRequest
at ./go/pkg/mod/github.com/jezek/xgb@v1.1.0/xgb.go:346
3 0x000000000053582f in github.com/jezek/xgb/xproto.PutImage
at ./go/pkg/mod/github.com/jezek/xgb@v1.1.0/xproto/xproto.go:12539
4 0x000000000054d213 in github.com/jezek/xgbutil/xgraphics.(*Image).xdraw
at ./go/pkg/mod/github.com/jezek/xgbutil@v0.0.0-20230603163917-04188eb39cf0/xgraphics/xsurface.go:205
5 0x0000000000568a32 in github.com/jezek/xgbutil/xgraphics.(*Image).XDraw
at ./go/pkg/mod/github.com/jezek/xgbutil@v0.0.0-20230603163917-04188eb39cf0/xgraphics/xsurface.go:134
6 0x0000000000568a32 in hhvn.uk/hbspbar/drw.(*Window).Paint
at ./git/hbspbar/drw/x.go:108
7 0x0000000000571fb6 in main.bar.draw
at ./git/hbspbar/bar.go:152
8 0x0000000000572cba in main.Redraw
at ./git/hbspbar/bar.go:179
9 0x0000000000572cba in main.main
at ./git/hbspbar/main.go:94
10 0x000000000043bd9d in runtime.main
at /usr/lib/go/src/runtime/proc.go:271
11 0x000000000046d8a1 in runtime.goexit
at /usr/lib/go/src/runtime/asm_amd64.s:1695
(dlv) up 2
> runtime.gopark() /usr/lib/go/src/runtime/proc.go:403 (PC: 0x43c1ce)
Warning: debugging optimized function
Frame 2: ./go/pkg/mod/github.com/jezek/xgb@v1.1.0/xgb.go:346 (PC: 53582f)
341: seq := make(chan struct{})
342: select {
343: case c.reqChan <- &request{buf: buf, cookie: cookie, seq: seq}:
344: // request is in buffer
345: // wait until request is processed or connection is closed
=> 346: select {
347: case <-seq:
348: // request was successfully sent to X server
349: case <-c.doneSend:
350: // c.sendRequests is down, your request was not handled
351: }
(dlv)
I've come back to my computer to see the program frozen for hours. (It is a status bar, so it displays the "current" time, which was whenever it froze).
I'm not sure what information I can give you about the state that xgb is in when this happens that could be helpful, but if you tell me I'm happy to find out.
Metadata
Metadata
Assignees
Labels
No labels