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 some windows pc #15668

Closed
alexbrainman opened this issue May 13, 2016 · 1 comment
Closed

x/exp/shiny/example/basic: crashes on some windows pc #15668

alexbrainman opened this issue May 13, 2016 · 1 comment

Comments

@alexbrainman
Copy link
Member

@alexbrainman alexbrainman commented May 13, 2016

Running golang.org/x/exp/shiny/example/basic app. And it is crashing with:

got lifecycle.Event{From:StageDead, To:StageVisible, DrawContext:<nil>}
got lifecycle.Event{From:StageVisible, To:StageFocused, DrawContext:<nil>}
got size.Event{WidthPx:1252, HeightPx:710, WidthPt:1252, HeightPt:710, PixelsPerPt:1, Orientation:0}
got paint.Event{External:false}
panic: execCmd faild for cmd.id=0: The parameter is incorrect.

goroutine 5 [running]:
panic(0x4c4200, 0x1216c220)
        /root/go/src/runtime/panic.go:500 +0x331
golang.org/x/exp/shiny/driver/windriver.(*windowImpl).execCmd(0x12180060, 0x12175c98)
        /root/src/golang.org/x/exp/shiny/driver/windriver/window.go:224 +0x14e
golang.org/x/exp/shiny/driver/windriver.(*windowImpl).Draw(0x12180060, 0x0, 0x3ff00000, 0x0, 0x0, 0x0, 0x4062c000, 0x0, 0x0, 0x0, ...)
        /root/src/golang.org/x/exp/shiny/driver/windriver/window.go:77 +0x117
golang.org/x/exp/shiny/driver/internal/drawer.Copy(0x53bf80, 0x12180060, 0x96, 0x64, 0x53c600, 0x1219f9c0, 0x0, 0x0, 0x100, 0x100, ...)
        /root/src/golang.org/x/exp/shiny/driver/internal/drawer/drawer.go:22 +0x124
golang.org/x/exp/shiny/driver/windriver.(*windowImpl).Copy(0x12180060, 0x96, 0x64, 0x53c600, 0x1219f9c0, 0x0, 0x0, 0x100, 0x100, 0x0, ...)
        /root/src/golang.org/x/exp/shiny/driver/windriver/window.go:142 +0x82
main.main.func1(0x53bf60, 0x549de0)
        /root/src/golang.org/x/exp/shiny/example/basic/main.go:91 +0xa76
golang.org/x/exp/shiny/driver/windriver.Main.func1()
        /root/src/golang.org/x/exp/shiny/driver/windriver/windriver.go:22 +0x38
golang.org/x/exp/shiny/driver/internal/win32.screenWindowWndProc.func1()
        /root/src/golang.org/x/exp/shiny/driver/internal/win32/win32.go:280 +0x1f
created by golang.org/x/exp/shiny/driver/internal/win32.screenWindowWndProc
        /root/src/golang.org/x/exp/shiny/driver/internal/win32/win32.go:282 +0x10f

It seems it crashes because AlphaBlend fails on this device with ERROR_INVALID_PARAMETER. I googled for a solution, and it appears that some devices do not support AlphaBlend. So the best I could come up quickly is to replace AlphaBlend with StretchBlt (see https://go-review.googlesource.com/23110). I am looking for better suggestions.

Also stack dump is not very useful - it does not tell where the problem is.

Alex

@quentinmit quentinmit added this to the Unreleased milestone Jun 17, 2016
@gopherbot
Copy link

@gopherbot gopherbot commented Jul 15, 2016

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

@gopherbot gopherbot closed this in 7be2ce3 Jul 17, 2016
@golang golang locked and limited conversation to collaborators Jul 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants