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 when resizing window on MacOS #1051

Closed
toaster opened this issue May 30, 2020 · 16 comments
Closed

Crash when resizing window on MacOS #1051

toaster opened this issue May 30, 2020 · 16 comments
Labels
bug Something isn't working
Milestone

Comments

@toaster
Copy link
Member

toaster commented May 30, 2020

When resizing a window on MacOS (10.14) a Fyne app (e.g. fyne_demo) eventually crashes:

crash1.txt

Branch: develop (85790ee)

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

I cannot replicate this on the same hardware.
What was it that you did to make it happen? The crash log seems to be deep in GL code so I couldn't figure out any particular trigger.

@ghost
Copy link

ghost commented Jun 1, 2020

Edit: Forgot to say I'm on Windows

I encountered a similar error when using this code, and resizing the window
I installed Fyne using the instructions on the README
I am new to go, I don't really understand what's going on 😕

I have a suspicion it is something to do with my display
It is a high resolution display (2736x1824) Surface Pro 1796
The controls don't look quite right when running.
Maybe I should use a different display?

asd

Here is the code

package main

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

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

	w := app.NewWindow("Hello")
	w.SetContent(widget.NewVBox(
		widget.NewLabel("Hello Fyne!"),
		widget.NewButton("Quit", func() {
			app.Quit()
		}),
		widget.NewButton("New Window",func() {
			w2 := app.NewWindow("Another Window")
			w2.SetContent(widget.NewLabel("Hello again!"))
			w2.ShowAndRun()
		}),
	))

	w.ShowAndRun()
}
Console output rohan@DESKTOP-Q4LRFRP MINGW64 ~/source/repos/GoApp $ go run main.go 2020/06/01 14:57:02 PlatformError: WGL: Failed to make context current Exception 0xc0000005 0x0 0x37d0 0x7ffcc7b5c638 PC=0x7ffcc7b5c638

runtime: unknown pc 0x7ffcc7b5c638
stack: frame={sp:0x2870fe00, fp:0x0} stack=[0x0,0x2870fe80)
000000002870fd00: 000000c00007b498 00007ffd15afb7ba
000000002870fd10: 0000000000000200 0000000000000015
000000002870fd20: 0000000000000016 00007ffd17a40000
000000002870fd30: 000000c000000008 000000002870fd60
000000002870fd40: 0000000000000001 0000000000000000
000000002870fd50: 0000000000000000 000000b200000004
000000002870fd60: 000000c00000008e 000000c00025a000
000000002870fd70: 0000000801000006 000000010000008e
000000002870fd80: 00000000000e000d 000000c000220150
000000002870fd90: 000000c000040d48 000000000046588e <runtime.asmstdcall+94>
000000002870fda0: 000000000000026c 000000c00025a000
000000002870fdb0: 0000000000000047 000000c00007b5a8
000000002870fdc0: 0000000000000000 00000000004196d0 <runtime.(*mcentral).grow+128>
000000002870fdd0: 0000000000002000 0000000028713d20
000000002870fde0: 000000c000036c00 00007ffce0d12efb
000000002870fdf0: 0000000000000000 0000000028713d83
000000002870fe00: <00000000001c1500 000000002870fe60
000000002870fe10: 000000000045f62b <runtime.(*mheap).alloc.func1+107> 0000000000e08020
000000002870fe20: 000000c00007bc40 0000000000463493 <runtime.asmcgocall+115>
000000002870fe30: 000000c00007bc40 000000c00007bc28
000000002870fe40: 000000c000036c00 000000c000033800
000000002870fe50: 000000c000198180 0000000000000430
000000002870fe60: 000000c000198180 0000000000461c4b <runtime.systemstack+107>
000000002870fe70: 000000000043be90 <runtime.mstart+0> 0000000002fc6fd0
runtime: unknown pc 0x7ffcc7b5c638
stack: frame={sp:0x2870fe00, fp:0x0} stack=[0x0,0x2870fe80)
000000002870fd00: 000000c00007b498 00007ffd15afb7ba
000000002870fd10: 0000000000000200 0000000000000015
000000002870fd20: 0000000000000016 00007ffd17a40000
000000002870fd30: 000000c000000008 000000002870fd60
000000002870fd40: 0000000000000001 0000000000000000
000000002870fd50: 0000000000000000 000000b200000004
000000002870fd60: 000000c00000008e 000000c00025a000
000000002870fd70: 0000000801000006 000000010000008e
000000002870fd80: 00000000000e000d 000000c000220150
000000002870fd90: 000000c000040d48 000000000046588e <runtime.asmstdcall+94>
000000002870fda0: 000000000000026c 000000c00025a000
000000002870fdb0: 0000000000000047 000000c00007b5a8
000000002870fdc0: 0000000000000000 00000000004196d0 <runtime.(*mcentral).grow+128>
000000002870fdd0: 0000000000002000 0000000028713d20
000000002870fde0: 000000c000036c00 00007ffce0d12efb
000000002870fdf0: 0000000000000000 0000000028713d83
000000002870fe00: <00000000001c1500 000000002870fe60
000000002870fe10: 000000000045f62b <runtime.(*mheap).alloc.func1+107> 0000000000e08020
000000002870fe20: 000000c00007bc40 0000000000463493 <runtime.asmcgocall+115>
000000002870fe30: 000000c00007bc40 000000c00007bc28
000000002870fe40: 000000c000036c00 000000c000033800
000000002870fe50: 000000c000198180 0000000000000430
000000002870fe60: 000000c000198180 0000000000461c4b <runtime.systemstack+107>
000000002870fe70: 000000000043be90 <runtime.mstart+0> 0000000002fc6fd0

goroutine 18 [syscall]:
fyne.io/fyne/vendor/github.com/go-gl/gl/v3.2-core/gl._Cfunc_glowUseProgram(0x7ffcc7b5c610, 0x3)
_cgo_gotypes.go:21374 +0x48
fyne.io/fyne/vendor/github.com/go-gl/gl/v3.2-core/gl.UseProgram(...)
C:/Users/rohan/go/src/fyne.io/fyne/vendor/github.com/go-gl/gl/v3.2-core/gl/package.go:12648
fyne.io/fyne/internal/painter/gl.(*glPainter).glClearBuffer(0xc000202060)
C:/Users/rohan/go/src/fyne.io/fyne/internal/painter/gl/gl_core.go:161 +0x44
fyne.io/fyne/internal/painter/gl.(*glPainter).Clear(0xc000202060)
C:/Users/rohan/go/src/fyne.io/fyne/internal/painter/gl/painter.go:50 +0x32
fyne.io/fyne/internal/driver/glfw.(*glCanvas).paint(0xc000216000, 0x72d, 0x2bd)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/canvas.go:301 +0x72
fyne.io/fyne/internal/driver/glfw.(*gLDriver).repaintWindow.func1()
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/loop.go:128 +0x8f
fyne.io/fyne/internal/driver/glfw.(*window).RunWithContext(0xc000210000, 0xc00007bd38)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/window.go:1008 +0x3f
fyne.io/fyne/internal/driver/glfw.(*gLDriver).repaintWindow(0xc000077110, 0xc000210000)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/loop.go:121 +0x6d
fyne.io/fyne/internal/driver/glfw.(*gLDriver).runGL(0xc000077110)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/loop.go:110 +0x3cf
fyne.io/fyne/internal/driver/glfw.(*gLDriver).Run(0xc000077110)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/driver.go:66 +0x32
fyne.io/fyne/internal/driver/glfw.(*window).ShowAndRun(0xc000210000)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/window.go:391 +0x5e
main.main.func2()
C:/Users/rohan/source/repos/GoApp/main.go:20 +0xe9
fyne.io/fyne/widget.(*Button).Tapped(0xc0001ae1b0, 0xc00001c700)
C:/Users/rohan/go/src/fyne.io/fyne/widget/button.go:169 +0x44
fyne.io/fyne/internal/driver/glfw.(*window).mouseClicked.func6()
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/window.go:677 +0x3f
fyne.io/fyne/internal/driver/glfw.(*window).runEventQueue(0xc0001b8000)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/window.go:1052 +0x57
created by fyne.io/fyne/internal/driver/glfw.(*gLDriver).CreateWindow.func1
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/window.go:1084 +0x175

goroutine 1 [syscall, locked to thread]:
fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw._Cfunc_glfwMakeContextCurrent(0x29fca3d0)
_cgo_gotypes.go:1130 +0x48
fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw.(*Window).MakeContextCurrent.func1(0xc00020e000)
C:/Users/rohan/go/src/fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw/context.go:16 +0x5c
fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw.(*Window).MakeContextCurrent(0xc00020e000)
C:/Users/rohan/go/src/fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw/context.go:16 +0x32
fyne.io/fyne/internal/driver/glfw.(*window).RunWithContext(0xc000210000, 0xc000107aa8)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/window.go:1006 +0x35
fyne.io/fyne/internal/driver/glfw.forceWindowRefresh(0xc000210000)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/gl_windows.go:17 +0x55
fyne.io/fyne/internal/driver/glfw.(*window).refresh(0xc000210000, 0xc00020e000)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/window.go:496 +0x32
fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw.goWindowRefreshCB(0x29fca3d0)
C:/Users/rohan/go/src/fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw/window.go:203 +0x50
fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw._cgoexpwrap_b702e4d2cd06_goWindowRefreshCB(0x29fca3d0)
_cgo_gotypes.go:2211 +0x32
fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw._Cfunc_glfwPollEvents()
_cgo_gotypes.go:1156 +0x48
fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw.PollEvents()
C:/Users/rohan/go/src/fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw/window.go:777 +0x29
fyne.io/fyne/internal/driver/glfw.(*gLDriver).runGL(0xc000077110)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/loop.go:87 +0x206
fyne.io/fyne/internal/driver/glfw.(*gLDriver).Run(0xc000077110)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/driver.go:66 +0x32
fyne.io/fyne/internal/driver/glfw.(*window).ShowAndRun(0xc0001b8000)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/window.go:391 +0x5e
main.main()
C:/Users/rohan/source/repos/GoApp/main.go:24 +0x307

goroutine 6 [sleep]:
time.Sleep(0x22ecb25c00)
C:/Go/src/runtime/time.go:188 +0xc8
fyne.io/fyne/internal/painter.svgCacheJanitor.func1()
C:/Users/rohan/go/src/fyne.io/fyne/internal/painter/svg_cache.go:51 +0x11d
sync.(*Once).doSlow(0xe1ac30, 0xc000018230)
C:/Go/src/sync/once.go:66 +0xf3
sync.(*Once).Do(0xe1ac30, 0xc000018230)
C:/Go/src/sync/once.go:57 +0x4c
created by fyne.io/fyne/internal/painter.svgCacheJanitor
C:/Users/rohan/go/src/fyne.io/fyne/internal/painter/svg_cache.go:49 +0xa2

goroutine 7 [chan receive]:
fyne.io/fyne/app.NewAppWithDriver.func1(0xc000052180, 0xc00004e240)
C:/Users/rohan/go/src/fyne.io/fyne/app/app.go:108 +0x44
created by fyne.io/fyne/app.NewAppWithDriver
C:/Users/rohan/go/src/fyne.io/fyne/app/app.go:106 +0x197

goroutine 8 [syscall, locked to thread]:
syscall.Syscall6(0x7ffd17a565d0, 0x5, 0x290, 0xc000047d10, 0xc000047d14, 0xc000047d78, 0xffffffff, 0x0, 0x0, 0x0, ...)
C:/Go/src/runtime/syscall_windows.go:201 +0xf2
syscall.GetQueuedCompletionStatus(0x290, 0xc000047d10, 0xc000047d14, 0xc000047d78, 0xffffffff, 0x0, 0x0)
C:/Go/src/syscall/zsyscall_windows.go:556 +0xb6
fyne.io/fyne/vendor/github.com/fsnotify/fsnotify.(*Watcher).readEvents(0xc00004c300)
C:/Users/rohan/go/src/fyne.io/fyne/vendor/github.com/fsnotify/fsnotify/windows.go:381 +0x98
created by fyne.io/fyne/vendor/github.com/fsnotify/fsnotify.NewWatcher
C:/Users/rohan/go/src/fyne.io/fyne/vendor/github.com/fsnotify/fsnotify/windows.go:46 +0x1f8

goroutine 9 [chan receive]:
fyne.io/fyne/app.watchFile.func1(0xc00004c300, 0xc00001e3c0, 0x31, 0xc000043170, 0xc000043180)
C:/Users/rohan/go/src/fyne.io/fyne/app/settings_desktop.go:42 +0x5f
created by fyne.io/fyne/app.watchFile
C:/Users/rohan/go/src/fyne.io/fyne/app/settings_desktop.go:41 +0xee

goroutine 19 [chan receive]:
fyne.io/fyne/internal/driver/glfw.(*glCanvas).setupThemeListener.func1(0xc0001c6000, 0xc0001be000)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/canvas.go:409 +0x4e
created by fyne.io/fyne/internal/driver/glfw.(*glCanvas).setupThemeListener
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/canvas.go:407 +0xad

goroutine 10 [chan receive]:
fyne.io/fyne/internal/painter.SvgCacheMonitorTheme.func1(0xc0000522a0)
C:/Users/rohan/go/src/fyne.io/fyne/internal/painter/svg_cache.go:104 +0x3b
created by fyne.io/fyne/internal/painter.SvgCacheMonitorTheme
C:/Users/rohan/go/src/fyne.io/fyne/internal/painter/svg_cache.go:102 +0xa3

goroutine 34 [chan receive]:
fyne.io/fyne/internal/driver/glfw.(*window).runEventQueue(0xc000210000)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/window.go:1051 +0x8d
created by fyne.io/fyne/internal/driver/glfw.(*gLDriver).CreateWindow.func1
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/window.go:1084 +0x175

goroutine 35 [chan receive]:
fyne.io/fyne/internal/driver/glfw.(*glCanvas).setupThemeListener.func1(0xc00020c060, 0xc000216000)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/canvas.go:409 +0x4e
created by fyne.io/fyne/internal/driver/glfw.(*glCanvas).setupThemeListener
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/canvas.go:407 +0xad

goroutine 21 [chan receive]:
fyne.io/fyne/internal/painter.SvgCacheMonitorTheme.func1(0xc0001c67e0)
C:/Users/rohan/go/src/fyne.io/fyne/internal/painter/svg_cache.go:104 +0x3b
created by fyne.io/fyne/internal/painter.SvgCacheMonitorTheme
C:/Users/rohan/go/src/fyne.io/fyne/internal/painter/svg_cache.go:102 +0xa3
rax 0xe2320
rbx 0xc00007bc40
rcx 0x18
rdi 0x3
rsi 0xc000036c00
rbp 0xc00007bc00
rsp 0x2870fe00
r8 0xc000198180
r9 0x0
r10 0x20
r11 0x2
r12 0x20
r13 0x7e
r14 0x1
r15 0x2030000
rip 0x7ffcc7b5c638
rflags 0x10206
cs 0x33
fs 0x53
gs 0x2b
exit status 2

@andydotxyz
Copy link
Member

The screenshot you provided looks like it's not running our 'develop' branch which means a lot has changed already. We re-wrote quite a bit of scale and resize/paint handling.
If possible can you test the develop branch? If not then the 1.3 release should be out soon and it may fix your issue.

@ghost
Copy link

ghost commented Jun 2, 2020

I already have the master branch version of Fyne installed. Will I have to remove my existing Fyne install? Also, can you guide me towards instructions to install the latest develop branch? Thanks.

@andydotxyz
Copy link
Member

You do not have to remove it, you can install over the top. The following should be sufficient for an existing installation:

cd $GOPATH/src/fyne.io/fyne/cmd/fyne
git checkout develop
git pull
go install

Then run fyne_demo again and you should see it has different tabs. Let us know if this changes the situation.

@toaster
Copy link
Member Author

toaster commented Jun 3, 2020

resize_crash

@andydotxyz
Copy link
Member

It looks like the parameters are valid and that it's running on the right thread - might need a bit more digging at your send to inspect the values to see which is corrupting or causing unexpected state?

@ghost
Copy link

ghost commented Jun 3, 2020

The fyne_demo looks good. The buttons are a little too big. I'm not too sure how the scaling works, but maybe it is possible to change the scale based on screen resolution?

The code that I wrote in my previous comment crashed with a different error message, and it didn't crash when I resized it, it crashed immediately after opening a new window.

package main

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

func main() {
	var app = app.New()
	var w = app.NewWindow("Hello")
	w.SetContent(widget.NewVBox(
		widget.NewLabel("Hello Fyne!"),
		widget.NewButton("Quit", func() {
			app.Quit()
		}),
		widget.NewButton("New Window",func() {
			var w2 = app.NewWindow("Another Window")
			w2.SetContent(widget.NewLabel("Hello again!"))
			w2.ShowAndRun() /*will crash*/
		}),
	))

	w.ShowAndRun()
}
Console Output rohan@DESKTOP-Q4LRFRP MINGW64 ~/source/repos/GoApp (master) $ go run main.go panic: Run() or ShowAndRun() must be called from main goroutine

goroutine 34 [running]:
fyne.io/fyne/internal/driver/glfw.(*gLDriver).Run(0xc00004c2c0)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/driver.go:68 +0x64
fyne.io/fyne/internal/driver/glfw.(*window).ShowAndRun(0xc000058000)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/window.go:387 +0x5e
main.main.func2()
C:/Users/rohan/source/repos/GoApp/main.go:20 +0xdd
fyne.io/fyne/widget.(*Button).Tapped(0xc0002320b0, 0xc00008c000)
C:/Users/rohan/go/src/fyne.io/fyne/widget/button.go:220 +0x9e
fyne.io/fyne/internal/driver/glfw.(*window).mouseClicked.func6()
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/window.go:664 +0x6d
fyne.io/fyne/internal/driver/glfw.(*window).runEventQueue(0xc000204000)
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/window.go:1071 +0x81
created by fyne.io/fyne/internal/driver/glfw.(*gLDriver).createWindow.func1
C:/Users/rohan/go/src/fyne.io/fyne/internal/driver/glfw/window.go:1095 +0x10a
exit status 2

@andydotxyz
Copy link
Member

Don’t call ShowAndRun() a second time, use just Show().

@andydotxyz
Copy link
Member

If you want things to be a little smaller then run the included fyne_settings app and choose “smaller” :)

@ghost
Copy link

ghost commented Jun 3, 2020

Thanks, but for some reason I was not able to run fyne_settings from my terminal. I had to go into /go/src/fyne.io/fyne/cmd/fyne_settings and do go run main.go

