Skip to content

x/exp/shiny: panic is not panicky #13963

@jnjackins

Description

@jnjackins

go version devel +c5a2f36 Thu Jan 14 20:57:21 2016 +0000 darwin/amd64

Once a window has been initialized, any panics (either by calling panic() or some other means) do not exit the program or print a stack trace, but rather cause the program to hang. If the window has been published, the cursor becomes a spinning beachball.

$ git diff
diff --git a/shiny/example/basic/main.go b/shiny/example/basic/main.go
index d427b34..f88d34b 100644
--- a/shiny/example/basic/main.go
+++ b/shiny/example/basic/main.go
@@ -40,6 +40,8 @@ func main() {
                }
                defer w.Release()

+               panic("help!")
+
                winSize := image.Point{256, 256}
                b, err := s.NewBuffer(winSize)
                if err != nil {
$ go build main.go 
$ ./main 
(hangs forever)

cc @crawshaw @nigeltao

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions