Closed itMicmouse closed 3 years ago
When I turn on the computer(windows 10) Problems will happen
Weird issue!
The FormatUnavailable
error should be catched by the golang glfw wrapper: https://github.com/go-gl/glfw/commit/e9b2113730bf7ca3f2b783b035541d4a8b3c16cc
And PostEmptyEvent
shouldn't panic with this error https://github.com/go-gl/glfw/blob/9b86c984c866400dc34182d3a6aaf4cb5be0a4cf/v3.3/glfw/window.go#L1005
https://www.glfw.org/docs/latest/group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9
Please open an issue on go-gl/glfw (issue not related with this project). But maybe what's happening is a GLFW_NOT_INITIALIZED error is thrown, then a FormatUnavailable error is thrown concurrently?
Could you more precisely describe what you mean by When I turn on the computer(windows 10)
what are the step/configuration to reproduce the error ?
same issue here, @itMicmouse have you figure out how to fix this?
@pchampio we are coming into the same issue. The crash happens randomly, mostly happens when texting with keyboard.
goroutine 6146 [running]:
runtime/debug.Stack(0x0, 0x1b01ca0, 0xc000088a50)
c:/go/src/runtime/debug/stack.go:24 +0xa5
runtime/debug.PrintStack()
c:/go/src/runtime/debug/stack.go:16 +0x29
github.com/go-flutter-desktop/go-flutter/plugin.(*MethodChannel).handleMethodCall.func1(0xc00001c240, 0x13, 0xc00028c420)
C:/Users/ee/Workspace/go-flutter/plugin/method-channel.go:219 +0x15f
panic(0x1966300, 0xc0000b6160)
c:/go/src/runtime/panic.go:969 +0x1c7
github.com/go-gl/glfw/v3.3/glfw.acceptError(0x0, 0x0, 0x0, 0xc000253d60, 0x123f5ab)
C:/Users/ee/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200707082815-5321531c36a2/error.go:178 +0x20c
github.com/go-gl/glfw/v3.3/glfw.panicError(...)
C:/Users/ee/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200707082815-5321531c36a2/error.go:185
github.com/go-gl/glfw/v3.3/glfw.PostEmptyEvent()
C:/Users/ee/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200707082815-5321531c36a2/window.go:1007 +0x3f
github.com/go-flutter-desktop/go-flutter.responseSender.Send(0xc0001cebe0, 0xc000088750, 0xc0000061c8, 0xc000098140, 0x6, 0x40)
C:/Users/ee/Workspace/go-flutter/messenger.go:129 +0x5a
github.com/go-flutter-desktop/go-flutter/plugin.(*MethodChannel).handleMethodCall(0xc00028c420, 0x1b02300, 0xc000283650, 0xc00001c240, 0x13, 0x0, 0x0, 0x1b02280, 0xc0001f2040)
C:/Users/ee/Workspace/go-flutter/plugin/method-channel.go:246 +0x518
created by github.com/go-flutter-desktop/go-flutter/plugin.(*MethodChannel).handleChannelMessage
C:/Users/ee/Workspace/go-flutter/plugin/method-channel.go:207 +0x271
panic: FormatUnavailable: Win32: Failed to convert clipboard to string: 操作成功完成。
goroutine 18 [running, locked to thread]:
github.com/go-gl/glfw/v3.3/glfw.acceptError(0x0, 0x0, 0x0, 0xc000005f60, 0x1)
C:/Users/ee/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200707082815-5321531c36a2/error.go:178 +0x20c
github.com/go-gl/glfw/v3.3/glfw.panicError(...)
C:/Users/ee/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200707082815-5321531c36a2/error.go:185
github.com/go-gl/glfw/v3.3/glfw.PostEmptyEvent()
C:/Users/ee/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200707082815-5321531c36a2/window.go:1007 +0x3f
github.com/go-flutter-desktop/go-flutter.(*EventLoop).PostTask(0xc0001c1e90, 0x2f47c130, 0x2dc51b38, 0x15324a2d6b2c)
C:/Users/ee/Workspace/go-flutter/event-loop.go:73 +0x12e
github.com/go-flutter-desktop/go-flutter/embedder.proxy_post_task_callback(...)
C:/Users/ee/Workspace/go-flutter/embedder/embedder_proxy.go:94
github.com/go-flutter-desktop/go-flutter/embedder._cgoexpwrap_de84f3eb1d92_proxy_post_task_callback(0x2f47c130, 0x2dc51b38, 0x15324a2d6b2c, 0xc0001e80d8)
_cgo_gotypes.go:916 +0x52
Yeah @zhileichen I comment out this line and the app works fine. I'm pretty sure my app has nothing to do with clipboard, not sure why panic on it.
Does hover run -b '@fix/post-task-panic'
fixes this issue ?
(with the latest version of hover, the -b flags need to be used with: go env -w GOPROXY=direct)
Or hover build linux -b '@fix/post-task-panic'
Hi, On running the above command i get the following error: hover: Downloading 'go-flutter' '@fix/post-task-panic' go get github.com/go-flutter-desktop/go-flutter'@fix/post-task-panic': invalid github.com/ import path "github.com/go-flutter-desktop/go-flutter'" hover: Updating go-flutter to '@fix/post-task-panic' version failed: exit status 1
Kindly advise.
Can you try go env -w GOPROXY=direct
and run hover build linux -b '@fix/post-task-panic'
afterwards ?
Or maybe something like this: https://stackoverflow.com/questions/20458796/unrecognized-import-path-with-go-get
Got it to run without the quites i.e. hover build windows-msi -b @fix/post-task-panic
Does it fixes the issue ? can you provide some logs
i have sent msi for testing, is there a way to capture logs on release build?
no
I think I solved the problem but I don't like it
p.window.SetFocusCallback(func(w *glfw.Window, focused bool) {
if focused {
text, err := clipboard.ReadAll()
if err != nil {
if text == "" {
clipboard.WriteAll("")
}
}
}
})
@pchampio The contents of the clipboard cause a crash so when get focuse test it and reset
i have sent msi for testing, is there a way to capture logs on release build?
const (
kernel32dll = "kernel32.dll"
)
kernel32 := syscall.NewLazyDLL(kernel32dll)
setStdHandle := kernel32.NewProc("SetStdHandle")
sh := syscall.STD_ERROR_HANDLE
v, _, err := setStdHandle.Call(uintptr(sh), uintptr(file.Fd()))
if v == 0 {
return err
}
I use this get golang err log but sometimes it doesn't work
Will fix/post-task-panic
be merged?
Can you check if that branch fixes the issue ?
You have to clone the repo, checkout to the correct branch and use the replace directive in your project.
yes that branch fix the issue @pchampio
Hover doctor
Error output
Using
hover build [...] --XXX
to build my application, I get the following error:When I turn on the computer(windows 10) Problems will happen if I use Ctrl+c this problem not happen