Files
AniCraft/docs
Rob CoenenandClaude Opus 5.5 24a2297fa6 fix(shell): closing the window no longer crashes on macOS
On macOS 26 the app aborted when its window closed (the end of a
`--screenshot` run, and the same close path that quitting and the close
button take) with NSRangeException: "Cannot remove an observer
<_NSTouchBarFinderObservation> for the key path "nextResponder" from
<WinitView> because it is not registered as an observer", exit 134.

Cause: accesskit_macos 0.26 subclasses winit's view at runtime and, when
the adapter drops, sets the view's class back. By then AppKit's Touch Bar
finder has observed the view with KVO, which gave it a class of its own;
putting the old class back breaks that observation, and AppKit throws
when it removes it on the next display cycle. Fixed upstream in
accesskit_macos 0.27.2 (AccessKit/accesskit#835), which only eframe and
egui 0.37 can use (egui-winit 0.37 -> accesskit_winit 0.34).

Measured on macOS 26.5 (M1), display awake:
- `anicraft --screenshot`: main 3/3 exit 134, this branch 5/5 exit 0,
  same picture.
- A bare eframe window closed with ViewportCommand::Close: eframe 0.36
  with accesskit 6/8 crashed, without accesskit 0/8, eframe 0.37 with
  accesskit 0/10.

The bump, by egui 0.37's migration notes:
- WidgetType is Role (SelectableLabel -> Button, Checkbox -> CheckBox,
  CollapsingHeader -> DisclosureTriangle, ColorButton -> ColorWell);
  Id::new -> Id::unique; Ui::id -> Ui::scope_id.
- Screenshots come back through a callback (Context::request_screenshot)
  instead of an Event::Screenshot; MouseWheel events carry a source.
- egui now names its own panel and window resize handles for screen
  readers, and hands a tooltip to them as the control's description: the
  pseudo-locale tests list egui's names with its close button, and count
  file paths and open documents' names as data.

wgpu stays at 30. New crates (Linux clipboard: wl-clipboard-rs and its
dependencies; accesskit_ios) are MIT or MIT OR Apache-2.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 20:05:27 +01:00
..