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

Driver errors don't crash the program or tell the developer #1593

Closed
AlbinoGeek opened this issue Nov 21, 2020 · 3 comments
Closed

Driver errors don't crash the program or tell the developer #1593

AlbinoGeek opened this issue Nov 21, 2020 · 3 comments
Labels
question A question has been asked

Comments

@AlbinoGeek
Copy link
Contributor

I updated the following Fedora 33 Workstation packages:

avahi
cmake
environment-modules
flatpak
flatpak-libs
gjs
glib2
gnome-shell
libhandy1
linux-firmware-whence
micro
mingw32-libxml2
mingw64-libxml2
mutter
pam
steam
systemtap-sdt-devel
totem

And now my fyne application gives this error, and shows no windows:

2020/11/20 18:54:05 Fyne error:  window creation error
2020/11/20 18:54:05   Cause: VersionUnavailable: GLX: Failed to create context: BadValue (integer parameter out of range for operation)
2020/11/20 18:54:05   At: /home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/window.go:1214

glxinfo confirmed this was an issue outside of fyne too.

So why the bug report?

My application didn't crash, but no windows were shown either.

My code was not made privy to the error itself, as it was thrown by driver code.

So, the user experience was a process that "does nothing, but is still running."

@andydotxyz
Copy link
Member

I think this might be the first bug to be opened that complains we don't crash ;).

We have a design principle that Fyne should never crash. Simple enough, except in this complicated case.
a) The window not appearing is problematic, but we should not crash as above
b) the driver Run cannot quit if no windows are visible, because that is a valid use-case.

Which leaves only one possible approach that I can see:
ShowAndRun() becomes a special case, if there is no window loaded then the run will log an error and exit immediately?

Unfortunately it is non-trivial as the windows are not fully-realised until the driver runs, but if it's the right solution we could find a way.

@andydotxyz andydotxyz added the question A question has been asked label Nov 22, 2020
@AlbinoGeek
Copy link
Contributor Author

Something like this would help, or otherwise a channel where the developer can receive and respond to Fyne Errors that occur, instead of just dumping them to the console (which may or may not even be attached, e.g: Windows GUIs.)

@andydotxyz
Copy link
Member

This will be in v2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question A question has been asked
Projects
None yet
Development

No branches or pull requests

2 participants