Hi Lauren, hi all --

Okay, I give up on this for now. I cannot reliably reproduce the issue.

My only hypothesis is that we do something wrong with freeing the current Metal texture in sqSqueakOSXMetalView.m:449. Maybe we should tell the Metal framework about this and not just free the pointer... Reading the Metal documentation might help...

At least, the segfault always occurs in the same situation:

1. App window size changed.
2. Morphic ui process detects this via DisplayScreen class>checkForNewScreenSize 
3. The next call to DisplayScreen(Form)>boundingBox triggers a vmIOProcessEvents() in the regular interpreter loop via checkForEventsMayContextSwitch().
4. A display event will be processed ending up in sqSqueakOSXMetalView loadTexturesSubRectangle:
5. The texture update fails in sqSqueakOSXMetaView.m:439.

Nothing of that is out of the ordinary. The tuple (displayBits, displayWidth, displayHeight) seems correct. This leaves the way we free the old texture and allocate a new one.

Best,
Marcel

Am 27.04.2022 11:58:31 schrieb Marcel Taeumel <marcel.taeumel@hpi.de>:

Hi Lauren --

Nope. It just happened by chance. And only in a -f build. Hmm...

[
   DisplayScreen setNewScreenSize: (1024@768) * 1.ยด
   self currentWorld doOneCycle.
   DisplayScreen setNewScreenSize: (1024@768) * 2.
   self currentWorld doOneCycle.
] repeat.

Maybe it is a (Metal) texture allocating/freeing issue ...

Best,
Marcel

Am 27.04.2022 10:45:02 schrieb Marcel Taeumel <marcel.taeumel@hpi.de>:

Hi Lauren --

Thanks for reporting this. I was able to reproduce the issue. I am looking into it right now.

Best,
Marcel

Am 27.04.2022 07:12:41 schrieb Lauren Pullen <drurowin@gmail.com>:

Hi List,

What the subject line says. I had just toggled the UI scale between
200% and 300% and back again and the window had shrunk, so I resized it
to maximize it again and the VM aborted.

The the last call from the VM was in
-[sqSqueakOSXMetalView loadTexturesSubRectangle:]
-[sqSqueakOSXMetalView drawRect:]