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

Application crashes on startup #816

Closed
ademenev opened this issue Apr 6, 2020 · 2 comments · Fixed by #817
Closed

Application crashes on startup #816

ademenev opened this issue Apr 6, 2020 · 2 comments · Fixed by #817
Labels
bug Something isn't working

Comments

@ademenev
Copy link
Contributor

ademenev commented Apr 6, 2020

Describe the bug:

Application crash

To Reproduce:

Compile and run hello world app:

package main

import (
	"fyne.io/fyne/app"
	"fyne.io/fyne/widget"
)

func main() {
	a := app.New()

	w := a.NewWindow("Hello")
	w.SetContent(widget.NewVBox(
		widget.NewLabel("Hello Fyne!"),
		widget.NewButton("Quit", func() {
			a.Quit()
		}),
	))

	w.ShowAndRun()
}

Trace:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x42456ac]

goroutine 1 [running, locked to thread]:
fyne.io/fyne.CurrentDevice(0x0, 0xc0000d7000)
	/Users/andrey/go/src/fyne.io/fyne/device.go:40 +0x2c
fyne.io/fyne/app.defaultTheme(0x446794c, 0xa)
	/Users/andrey/go/src/fyne.io/fyne/app/app_darwin.go:17 +0x22
fyne.io/fyne/app.(*settings).setupTheme(0xc000162100)
	/Users/andrey/go/src/fyne.io/fyne/app/settings.go:127 +0x9e
fyne.io/fyne/app.(*settings).load(0xc000162100)
	/Users/andrey/go/src/fyne.io/fyne/app/settings.go:91 +0xe2
fyne.io/fyne/app.loadSettings(...)
	/Users/andrey/go/src/fyne.io/fyne/app/settings.go:133
fyne.io/fyne/app.NewAppWithDriver(0x44f40e0, 0xc0000d7020, 0x0, 0x0, 0x4445901, 0xc0000c70a0)
	/Users/andrey/go/src/fyne.io/fyne/app/app.go:99 +0x61
fyne.io/fyne/app.NewWithID(...)
	/Users/andrey/go/src/fyne.io/fyne/app/app_gl.go:13
fyne.io/fyne/app.New(0xc0000c70a0, 0xc0000f9f58)
	/Users/andrey/go/src/fyne.io/fyne/app/app.go:86 +0x8b
main.main()
	/tmp/bug/main.go:9 +0x26

Device (please complete the following information):

  • OS: MacOS
  • Version: 10.13.3
  • Go version: go1.12.5 darwin/amd64
  • Fyne version: 7df22f0
ademenev pushed a commit to ademenev/fyne that referenced this issue Apr 6, 2020
@ademenev ademenev mentioned this issue Apr 6, 2020
@andydotxyz andydotxyz added the bug Something isn't working label Apr 6, 2020
@andydotxyz
Copy link
Member

Good catch, thanks - somhow we missed this as it only happens if you haven't set your theme preferences.

andydotxyz pushed a commit that referenced this issue Apr 6, 2020
@andydotxyz
Copy link
Member

Thanks, this is merged and will be in our 1.2.4 release coming out soon.

andydotxyz pushed a commit that referenced this issue Apr 8, 2020
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

Successfully merging a pull request may close this issue.

2 participants