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

Panic when updating to v2.0.4-rc4 #2347

Closed
Cookie04DE opened this issue Aug 3, 2021 · 5 comments
Closed

Panic when updating to v2.0.4-rc4 #2347

Cookie04DE opened this issue Aug 3, 2021 · 5 comments
Assignees
Labels
blocker Items that would block a forthcoming release bug Something isn't working

Comments

@Cookie04DE
Copy link

Cookie04DE commented Aug 3, 2021

Describe the bug:

I updated to version v2.0.4-rc4 and tried to run my app but it panicked.

To Reproduce:

Steps to reproduce the behaviour:

  1. Execute code
  2. See error

Example code:

package main

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

func main() {
	a := app.New()
	w := a.NewWindow("Test")
	w.SetContent(container.NewBorder(
		widget.NewForm(
			widget.NewFormItem("Nummer", widget.NewLabel("")),
		),
		nil, nil, nil, widget.NewEntry(),
	))
	w.ShowAndRun()
}

go.mod:

module github.com/Cookie04DE/FyneTest

go 1.16

require (
	fyne.io/fyne/v2 v2.0.4-rc4
)

Error:

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

goroutine 27 [running, locked to thread]:
image.(*Uniform).RGBA(...)
        /media/conrad/Seagate/exclude_backup/Installationen/Go/src/image/names.go:29
image/draw.drawGlyphOver(0xc0000dc980, 0x1, 0x5, 0xb, 0x10, 0xc000098dc0, 0xc0003d2000, 0x0, 0x119c)
        /media/conrad/Seagate/exclude_backup/Installationen/Go/src/image/draw/draw.go:488 +0x86
image/draw.DrawMask(0x830898, 0xc0000dc980, 0x1, 0x5, 0xb, 0x10, 0x82fdc0, 0xc000098dc0, 0x0, 0x0, ...)
        /media/conrad/Seagate/exclude_backup/Installationen/Go/src/image/draw/draw.go:150 +0x1e7
golang.org/x/image/font.(*Drawer).DrawString(0xc0006955d0, 0x7c1e07, 0x6)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/golang.org/x/image@v0.0.0-20200430140353-33d19683fad8/font/font.go:178 +0x165
fyne.io/fyne/v2/internal/painter/gl.(*glPainter).newGlTextTexture(0xc0003f0150, 0x832cf8, 0xc0003ec4d0, 0xc0002aac50)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/painter/gl/gl_common.go:92 +0x348
fyne.io/fyne/v2/internal/painter/gl.getTexture(0x832cf8, 0xc0003ec4d0, 0xc000695750, 0xc0006956e8)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/painter/gl/gl_common.go:35 +0x94
fyne.io/fyne/v2/internal/painter/gl.(*glPainter).drawTextureWithDetails(0xc0003f0150, 0x832cf8, 0xc0003ec4d0, 0xc000695750, 0x4140000041400000, 0x41a8000042880000, 0x42ac000042fc0000, 0x0, 0x3f800000)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/painter/gl/draw.go:15 +0x45
fyne.io/fyne/v2/internal/painter/gl.(*glPainter).drawText(0xc0003f0150, 0xc0003ec4d0, 0x4140000041400000, 0x42ac000042fc0000)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/painter/gl/draw.go:82 +0x225
fyne.io/fyne/v2/internal/painter/gl.(*glPainter).drawObject(0xc0003f0150, 0x832cf8, 0xc0003ec4d0, 0x4140000041400000, 0x42ac000042fc0000)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/painter/gl/draw.go:101 +0x3da
fyne.io/fyne/v2/internal/painter/gl.(*glPainter).Paint(0xc0003f0150, 0x832cf8, 0xc0003ec4d0, 0x4140000041400000, 0x42ac000042fc0000)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/painter/gl/painter.go:70 +0x98
fyne.io/fyne/v2/internal/driver/glfw.(*glCanvas).paint.func1(0xc0000dc8c0, 0x4140000041400000)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/glfw/canvas.go:439 +0xe3
fyne.io/fyne/v2/internal/driver/glfw.(*glCanvas).walkTree.func1(0x832cf8, 0xc0003ec4d0, 0x4140000041400000, 0x0, 0x4f0000004f000000, 0x699600)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/glfw/canvas.go:535 +0x142
fyne.io/fyne/v2/internal/driver.walkObjectTree(0x832cf8, 0xc0003ec4d0, 0x4080000040800000, 0x8329f8, 0xc0003d2180, 0x4080000040800000, 0x0, 0x4f0000004f000000, 0xc000695d28, 0xc000695d00, ...)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/util.go:169 +0x482
fyne.io/fyne/v2/internal/driver.walkObjectTree.func1(...)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/util.go:176
fyne.io/fyne/v2/internal/driver.walkObjectTree(0x8329f8, 0xc0003d2180, 0x4080000040800000, 0x8329f8, 0xc0003d2240, 0x4080000040800000, 0x0, 0x4f0000004f000000, 0xc000695d28, 0xc000695d00, ...)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/util.go:190 +0x3ff
fyne.io/fyne/v2/internal/driver.walkObjectTree.func1(...)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/util.go:176
fyne.io/fyne/v2/internal/driver.walkObjectTree(0x8329f8, 0xc0003d2240, 0x4080000040800000, 0x833238, 0xc0000e0420, 0x4080000040800000, 0x0, 0x4f0000004f000000, 0xc000695d28, 0xc000695d00, ...)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/util.go:190 +0x3ff
fyne.io/fyne/v2/internal/driver.walkObjectTree.func1(...)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/util.go:176
fyne.io/fyne/v2/internal/driver.walkObjectTree(0x833238, 0xc0000e0420, 0x4080000040800000, 0x8329f8, 0xc0000dc4c0, 0x4080000040800000, 0x0, 0x4f0000004f000000, 0xc000695d28, 0xc000695d00, ...)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/util.go:190 +0x3ff
fyne.io/fyne/v2/internal/driver.walkObjectTree.func1(...)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/util.go:176
fyne.io/fyne/v2/internal/driver.walkObjectTree(0x8329f8, 0xc0000dc4c0, 0x8b94c100, 0x0, 0x0, 0x0, 0x0, 0x4f0000004f000000, 0xc000695d28, 0xc000695d00, ...)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/util.go:190 +0x3ff
fyne.io/fyne/v2/internal/driver.WalkVisibleObjectTree(0x8329f8, 0xc0000dc4c0, 0xc000695d28, 0xc000695d00, 0x48d625)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/util.go:134 +0x94
fyne.io/fyne/v2/internal/driver/glfw.(*glCanvas).walkTree(0xc0002be000, 0xc0000ca020, 0xc000695e00, 0xc000695de8)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/glfw/canvas.go:556 +0x15c
fyne.io/fyne/v2/internal/driver/glfw.(*glCanvas).walkTrees(0xc0002be000, 0xc000695e00, 0xc000695de8)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/glfw/canvas.go:563 +0x4f
fyne.io/fyne/v2/internal/driver/glfw.(*glCanvas).paint(0xc0002be000, 0x42ac000042fc0000)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/glfw/canvas.go:453 +0x129
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).repaintWindow.func1()
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/glfw/loop.go:164 +0x88
fyne.io/fyne/v2/internal/driver/glfw.(*window).RunWithContext(0xc00010c1c0, 0xc000052ea8)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/glfw/window.go:1207 +0x4f
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).repaintWindow(0xc0000c2370, 0xc00010c1c0)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/glfw/loop.go:155 +0x65
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).startDrawThread.func1(0xc0000c2370, 0xc00008e660, 0xc0000c24b0)
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/glfw/loop.go:211 +0x309
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).startDrawThread
        /media/conrad/Seagate/Programmieren/Go/src/pkg/mod/fyne.io/fyne/v2@v2.0.4-rc4/internal/driver/glfw/loop.go:182 +0xbd
exit status 2

Device (please complete the following information):

  • OS: Linux Ubuntu
  • Version: Ubuntu 20.04.2 LTS
  • Go version: go1.16.6 linux/amd64
  • Fyne version: v2.0.4-rc4
@Cookie04DE Cookie04DE added the unverified A bug that has been reported but not verified label Aug 3, 2021
@Jacalz Jacalz added bug Something isn't working blocker Items that would block a forthcoming release and removed unverified A bug that has been reported but not verified labels Aug 3, 2021
@Jacalz
Copy link
Member

Jacalz commented Aug 3, 2021

I can confirm that I see the very same error here on my Fedora laptop.

@Jacalz
Copy link
Member

Jacalz commented Aug 3, 2021

The strange thing is that I don't understand why I am seeing this now. I have been testing the v2.0.4 release candidates without any issues. Have tried reverting some commits but haven't find the source of this yet.

@andydotxyz
Copy link
Member

This very specific setup (where Form label is the first text item to be drawn) does indeed have a crash, not sure why it is new.
I have fixed Form and also patched the crash as other code paths could still trigger it.

@andydotxyz andydotxyz self-assigned this Aug 4, 2021
andydotxyz added a commit to andydotxyz/fyne that referenced this issue Aug 4, 2021
@andydotxyz
Copy link
Member

Thanks for finding this. The fix is in the PR ready for v2.0.4

andydotxyz added a commit that referenced this issue Aug 4, 2021
@andydotxyz
Copy link
Member

Fixed on release/v2.0.x branch for testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Items that would block a forthcoming release bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants