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

tests fail with thousands of "Assertion failure in -[NSMenu _lockForMainMenuItemArray], NSMenu.m:1106" #4572

Closed
2 tasks done
josharian opened this issue Jan 27, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@josharian
Copy link
Contributor

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

Run go test ./.... Result is thousands (or more, I didn't wait for it to stop spewing) of lines like:

2024-01-27 07:58:05.095 glfw.test[33753:5608525] *** Assertion failure in -[NSMenu _lockForMainMenuItemArray], NSMenu.m:1106

How to reproduce

See above.

Screenshots

No response

Example code

Again, see above.

Fyne version

caf50f6

Go compiler version

1.21.6

Operating system and version

macOS Sonoma

Additional Information

I would be happy to try my hand at a fix, but I don't see any clear hints from grepping the source code about where to even start looking.

@josharian josharian added the unverified A bug that has been reported but not verified label Jan 27, 2024
@andydotxyz
Copy link
Member

Do these actually cause a failure, or were they outputting some warnings only?

@Jacalz
Copy link
Member

Jacalz commented Jan 27, 2024

I wonder if this is M1/M2 specific and potentially even a bug in GLFW upstream? This is not something I’ve seen locally on Linux with amd64

@andydotxyz
Copy link
Member

I don't think we have seen it on our Apple test devices either. Perhaps it was lost amongst the image issues.

@josharian
Copy link
Contributor Author

For my future reference, here's the tail of the failure:

[lots of these lines]
2024-01-27 15:56:26.282 glfw.test[63243:5971505] *** Assertion failure in -[NSMenu _lockForMainMenuItemArray], NSMenu.m:1106
panic: test timed out after 10m0s
running tests:
	TestDarwinMenu (9m56s)

goroutine 121 [running]:
testing.(*M).startAlarm.func1()
	/Users/josh/go/1.21/src/testing/testing.go:2259 +0x320
created by time.goFunc
	/Users/josh/go/1.21/src/time/sleep.go:176 +0x38

goroutine 1 [select, locked to thread]:
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).runGL(0x140000fe180)
	/Users/josh/x/fyne/internal/driver/glfw/loop.go:120 +0x14c
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).Run(0x140000fe180)
	/Users/josh/x/fyne/internal/driver/glfw/driver.go:165 +0x78
fyne.io/fyne/v2/internal/driver/glfw.TestMain(0x140000a1ae0)
	/Users/josh/x/fyne/internal/driver/glfw/window_test.go:53 +0x9c
main.main()
	_testmain.go:219 +0x1ac

goroutine 6 [chan receive, 9 minutes]:
fyne.io/fyne/v2/test.NewApp.func1()
	/Users/josh/x/fyne/test/testapp.go:167 +0x44
created by fyne.io/fyne/v2/test.NewApp in goroutine 1
	/Users/josh/x/fyne/test/testapp.go:165 +0x334

goroutine 7 [select, 9 minutes, locked to thread]:
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).startDrawThread.func1()
	/Users/josh/x/fyne/internal/driver/glfw/loop.go:240 +0xa8
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).startDrawThread in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/loop.go:236 +0xc4

goroutine 8 [chan receive, 9 minutes]:
testing.(*T).Run(0x140001029c0, {0x104534205?, 0x1f30457a96a26?}, 0x1046de678)
	/Users/josh/go/1.21/src/testing/testing.go:1649 +0x350
testing.runTests.func1(0x140001029c0?)
	/Users/josh/go/1.21/src/testing/testing.go:2054 +0x48
testing.tRunner(0x140001029c0, 0x14000066d28)
	/Users/josh/go/1.21/src/testing/testing.go:1595 +0xe8
testing.runTests(0x140000a1ae0?, {0x104958fe0, 0x53, 0x53}, {0x14000066e38?, 0x104176e28?, 0x105082980?})
	/Users/josh/go/1.21/src/testing/testing.go:2052 +0x3b4
testing.(*M).Run(0x140000a1ae0)
	/Users/josh/go/1.21/src/testing/testing.go:1925 +0x538
fyne.io/fyne/v2/internal/driver/glfw.TestMain.func1()
	/Users/josh/x/fyne/internal/driver/glfw/window_test.go:46 +0x40
created by fyne.io/fyne/v2/internal/driver/glfw.TestMain in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window_test.go:40 +0x6c

goroutine 9 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 10 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 18 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).catchTerm(0x0?)
	/Users/josh/x/fyne/internal/driver/glfw/driver_desktop.go:182 +0x7c
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).Run in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/driver.go:164 +0x70

goroutine 19 [syscall, 9 minutes]:
os/signal.signal_recv()
	/Users/josh/go/1.21/src/runtime/sigqueue.go:149 +0x2c
os/signal.loop()
	/Users/josh/go/1.21/src/os/signal/signal_unix.go:23 +0x1c
created by os/signal.Notify.func1.1 in goroutine 18
	/Users/josh/go/1.21/src/os/signal/signal.go:151 +0x28

goroutine 14 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x1400011c030?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 13 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 143 [runnable]:
fyne.io/fyne/v2/internal/driver/glfw._Cfunc_test_NSMenu_removeItemAtIndex(0x600003167700, 0x1)
	_cgo_gotypes.go:316 +0x30
fyne.io/fyne/v2/internal/driver/glfw.resetMainMenu.testNSMenuRemoveItemAtIndex.func4(0x600003167700?, 0x1?)
	/Users/josh/x/fyne/internal/driver/glfw/menu_darwin.go:324 +0x50
fyne.io/fyne/v2/internal/driver/glfw.testNSMenuRemoveItemAtIndex(...)
	/Users/josh/x/fyne/internal/driver/glfw/menu_darwin.go:324
fyne.io/fyne/v2/internal/driver/glfw.resetMainMenu()
	/Users/josh/x/fyne/internal/driver/glfw/menu_darwin_test.go:300 +0xec
fyne.io/fyne/v2/internal/driver/glfw.TestDarwinMenu(0x14000b4c820)
	/Users/josh/x/fyne/internal/driver/glfw/menu_darwin_test.go:19 +0xa8
testing.tRunner(0x14000b4c820, 0x1046de678)
	/Users/josh/go/1.21/src/testing/testing.go:1595 +0xe8
created by testing.(*T).Run in goroutine 8
	/Users/josh/go/1.21/src/testing/testing.go:1648 +0x33c

goroutine 16 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 38 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 39 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 51 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 52 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 54 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 55 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 41 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 42 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 57 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 58 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 60 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 61 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 67 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 68 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 46 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 47 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 82 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x14000303040?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 98 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 99 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 73 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 74 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 84 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 85 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 49 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 114 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 116 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 117 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 119 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 120 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 87 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 88 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 90 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 91 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 93 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 94 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 147 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 100 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 101 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 130 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 131 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 76 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 77 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 79 [select, 9 minutes]:
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1046e98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 80 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 148 [chan receive, 9 minutes]:
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150
FAIL	fyne.io/fyne/v2/internal/driver/glfw	602.334s

josharian added a commit to josharian/fyne that referenced this issue Jan 28, 2024
This provides robustness when the rendering engine
behaves (ever so) slightly differently.

Fixes fyne-io#4573 (I think, I can't be entirely sure
because my tests still fail because of fyne-io#4572)

While we're here, let gofumpt add an octal marker to 0o755.
@josharian
Copy link
Contributor Author

If I run just that test, I get an immediate crash and a helpful diagnostic:

$ go test -run=TestDarwinMenu -v ./internal/driver/glfw 
# fyne.io/fyne/v2/internal/driver/glfw.test
ld: warning: ignoring duplicate libraries: '-lobjc'
=== RUN   TestDarwinMenu
2024-01-27 16:10:46.320 glfw.test[64885:5990197] *** Assertion failure in -[NSMenu _lockForMainMenuItemArray], NSMenu.m:1106
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'API misuse: modification of a menu's items on a non-main thread when the menu is part of the main menu. Main menu contents may only be modified from the main thread.'
*** First throw call stack:
(
	0   CoreFoundation                      0x00000001841f8570 __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x0000000183ce9eb4 objc_exception_throw + 60
	2   Foundation                          0x000000018534043c -[NSCalendarDate initWithCoder:] + 0
	3   AppKit                              0x0000000187951090 -[NSMenu itemArray] + 32
	4   glfw.test                           0x00000001004e44f8 resetDarwinMenu + 48
	5   glfw.test                           0x00000001001b73dc runtime.asmcgocall.abi0 + 124
)
libc++abi: terminating due to uncaught exception of type NSException
SIGABRT: abort
PC=0x18406e0dc m=10 sigcode=0
signal arrived during cgo execution

goroutine 50 [syscall]:
runtime.cgocall(0x1004e3dc8, 0x140002acc88)
	/Users/josh/go/1.21/src/runtime/cgocall.go:157 +0x44 fp=0x140002acc50 sp=0x140002acc10 pc=0x10014e2f4
fyne.io/fyne/v2/internal/driver/glfw._Cfunc_resetDarwinMenu()
	_cgo_gotypes.go:198 +0x30 fp=0x140002acc80 sp=0x140002acc50 pc=0x1004d05c0
fyne.io/fyne/v2/internal/driver/glfw.clearNativeMenu(...)
	/Users/josh/x/fyne/internal/driver/glfw/menu_darwin.go:116
fyne.io/fyne/v2/internal/driver/glfw.setupNativeMenu(0x10050dcab?, 0x140002ace58)
	/Users/josh/x/fyne/internal/driver/glfw/menu_darwin.go:285 +0x28 fp=0x140002accd0 sp=0x140002acc80 pc=0x1004d2018
fyne.io/fyne/v2/internal/driver/glfw.TestDarwinMenu(0x140003401a0)
	/Users/josh/x/fyne/internal/driver/glfw/menu_darwin_test.go:61 +0xc20 fp=0x140002acf60 sp=0x140002accd0 pc=0x1004b7430
testing.tRunner(0x140003401a0, 0x1006be678)
	/Users/josh/go/1.21/src/testing/testing.go:1595 +0xe8 fp=0x140002acfb0 sp=0x140002acf60 pc=0x10022a798
testing.(*T).Run.func1()
	/Users/josh/go/1.21/src/testing/testing.go:1648 +0x2c fp=0x140002acfd0 sp=0x140002acfb0 pc=0x10022b5ac
runtime.goexit()
	/Users/josh/go/1.21/src/runtime/asm_arm64.s:1197 +0x4 fp=0x140002acfd0 sp=0x140002acfd0 pc=0x1001b75e4
created by testing.(*T).Run in goroutine 23
	/Users/josh/go/1.21/src/testing/testing.go:1648 +0x33c

goroutine 1 [select, locked to thread]:
runtime.gopark(0x140001afdd8?, 0x3?, 0x18?, 0xfc?, 0x140001afd62?)
	/Users/josh/go/1.21/src/runtime/proc.go:398 +0xc8 fp=0x140001afbb0 sp=0x140001afb90 pc=0x100183dd8
runtime.selectgo(0x140001afdd8, 0x140001afd5c, 0x1010991c0?, 0x0, 0x14eb599a0?, 0x1)
	/Users/josh/go/1.21/src/runtime/select.go:327 +0x608 fp=0x140001afcc0 sp=0x140001afbb0 pc=0x100195078
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).runGL(0x14000136180)
	/Users/josh/x/fyne/internal/driver/glfw/loop.go:120 +0x14c fp=0x140001afe10 sp=0x140001afcc0 pc=0x1004a356c
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).Run(0x14000136180)
	/Users/josh/x/fyne/internal/driver/glfw/driver.go:165 +0x78 fp=0x140001afe40 sp=0x140001afe10 pc=0x1004a2108
fyne.io/fyne/v2/internal/driver/glfw.TestMain(0x140000c1ae0)
	/Users/josh/x/fyne/internal/driver/glfw/window_test.go:53 +0x9c fp=0x140001afe70 sp=0x140001afe40 pc=0x1004bbc0c
main.main()
	_testmain.go:219 +0x1ac fp=0x140001aff30 sp=0x140001afe70 pc=0x1004e399c
runtime.main()
	/Users/josh/go/1.21/src/runtime/proc.go:267 +0x2bc fp=0x140001affd0 sp=0x140001aff30 pc=0x10018397c
runtime.goexit()
	/Users/josh/go/1.21/src/runtime/asm_arm64.s:1197 +0x4 fp=0x140001affd0 sp=0x140001affd0 pc=0x1001b75e4

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/Users/josh/go/1.21/src/runtime/proc.go:398 +0xc8 fp=0x14000058f90 sp=0x14000058f70 pc=0x100183dd8
runtime.goparkunlock(...)
	/Users/josh/go/1.21/src/runtime/proc.go:404
runtime.forcegchelper()
	/Users/josh/go/1.21/src/runtime/proc.go:322 +0xb8 fp=0x14000058fd0 sp=0x14000058f90 pc=0x100183c38
runtime.goexit()
	/Users/josh/go/1.21/src/runtime/asm_arm64.s:1197 +0x4 fp=0x14000058fd0 sp=0x14000058fd0 pc=0x1001b75e4
created by runtime.init.6 in goroutine 1
	/Users/josh/go/1.21/src/runtime/proc.go:310 +0x24

goroutine 18 [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/Users/josh/go/1.21/src/runtime/proc.go:398 +0xc8 fp=0x14000054760 sp=0x14000054740 pc=0x100183dd8
runtime.goparkunlock(...)
	/Users/josh/go/1.21/src/runtime/proc.go:404
runtime.bgsweep(0x0?)
	/Users/josh/go/1.21/src/runtime/mgcsweep.go:280 +0xa0 fp=0x140000547b0 sp=0x14000054760 pc=0x10016ea70
runtime.gcenable.func1()
	/Users/josh/go/1.21/src/runtime/mgc.go:200 +0x28 fp=0x140000547d0 sp=0x140000547b0 pc=0x100163568
runtime.goexit()
	/Users/josh/go/1.21/src/runtime/asm_arm64.s:1197 +0x4 fp=0x140000547d0 sp=0x140000547d0 pc=0x1001b75e4
created by runtime.gcenable in goroutine 1
	/Users/josh/go/1.21/src/runtime/mgc.go:200 +0x6c

goroutine 19 [GC scavenge wait]:
runtime.gopark(0x1400009e000?, 0x1005c0238?, 0x1?, 0x0?, 0x140000924e0?)
	/Users/josh/go/1.21/src/runtime/proc.go:398 +0xc8 fp=0x14000054f50 sp=0x14000054f30 pc=0x100183dd8
runtime.goparkunlock(...)
	/Users/josh/go/1.21/src/runtime/proc.go:404
runtime.(*scavengerState).park(0x101062a00)
	/Users/josh/go/1.21/src/runtime/mgcscavenge.go:425 +0x5c fp=0x14000054f80 sp=0x14000054f50 pc=0x10016c31c
runtime.bgscavenge(0x0?)
	/Users/josh/go/1.21/src/runtime/mgcscavenge.go:653 +0x44 fp=0x14000054fb0 sp=0x14000054f80 pc=0x10016c874
runtime.gcenable.func2()
	/Users/josh/go/1.21/src/runtime/mgc.go:201 +0x28 fp=0x14000054fd0 sp=0x14000054fb0 pc=0x100163508
runtime.goexit()
	/Users/josh/go/1.21/src/runtime/asm_arm64.s:1197 +0x4 fp=0x14000054fd0 sp=0x14000054fd0 pc=0x1001b75e4
created by runtime.gcenable in goroutine 1
	/Users/josh/go/1.21/src/runtime/mgc.go:201 +0xac

goroutine 20 [finalizer wait]:
runtime.gopark(0x14000092820?, 0x1a0?, 0xe8?, 0x85?, 0x100301cdc?)
	/Users/josh/go/1.21/src/runtime/proc.go:398 +0xc8 fp=0x14000058580 sp=0x14000058560 pc=0x100183dd8
runtime.runfinq()
	/Users/josh/go/1.21/src/runtime/mfinal.go:193 +0x108 fp=0x140000587d0 sp=0x14000058580 pc=0x100162618
runtime.goexit()
	/Users/josh/go/1.21/src/runtime/asm_arm64.s:1197 +0x4 fp=0x140000587d0 sp=0x140000587d0 pc=0x1001b75e4
created by runtime.createfing in goroutine 1
	/Users/josh/go/1.21/src/runtime/mfinal.go:163 +0x80

goroutine 21 [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/Users/josh/go/1.21/src/runtime/proc.go:398 +0xc8 fp=0x140000556d0 sp=0x140000556b0 pc=0x100183dd8
runtime.chanrecv(0x140000a8480, 0x0, 0x1)
	/Users/josh/go/1.21/src/runtime/chan.go:583 +0x414 fp=0x14000055750 sp=0x140000556d0 pc=0x100150624
runtime.chanrecv1(0x0?, 0x0?)
	/Users/josh/go/1.21/src/runtime/chan.go:442 +0x14 fp=0x14000055780 sp=0x14000055750 pc=0x1001501d4
fyne.io/fyne/v2/test.NewApp.func1()
	/Users/josh/x/fyne/test/testapp.go:167 +0x44 fp=0x140000557d0 sp=0x14000055780 pc=0x10049a5f4
runtime.goexit()
	/Users/josh/go/1.21/src/runtime/asm_arm64.s:1197 +0x4 fp=0x140000557d0 sp=0x140000557d0 pc=0x1001b75e4
created by fyne.io/fyne/v2/test.NewApp in goroutine 1
	/Users/josh/x/fyne/test/testapp.go:165 +0x334

goroutine 22 [select, locked to thread]:
runtime.gopark(0x14000055f88?, 0x4?, 0x0?, 0x0?, 0x14000055f30?)
	/Users/josh/go/1.21/src/runtime/proc.go:398 +0xc8 fp=0x14000055dd0 sp=0x14000055db0 pc=0x100183dd8
runtime.selectgo(0x14000055f88, 0x14000055f28, 0x0?, 0x0, 0x0?, 0x1)
	/Users/josh/go/1.21/src/runtime/select.go:327 +0x608 fp=0x14000055ee0 sp=0x14000055dd0 pc=0x100195078
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).startDrawThread.func1()
	/Users/josh/x/fyne/internal/driver/glfw/loop.go:240 +0xa8 fp=0x14000055fd0 sp=0x14000055ee0 pc=0x1004a3d98
runtime.goexit()
	/Users/josh/go/1.21/src/runtime/asm_arm64.s:1197 +0x4 fp=0x14000055fd0 sp=0x14000055fd0 pc=0x1001b75e4
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).startDrawThread in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/loop.go:236 +0xc4

goroutine 23 [chan receive]:
runtime.gopark(0x14000149ab8?, 0x10015726c?, 0x78?, 0xc0?, 0x18?)
	/Users/josh/go/1.21/src/runtime/proc.go:398 +0xc8 fp=0x14000149a40 sp=0x14000149a20 pc=0x100183dd8
runtime.chanrecv(0x1400033e070, 0x14000149b3f, 0x1)
	/Users/josh/go/1.21/src/runtime/chan.go:583 +0x414 fp=0x14000149ac0 sp=0x14000149a40 pc=0x100150624
runtime.chanrecv1(0x101062280?, 0x10061b7c0?)
	/Users/josh/go/1.21/src/runtime/chan.go:442 +0x14 fp=0x14000149af0 sp=0x14000149ac0 pc=0x1001501d4
testing.(*T).Run(0x14000340000, {0x100514205?, 0x1f45840827455?}, 0x1006be678)
	/Users/josh/go/1.21/src/testing/testing.go:1649 +0x350 fp=0x14000149bb0 sp=0x14000149af0 pc=0x10022b470
testing.runTests.func1(0x1400032a0c0?)
	/Users/josh/go/1.21/src/testing/testing.go:2054 +0x48 fp=0x14000149c00 sp=0x14000149bb0 pc=0x10022d298
testing.tRunner(0x14000340000, 0x14000149d28)
	/Users/josh/go/1.21/src/testing/testing.go:1595 +0xe8 fp=0x14000149c50 sp=0x14000149c00 pc=0x10022a798
testing.runTests(0x140000c1ae0?, {0x100938fe0, 0x53, 0x53}, {0x140002ace38?, 0x100156e28?, 0x101062980?})
	/Users/josh/go/1.21/src/testing/testing.go:2052 +0x3b4 fp=0x14000149d50 sp=0x14000149c50 pc=0x10022d194
testing.(*M).Run(0x140000c1ae0)
	/Users/josh/go/1.21/src/testing/testing.go:1925 +0x538 fp=0x14000149fa0 sp=0x14000149d50 pc=0x10022be68
fyne.io/fyne/v2/internal/driver/glfw.TestMain.func1()
	/Users/josh/x/fyne/internal/driver/glfw/window_test.go:46 +0x40 fp=0x14000149fd0 sp=0x14000149fa0 pc=0x1004bbc70
runtime.goexit()
	/Users/josh/go/1.21/src/runtime/asm_arm64.s:1197 +0x4 fp=0x14000149fd0 sp=0x14000149fd0 pc=0x1001b75e4
created by fyne.io/fyne/v2/internal/driver/glfw.TestMain in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window_test.go:40 +0x6c

goroutine 24 [select]:
runtime.gopark(0x14000056f58?, 0x2?, 0xc0?, 0x91?, 0x14000056ee8?)
	/Users/josh/go/1.21/src/runtime/proc.go:398 +0xc8 fp=0x14000056d80 sp=0x14000056d60 pc=0x100183dd8
runtime.selectgo(0x14000056f58, 0x14000056ee4, 0x0?, 0x0, 0x0?, 0x1)
	/Users/josh/go/1.21/src/runtime/select.go:327 +0x608 fp=0x14000056e90 sp=0x14000056d80 pc=0x100195078
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1006c98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4 fp=0x14000056fb0 sp=0x14000056e90 pc=0x1002cab04
fyne.io/fyne/v2/internal/async.NewUnboundedChan[...].func1()
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x2c fp=0x14000056fd0 sp=0x14000056fb0 pc=0x1002caa1c
runtime.goexit()
	/Users/josh/go/1.21/src/runtime/asm_arm64.s:1197 +0x4 fp=0x14000056fd0 sp=0x14000056fd0 pc=0x1001b75e4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 25 [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/Users/josh/go/1.21/src/runtime/proc.go:398 +0xc8 fp=0x140000576d0 sp=0x140000576b0 pc=0x100183dd8
runtime.chanrecv(0x140000a44e0, 0x140000577a0, 0x1)
	/Users/josh/go/1.21/src/runtime/chan.go:583 +0x414 fp=0x14000057750 sp=0x140000576d0 pc=0x100150624
runtime.chanrecv2(0x0?, 0x0?)
	/Users/josh/go/1.21/src/runtime/chan.go:447 +0x14 fp=0x14000057780 sp=0x14000057750 pc=0x1001501f4
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48 fp=0x140000577b0 sp=0x14000057780 pc=0x100447898
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1.1()
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x28 fp=0x140000577d0 sp=0x140000577b0 pc=0x1004abe38
runtime.goexit()
	/Users/josh/go/1.21/src/runtime/asm_arm64.s:1197 +0x4 fp=0x140000577d0 sp=0x140000577d0 pc=0x1001b75e4
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

goroutine 34 [chan receive]:
runtime.gopark(0x1400029c6c8?, 0x100236f4c?, 0x2?, 0x0?, 0x100646000?)
	/Users/josh/go/1.21/src/runtime/proc.go:398 +0xc8 fp=0x1400029c6a0 sp=0x1400029c680 pc=0x100183dd8
runtime.chanrecv(0x140000a45a0, 0x0, 0x1)
	/Users/josh/go/1.21/src/runtime/chan.go:583 +0x414 fp=0x1400029c720 sp=0x1400029c6a0 pc=0x100150624
runtime.chanrecv1(0x140000a45a0?, 0x1400029c788?)
	/Users/josh/go/1.21/src/runtime/chan.go:442 +0x14 fp=0x1400029c750 sp=0x1400029c720 pc=0x1001501d4
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).catchTerm(0x0?)
	/Users/josh/x/fyne/internal/driver/glfw/driver_desktop.go:182 +0x7c fp=0x1400029c7b0 sp=0x1400029c750 pc=0x1004a2bfc
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).Run.func1()
	/Users/josh/x/fyne/internal/driver/glfw/driver.go:164 +0x28 fp=0x1400029c7d0 sp=0x1400029c7b0 pc=0x1004a2168
runtime.goexit()
	/Users/josh/go/1.21/src/runtime/asm_arm64.s:1197 +0x4 fp=0x1400029c7d0 sp=0x1400029c7d0 pc=0x1001b75e4
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).Run in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/driver.go:164 +0x70

goroutine 26 [select, locked to thread]:
runtime.gopark(0x14000057fa0?, 0x2?, 0x0?, 0x0?, 0x14000057f9c?)
	/Users/josh/go/1.21/src/runtime/proc.go:398 +0xc8 fp=0x14000057e40 sp=0x14000057e20 pc=0x100183dd8
runtime.selectgo(0x14000057fa0, 0x14000057f98, 0x0?, 0x0, 0x0?, 0x1)
	/Users/josh/go/1.21/src/runtime/select.go:327 +0x608 fp=0x14000057f50 sp=0x14000057e40 pc=0x100195078
runtime.ensureSigM.func1()
	/Users/josh/go/1.21/src/runtime/signal_unix.go:1014 +0x168 fp=0x14000057fd0 sp=0x14000057f50 pc=0x1001ae388
runtime.goexit()
	/Users/josh/go/1.21/src/runtime/asm_arm64.s:1197 +0x4 fp=0x14000057fd0 sp=0x14000057fd0 pc=0x1001b75e4
created by runtime.ensureSigM in goroutine 34
	/Users/josh/go/1.21/src/runtime/signal_unix.go:997 +0xd8

goroutine 37 [syscall]:
runtime.sigNoteSleep(0x0)
	/Users/josh/go/1.21/src/runtime/os_darwin.go:124 +0x20 fp=0x1400029d790 sp=0x1400029d750 pc=0x10017e190
os/signal.signal_recv()
	/Users/josh/go/1.21/src/runtime/sigqueue.go:149 +0x2c fp=0x1400029d7b0 sp=0x1400029d790 pc=0x1001b340c
os/signal.loop()
	/Users/josh/go/1.21/src/os/signal/signal_unix.go:23 +0x1c fp=0x1400029d7d0 sp=0x1400029d7b0 pc=0x10023743c
runtime.goexit()
	/Users/josh/go/1.21/src/runtime/asm_arm64.s:1197 +0x4 fp=0x1400029d7d0 sp=0x1400029d7d0 pc=0x1001b75e4
created by os/signal.Notify.func1.1 in goroutine 34
	/Users/josh/go/1.21/src/os/signal/signal.go:151 +0x28

goroutine 51 [select]:
runtime.gopark(0x14000298758?, 0x2?, 0xc0?, 0x91?, 0x140002986e8?)
	/Users/josh/go/1.21/src/runtime/proc.go:398 +0xc8 fp=0x14000298580 sp=0x14000298560 pc=0x100183dd8
runtime.selectgo(0x14000298758, 0x140002986e4, 0x14000298718?, 0x0, 0x140002986d0?, 0x1)
	/Users/josh/go/1.21/src/runtime/select.go:327 +0x608 fp=0x14000298690 sp=0x14000298580 pc=0x100195078
fyne.io/fyne/v2/internal/async.(*UnboundedChan[...]).processing(0x1006c98c0)
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:74 +0xb4 fp=0x140002987b0 sp=0x14000298690 pc=0x1002cab04
fyne.io/fyne/v2/internal/async.NewUnboundedChan[...].func1()
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x2c fp=0x140002987d0 sp=0x140002987b0 pc=0x1002caa1c
runtime.goexit()
	/Users/josh/go/1.21/src/runtime/asm_arm64.s:1197 +0x4 fp=0x140002987d0 sp=0x140002987d0 pc=0x1001b75e4
created by fyne.io/fyne/v2/internal/async.NewUnboundedChan[...] in goroutine 1
	/Users/josh/x/fyne/internal/async/chan_go1.21.go:51 +0x10c

goroutine 52 [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/Users/josh/go/1.21/src/runtime/proc.go:398 +0xc8 fp=0x14000298ed0 sp=0x14000298eb0 pc=0x100183dd8
runtime.chanrecv(0x14000308120, 0x14000298fa0, 0x1)
	/Users/josh/go/1.21/src/runtime/chan.go:583 +0x414 fp=0x14000298f50 sp=0x14000298ed0 pc=0x100150624
runtime.chanrecv2(0x0?, 0x0?)
	/Users/josh/go/1.21/src/runtime/chan.go:447 +0x14 fp=0x14000298f80 sp=0x14000298f50 pc=0x1001501f4
fyne.io/fyne/v2/internal/driver/common.(*Window).RunEventQueue(0x0?)
	/Users/josh/x/fyne/internal/driver/common/window.go:34 +0x48 fp=0x14000298fb0 sp=0x14000298f80 pc=0x100447898
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1.1()
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x28 fp=0x14000298fd0 sp=0x14000298fb0 pc=0x1004abe38
runtime.goexit()
	/Users/josh/go/1.21/src/runtime/asm_arm64.s:1197 +0x4 fp=0x14000298fd0 sp=0x14000298fd0 pc=0x1001b75e4
created by fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1 in goroutine 1
	/Users/josh/x/fyne/internal/driver/glfw/window.go:957 +0x150

r0      0x0
r1      0x0
r2      0x0
r3      0x0
r4      0x184061377
r5      0x174749d60
r6      0x6e
r7      0x880
r8      0xbce85ab7f57c247e
r9      0xbce85ab68108947e
r10     0x200
r11     0xb
r12     0x0
r13     0x1ff800
r14     0x7fb
r15     0xc4809020
r16     0x148
r17     0x1e38f7340
r18     0x0
r19     0x6
r20     0x17474b000
r21     0xbc03
r22     0x17474b0e0
r23     0x1dea82808
r24     0x0
r25     0x0
r26     0x140002acc30
r27     0x810
r28     0x14000003520
r29     0x174749cd0
lr      0x1840a5cc0
sp      0x174749cb0
pc      0x18406e0dc
fault   0x18406e0dc
FAIL	fyne.io/fyne/v2/internal/driver/glfw	0.841s
FAIL

@josharian
Copy link
Contributor Author

@andydotxyz @Jacalz does that diagnostic output suggest any fixes to you? I tried a few things but made no progress.

josharian added a commit to josharian/fyne that referenced this issue Jan 28, 2024
This provides robustness when the rendering engine
behaves (ever so) slightly differently.

Fixes fyne-io#4573 (I think, I can't be entirely sure
because my tests still fail because of fyne-io#4572)

While we're here, let gofumpt add an octal marker to 0o755.
@andydotxyz
Copy link
Member

Thanks. This seems to be a new issue as I just started seeing it as well.
Our CI does not currently run on an M1 so I guess this may be apple silicon on a recent macOS SDK issue.

@andydotxyz
Copy link
Member

andydotxyz added a commit to andydotxyz/fyne that referenced this issue Jan 28, 2024
@andydotxyz
Copy link
Member

Fixed on develop branch :) thanks for the report

@Jacalz Jacalz added bug Something isn't working and removed unverified A bug that has been reported but not verified labels Jan 29, 2024
andydotxyz added a commit that referenced this issue Feb 8, 2024
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

3 participants