@andydotxyz
Copy link
Member

Reports are that this does not happen since 1.3.0 according to @toaster

@mvasl
Copy link

mvasl commented Dec 19, 2021

Not sure if this is right the issue for this, but fyne v2.1.1 still crash on macOS when resizing windows.
go version go1.17.3 darwin/arm64

GOROOT=/Users/max/Go/go1.17.3 #gosetup
GOPATH=/Users/max/Go #gosetup
/Users/max/Go/go1.17.3/bin/go build -o /private/var/folders/52/d96q8f416255_mxv4_5wl0c40000gn/T/GoLand/___build_desktop /Users/max/GolandProjects/pmgr/cmd/pmgr_desktop.go #gosetup
/private/var/folders/52/d96q8f416255_mxv4_5wl0c40000gn/T/GoLand/___build_desktop
-[AGXG13GFamilyCommandBuffer renderCommandEncoderWithDescriptor:]:380: failed assertion `A command encoder is already encoding to this command buffer'
SIGABRT: abort
PC=0x1999819b8 m=4 sigcode=0
signal arrived during cgo execution

goroutine 8 [syscall, locked to thread]:
runtime.cgocall(0x102582af4, 0x14000193378)
        /Users/max/Go/go1.17.3/src/runtime/cgocall.go:156 +0x50 fp=0x14000193340 sp=0x14000193300 pc=0x102223830
github.com/go-gl/gl/v3.2-core/gl._Cfunc_glowDrawArrays(0x1fafbafc4, 0x5, 0x0, 0x4)
        _cgo_gotypes.go:6456 +0x40 fp=0x14000193370 sp=0x14000193340 pc=0x1023ff940
github.com/go-gl/gl/v3.2-core/gl.DrawArrays(...)
        /Users/max/Go/pkg/mod/github.com/go-gl/gl@v0.0.0-20210813123233-e4099ee2221f/v3.2-core/gl/package.go:9557
fyne.io/fyne/v2/internal/painter/gl.(*glPainter).glDrawTexture(0x14000436ae0, 0x1, 0x3f800000)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/painter/gl/gl_core.go:331 +0x148 fp=0x140001933a0 sp=0x14000193370 pc=0x102424dd8
fyne.io/fyne/v2/internal/painter/gl.(*glPainter).drawTextureWithDetails(0x14000436ae0, {0x102708eb0, 0x14000460480}, 0x14000193458, {0x41400000, 0x4266b000}, {0x42aa7800, 0x41a56000}, {0x43c70000, 0x43f68000}, ...)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/painter/gl/draw.go:30 +0x138 fp=0x14000193400 sp=0x140001933a0 pc=0x102421418
fyne.io/fyne/v2/internal/painter/gl.(*glPainter).drawText(0x14000436ae0, 0x14000460480, {0x41400000, 0x4266b000}, {0x43c70000, 0x43f68000})
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/painter/gl/draw.go:88 +0x18c fp=0x14000193470 sp=0x14000193400 pc=0x102421c8c
fyne.io/fyne/v2/internal/painter/gl.(*glPainter).drawObject(0x14000436ae0, {0x102708eb0, 0x14000460480}, {0x41400000, 0x4266b000}, {0x43c70000, 0x43f68000})
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/painter/gl/draw.go:107 +0x334 fp=0x140001934c0 sp=0x14000193470 pc=0x102421fe4
fyne.io/fyne/v2/internal/painter/gl.(*glPainter).Paint(0x14000436ae0, {0x102708eb0, 0x14000460480}, {0x41400000, 0x4266b000}, {0x43c70000, 0x43f68000})
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/painter/gl/painter.go:69 +0x74 fp=0x14000193500 sp=0x140001934c0 pc=0x102425544
fyne.io/fyne/v2/internal/driver/glfw.(*glCanvas).paint.func1(0x14000730540, {0x41400000, 0x4266b000})
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/glfw/canvas.go:279 +0x138 fp=0x14000193570 sp=0x14000193500 pc=0x102516a18
fyne.io/fyne/v2/internal/driver/common.(*Canvas).walkTree.func1({0x102708eb0, 0x14000460480}, {0x41400000, 0x4266b000}, {0x40800000, 0x4246b000}, {0x43c30000, 0x43dbaa00})
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/common/canvas.go:439 +0x2a0 fp=0x140001935c0 sp=0x14000193570 pc=0x102427800
fyne.io/fyne/v2/internal/driver.walkObjectTree({0x102708eb0, 0x14000460480}, 0x0, {0x1027093f0, 0x14000120320}, {0x40800000, 0x4246b000}, {0x40800000, 0x4246b000}, {0x43c30000, ...}, ...)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/util.go:169 +0x214 fp=0x14000193680 sp=0x140001935c0 pc=0x10237ae24
fyne.io/fyne/v2/internal/driver.walkObjectTree.func1(...)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/util.go:176
fyne.io/fyne/v2/internal/driver.walkObjectTree({0x1027093f0, 0x14000120320}, 0x0, {0x102708bb0, 0x140000302c0}, {0x40800000, 0x4246b000}, {0x40800000, 0x4246b000}, {0x43c30000, ...}, ...)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/util.go:190 +0x364 fp=0x14000193740 sp=0x14000193680 pc=0x10237af74
fyne.io/fyne/v2/internal/driver.walkObjectTree.func1(...)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/util.go:176
fyne.io/fyne/v2/internal/driver.walkObjectTree({0x102708bb0, 0x140000302c0}, 0x0, {0x102709690, 0x140003ee540}, {0x40800000, 0x4246b000}, {0x40800000, 0x4246b000}, {0x43c30000, ...}, ...)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/util.go:190 +0x364 fp=0x14000193800 sp=0x14000193740 pc=0x10237af74
fyne.io/fyne/v2/internal/driver.walkObjectTree.func1(...)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/util.go:176
fyne.io/fyne/v2/internal/driver.walkObjectTree({0x102709690, 0x140003ee540}, 0x0, {0x102708bb0, 0x14000730140}, {0x40800000, 0x4246b000}, {0x40800000, 0x4246b000}, {0x43c30000, ...}, ...)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/util.go:190 +0x364 fp=0x140001938c0 sp=0x14000193800 pc=0x10237af74
fyne.io/fyne/v2/internal/driver.walkObjectTree.func1(...)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/util.go:176
fyne.io/fyne/v2/internal/driver.walkObjectTree({0x102708bb0, 0x14000730140}, 0x0, {0x102709150, 0x14000154070}, {0x40800000, 0x4246b000}, {0x40800000, 0x4246b000}, {0x43c30000, ...}, ...)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/util.go:190 +0x364 fp=0x14000193980 sp=0x140001938c0 pc=0x10237af74
fyne.io/fyne/v2/internal/driver.walkObjectTree.func1(...)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/util.go:176
fyne.io/fyne/v2/internal/driver.walkObjectTree({0x102709150, 0x14000154070}, 0x0, {0x102709450, 0x140003ce0a0}, {0x40800000, 0x4246b000}, {0x0, 0x0}, {0x4f000000, ...}, ...)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/util.go:190 +0x364 fp=0x14000193a40 sp=0x14000193980 pc=0x10237af74
fyne.io/fyne/v2/internal/driver.walkObjectTree.func1(...)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/util.go:176
fyne.io/fyne/v2/internal/driver.walkObjectTree({0x102709450, 0x140003ce0a0}, 0x0, {0x102708bb0, 0x1400037b940}, {0x40800000, 0x40800000}, {0x0, 0x0}, {0x4f000000, ...}, ...)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/util.go:190 +0x364 fp=0x14000193b00 sp=0x14000193a40 pc=0x10237af74
fyne.io/fyne/v2/internal/driver.walkObjectTree.func1(...)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/util.go:176
fyne.io/fyne/v2/internal/driver.walkObjectTree({0x102708bb0, 0x1400037b940}, 0x0, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x4f000000, ...}, ...)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/util.go:190 +0x364 fp=0x14000193bc0 sp=0x14000193b00 pc=0x10237af74
fyne.io/fyne/v2/internal/driver.WalkVisibleObjectTree({0x102708bb0, 0x1400037b940}, 0x14000193cb0, 0x14000193c88)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/util.go:134 +0x78 fp=0x14000193c30 sp=0x14000193bc0 pc=0x10237abe8
fyne.io/fyne/v2/internal/driver/common.(*Canvas).walkTree(0x140003f6360, 0x140004a61c0, 0x14000193d98, 0x14000193d68)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/common/canvas.go:460 +0xf4 fp=0x14000193cf0 sp=0x14000193c30 pc=0x1024273e4
fyne.io/fyne/v2/internal/driver/common.(*Canvas).WalkTrees(0x140003f6360, 0x14000193d98, 0x14000193d68)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/common/canvas.go:372 +0x40 fp=0x14000193d40 sp=0x14000193cf0 pc=0x102427000
fyne.io/fyne/v2/internal/driver/glfw.(*glCanvas).paint(0x140003f6360, {0x43c70000, 0x43f68000})
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/glfw/canvas.go:293 +0xdc fp=0x14000193dc0 sp=0x14000193d40 pc=0x1025167bc
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).repaintWindow.func1()
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/glfw/loop.go:174 +0xa4 fp=0x14000193e20 sp=0x14000193dc0 pc=0x102518c04
fyne.io/fyne/v2/internal/driver/glfw.(*window).RunWithContext(0x140003b0400, 0x14000193e60)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/glfw/window.go:1336 +0x58 fp=0x14000193e40 sp=0x14000193e20 pc=0x102521ed8
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).repaintWindow(0x1400007aa50, 0x140003b0400)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/glfw/loop.go:165 +0x50 fp=0x14000193e80 sp=0x14000193e40 pc=0x102518b40
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).startDrawThread.func1(0x1400007aa50, 0x1400007c480, 0x1400007aaf0)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/glfw/loop.go:228 +0x354 fp=0x14000193fc0 sp=0x14000193e80 pc=0x102519124
runtime.goexit()
        /Users/max/Go/go1.17.3/src/runtime/asm_arm64.s:1133 +0x4 fp=0x14000193fc0 sp=0x14000193fc0 pc=0x102286ca4
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).startDrawThread
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/glfw/loop.go:192 +0xac

goroutine 1 [chan send, locked to thread]:
fyne.io/fyne/v2/internal/driver/glfw.runOnDraw(0x140003b0400, 0x140007942c0)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/glfw/loop.go:70 +0xd4
fyne.io/fyne/v2/internal/driver/glfw.(*window).platformResize(0x140003b0400, {0x43df8000, 0x44004000})
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/glfw/window_notlinux.go:14 +0xd8
fyne.io/fyne/v2/internal/driver/glfw.(*window).resized(0x140003b0400, 0x14000462000, 0x1bf, 0x201)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/glfw/window.go:557 +0x100
github.com/go-gl/glfw/v3.3/glfw.goWindowSizeCB(0x113004080, 0x1bf, 0x201)
        /Users/max/Go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20210410170116-ea3d685f79fb/window.go:213 +0x58
github.com/go-gl/glfw/v3.3/glfw._Cfunc_glfwPollEvents()
        _cgo_gotypes.go:1474 +0x40
github.com/go-gl/glfw/v3.3/glfw.PollEvents()
        /Users/max/Go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20210410170116-ea3d685f79fb/window.go:949 +0x20
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).tryPollEvents(0x1400007aa50)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/glfw/loop.go:244 +0x3c
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).runGL(0x1400007aa50)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/glfw/loop.go:109 +0x210
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).Run(0x1400007aa50)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/glfw/driver.go:83 +0x38
fyne.io/fyne/v2/internal/driver/glfw.(*window).ShowAndRun(0x140003b0200)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/glfw/window.go:462 +0x38
main.main()
        /Users/max/GolandProjects/pmgr/cmd/pmgr_desktop.go:15 +0xcc

goroutine 4 [syscall]:
syscall.syscall6(0x10253bd20, 0x3, 0x0, 0x0, 0x1400004be88, 0xa, 0x102bfa1c0)
        /Users/max/Go/go1.17.3/src/runtime/sys_darwin.go:44 +0x1c
golang.org/x/sys/unix.kevent(0x3, 0x0, 0x0, 0x1400004be88, 0xa, 0x102bfa1c0)
        /Users/max/Go/pkg/mod/golang.org/x/sys@v0.0.0-20210630005230-0f9fa26af87c/unix/zsyscall_darwin_arm64.go:276 +0x78
golang.org/x/sys/unix.Kevent(0x3, {0x0, 0x0, 0x0}, {0x1400004be88, 0xa, 0xa}, 0x102bfa1c0)
        /Users/max/Go/pkg/mod/golang.org/x/sys@v0.0.0-20210630005230-0f9fa26af87c/unix/syscall_bsd.go:429 +0x70
github.com/fsnotify/fsnotify.read(0x3, {0x1400004be88, 0xa, 0xa}, 0x102bfa1c0)
        /Users/max/Go/pkg/mod/github.com/fsnotify/fsnotify@v1.4.9/kqueue.go:511 +0x50
github.com/fsnotify/fsnotify.(*Watcher).readEvents(0x1400011d140)
        /Users/max/Go/pkg/mod/github.com/fsnotify/fsnotify@v1.4.9/kqueue.go:274 +0x88
created by github.com/fsnotify/fsnotify.NewWatcher
        /Users/max/Go/pkg/mod/github.com/fsnotify/fsnotify@v1.4.9/kqueue.go:62 +0x1c4

goroutine 5 [chan receive]:
fyne.io/fyne/v2/app.watchFile.func1(0x1400011d140, {0x1400002c370, 0x49}, 0x140003a6e90, 0x140003a6ea0)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/app/settings_desktop.go:42 +0x48
created by fyne.io/fyne/v2/app.watchFile
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/app/settings_desktop.go:41 +0xec

goroutine 6 [syscall]:
syscall.syscall6(0x10253bd20, 0x5, 0x0, 0x0, 0x1400004ce88, 0xa, 0x102bfa1c0)
        /Users/max/Go/go1.17.3/src/runtime/sys_darwin.go:44 +0x1c
golang.org/x/sys/unix.kevent(0x5, 0x0, 0x0, 0x1400004ce88, 0xa, 0x102bfa1c0)
        /Users/max/Go/pkg/mod/golang.org/x/sys@v0.0.0-20210630005230-0f9fa26af87c/unix/zsyscall_darwin_arm64.go:276 +0x78
golang.org/x/sys/unix.Kevent(0x5, {0x0, 0x0, 0x0}, {0x1400004ce88, 0xa, 0xa}, 0x102bfa1c0)
        /Users/max/Go/pkg/mod/golang.org/x/sys@v0.0.0-20210630005230-0f9fa26af87c/unix/syscall_bsd.go:429 +0x70
github.com/fsnotify/fsnotify.read(0x5, {0x1400004ce88, 0xa, 0xa}, 0x102bfa1c0)
        /Users/max/Go/pkg/mod/github.com/fsnotify/fsnotify@v1.4.9/kqueue.go:511 +0x50
github.com/fsnotify/fsnotify.(*Watcher).readEvents(0x1400011d2c0)
        /Users/max/Go/pkg/mod/github.com/fsnotify/fsnotify@v1.4.9/kqueue.go:274 +0x88
created by github.com/fsnotify/fsnotify.NewWatcher
        /Users/max/Go/pkg/mod/github.com/fsnotify/fsnotify@v1.4.9/kqueue.go:62 +0x1c4

goroutine 7 [chan receive]:
fyne.io/fyne/v2/app.watchFile.func1(0x1400011d2c0, {0x1400002fa40, 0x31}, 0x140003a6ed0, 0x140003a6ee0)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/app/settings_desktop.go:42 +0x48
created by fyne.io/fyne/v2/app.watchFile
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/app/settings_desktop.go:41 +0xec

goroutine 9 [chan receive]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x140003b0200)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/common/window.go:57 +0x84
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/glfw/window.go:1395 +0x140

goroutine 10 [select]:
fyne.io/fyne/v2/internal/async.(*UnboundedCanvasObjectChan).processing(0x140003d4ff0)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/async/chan_canvasobject.go:61 +0x2d4
created by fyne.io/fyne/v2/internal/async.NewUnboundedCanvasObjectChan
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/async/chan_canvasobject.go:24 +0x104

goroutine 52 [chan receive]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x140003b0400)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/common/window.go:57 +0x84
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/driver/glfw/window.go:1395 +0x140

goroutine 53 [select]:
fyne.io/fyne/v2/internal/async.(*UnboundedCanvasObjectChan).processing(0x14000796090)
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/async/chan_canvasobject.go:47 +0xc4
created by fyne.io/fyne/v2/internal/async.NewUnboundedCanvasObjectChan
        /Users/max/Go/pkg/mod/fyne.io/fyne/v2@v2.1.1/internal/async/chan_canvasobject.go:24 +0x104

r0      0x0
r1      0x0
r2      0x0
r3      0x0
r4      0x0
r5      0x12
r6      0x0
r7      0x3e
r8      0xcc5a2f65569287e
r9      0xcc5a2f738b1187e
r10     0xcccccccccccccccd
r11     0xa
r12     0x0
r13     0x33
r14     0x20000011000
r15     0x1f2a654a0
r16     0x148
r17     0x1f4193530
r18     0x0
r19     0x6
r20     0x16dd83000
r21     0xb03
r22     0x113218000
r23     0x1efd56000
r24     0x10
r25     0x1eff34000
r26     0x1a2320374
r27     0x850
r28     0x0
r29     0x16dd825e0
lr      0x1999b4eb0
sp      0x16dd825c0
pc      0x1999819b8
fault   0x1999819b8

Process finished with the exit code 2

EDIT: 2.1.2 seems to fix it

@Jacalz
Copy link
Member

Jacalz commented Dec 19, 2021

Not sure if this is right the issue for this, but fyne v2.1.1 still crash on macOS when resizing windows. go version go1.17.3 darwin/arm64

Are you on an M1 machine by any chance? A similar issue should have been fixed with v2.1.2, which currently is the latest release.

@mvasl
Copy link

mvasl commented Dec 19, 2021

Not sure if this is right the issue for this, but fyne v2.1.1 still crash on macOS when resizing windows. go version go1.17.3 darwin/arm64

Are you on an M1 machine by any chance? A similar issue should have been fixed with v2.1.2, which currently is the latest release.

Yes, M1, just tested with 2.1.2, seems working, updated my first post

@Jacalz
Copy link
Member

Jacalz commented Dec 19, 2021

Great. For the record, the issue you are mentioning is #2188 and not this one.
Btw, seems like you already had an issue opened for that over at #2295.

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

4 participants