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

Runtime error on theme change when built with -tags mobile #688

Closed
Jacalz opened this issue Feb 19, 2020 · 2 comments
Closed

Runtime error on theme change when built with -tags mobile #688

Jacalz opened this issue Feb 19, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@Jacalz
Copy link
Member

Jacalz commented Feb 19, 2020

Describe the bug:

An application that tries to set the theme before a window is created will fail due to an error on run-time when built using -tags mobile, but not if it is built without that tag. The errors that are getting spewed out are the following:

 panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x69201a]goroutine 8 [running]:
fyne.io/fyne/internal/app.ApplyThemeTo(0x0, 0x0, 0x895ae0, 0xc000124000)
	/home/jacob/go/src/fyne.io/fyne/internal/app/theme.go:23 +0xfa
fyne.io/fyne/internal/app.ApplySettings(0x890760, 0xc000120000, 0x894480, 0xc00006a360)
	/home/jacob/go/src/fyne.io/fyne/internal/app/theme.go:30 +0xf0
fyne.io/fyne/app.NewAppWithDriver.func1(0xc000026480, 0xc00006a360)
	/home/jacob/go/src/fyne.io/fyne/app/app.go:108 +0x6b
created by fyne.io/fyne/app.NewAppWithDriver
	/home/jacob/go/src/fyne.io/fyne/app/app.go:105 +0x15f

To Reproduce:

Steps to reproduce the behaviour:

  1. Build and run this code with go run.
  2. Build and run the same code snippet with go run -tags mobile (will not start at all).
  3. Instead build and run this code snippet with go run -tags mobile.

Example code:

Not working code version: https://gist.github.com/Jacalz/b09b4cceca7bdc6b7946fd44fdf55b68
Working code version: https://gist.github.com/Jacalz/723b828fbbb3fce991eb57cd5d20e52b

Device (please complete the following information):

  • OS: Linux
  • Version: 5.5.3
  • Go version: 1.13.6
  • Fyne version: 1.2.0, 1.2.2 and devlop branch have all been tested.

Currently tested on Linux only.

@andydotxyz andydotxyz added the bug Something isn't working label Feb 19, 2020
@andydotxyz
Copy link
Member

on develop for testing, this will merge into pending v1.2.3 release shortly

@andydotxyz
Copy link
Member

Now on the pending 1.2.3 release branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants