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

crash at pasting non text data into a text entry #1132

Closed
ghost opened this issue Jun 25, 2020 · 5 comments
Closed

crash at pasting non text data into a text entry #1132

ghost opened this issue Jun 25, 2020 · 5 comments
Milestone

Comments

@ghost
Copy link

ghost commented Jun 25, 2020

Describe the bug:

fyne_demo 1.3.0 is crashing pasting image to the text entry
it was not the case on 1.2.4

To Reproduce:

Steps to reproduce the behavior:

  1. go get fyne.io/fyne
  2. go get fyne.io/fyne/cmd/fyne_demo
  3. run mspaint, select image area and ctrl+c
  4. fyne_demo
  5. go to Widgets->Input->Entry
  6. ctrl+v or right click -> paste
    crash
    console output:
2020/06/25 17:36:46 fyne-io.fyne.demo-notify-1.ps1
2020/06/25 17:36:46 PATH C:\Users\user\AppData\Local\Temp\fyne-io.fyne.demo-notify-1.ps1
2020/06/25 17:36:55 Cancelled
GLFW: An invalid error was not accepted by the caller: FormatUnavailable: Win32: Failed to convert clipboard to string: The operation completed successfully.
GLFW: Please report this bug in the Go package immediately.
panic: FormatUnavailable: Win32: Failed to convert clipboard to string: The operation completed successfully.

goroutine 19 [running, locked to thread]:
fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.3/glfw.acceptError(0x0, 0x0, 0x0, 0xc000bffea0, 0xc000bffe60)
        C:/Users/user/go/src/fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.3/glfw/error.go:178 +0x208
fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.3/glfw.panicError(...)
        C:/Users/user/go/src/fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.3/glfw/error.go:185
fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.3/glfw.(*Window).MakeContextCurrent(0xc00047e000)
        C:/Users/user/go/src/fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.3/glfw/context.go:18 +0x48
fyne.io/fyne/internal/driver/glfw.(*window).RunWithContext(0xc00015e000, 0xc000bffe88)
        C:/Users/user/go/src/fyne.io/fyne/internal/driver/glfw/window.go:1008 +0x35
fyne.io/fyne/internal/driver/glfw.(*gLDriver).repaintWindow(0xc000028340, 0xc00015e000)
        C:/Users/user/go/src/fyne.io/fyne/internal/driver/glfw/loop.go:147 +0x67
fyne.io/fyne/internal/driver/glfw.(*gLDriver).startDrawThread.func1(0xc000156000, 0xc00015c000, 0xc000028340)
        C:/Users/user/go/src/fyne.io/fyne/internal/driver/glfw/loop.go:193 +0x21e
created by fyne.io/fyne/internal/driver/glfw.(*gLDriver).startDrawThread
        C:/Users/user/go/src/fyne.io/fyne/internal/driver/glfw/loop.go:169 +0xc4

Screenshots:

n/a

Example code:

n/a, reproduced on the 1.3.0 fyne_demo

Device (please complete the following information):

  • OS: windows
  • Version: 10 pro
  • Go version: go1.13.8 windows/amd64
  • Fyne version: 1.3.0
@andydotxyz
Copy link
Member

Looks like the same crash causing #1123 we had a fix in place but the library underneath is throwing errors harder again :(

@ghost
Copy link
Author

ghost commented Jun 26, 2020

i would say it's missing dependency update. go.mod contains February version of the glfw.
and that fix is merged April 19: https://github.com/go-gl/glfw/pull/282/files
once i did it manually and rebuild the demo everything is fine

@andydotxyz
Copy link
Member

Good catch, it seems their error handling/throwing fluctuated a little. I wonder if this means we can take out the previous throw handler. Probably best not to just in case?

@ghost
Copy link
Author

ghost commented Jun 26, 2020

if you are talking about this one: 0a906f6
it's monitoring putting data to the clipboard flow, not getting

@andydotxyz
Copy link
Member

OK, I'll leave it in.
Seems that this is resolved now thanks @RustamGamidov.
On develop for testing.

@andydotxyz andydotxyz added this to the 1.3.x milestone Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant