UTM crash if VM window resized to {0, 0, 0, 0}
- Dominant language
- Swift
- Stars
- 35.5k
- Forks
- 1.8k
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 7
Description
**Describe the issue**
While trying to resize VM windows using AppleScript, it occurred to me that the height of the titlebar might be included in the window's bounds, but I didn't know what that titlebar height was.
I ran this AppleScript:
```applescript
tell application "UTM"
set bounds of window "vmname" to {0, 0, 0, 0}
end tell
```
The VM window disappeared, presumably having been made as small as possible and hidden under the top left corner of the menubar.
Then I ran this AppleScript:
```applescript
tell application "UTM"
set b to bounds of window "vmname"
set w to (item 3 of b) - (item 1 of b)
set h to (item 4 of b) - (item 2 of b)
return {w, h}
end tell
```
I was pleased to see the result:
```
{0, 38}
```
which told me the titlebar was 38 pixels tall. As I prepared to integrate this into my window resizing script, however, I noticed that UTM had crashed and thereby regrettably stopped my VMs which had been busy doing important work. It never occurred to me that adjusting UTM's UI using AppleScript could cause it to crash.
**Configuration**
* UTM Version: 4.7.4
* macOS Version: 15.7
* Mac Chip (Intel, M1, ...): M1
**Crash log**
[UTM-2026-03-17-082038.ips.txt](https://github.com/user-attachments/files/26047500/UTM-2026-03-17-082038.ips.txt)
**Debug log**
N/A
**Upload VM**
N/A
Contributor guide
Assessment
This issue has not been assessed yet.