ITADN

ChessboardView.layoutSubviews() crashes when prompt panel is dragged to zero canvas height

#82Openbemo-git 创建于 2026-05-25
B
bemo-gitcommented
**Describe the bug** Dragging the prompt panel divider upward until the canvas (checkerboard) area is fully collapsed causes an immediate `EXC_BREAKPOINT` crash. This is only possible when the prompt is long enough that the panel can grow to fill the full window height — short prompts don't allow the divider to travel far enough to trigger it. By contrast, resizing the app window itself correctly enforces a minimum size so the canvas never reaches zero that way. On subsequent launches, macOS may restore the window to the same collapsed state and crash-loop — repeatedly showing the "Reopen Windows?" dialog — until the saved window state is manually deleted. **To reproduce** 1. Enter a long prompt (in testing: ~7000 characters) 2. Drag the prompt panel divider upward until the canvas/checkerboard area completely disappears 3. App crashes immediately 4. On next launch, app may crash-loop (macOS restores the collapsed state) **Expected behaviour** The prompt panel divider should enforce a minimum canvas height (as window resizing already does). As a secondary guard, `ChessboardView.layoutSubviews()` should also handle zero bounds without trapping. **Crash signature** ``` Exception Type: EXC_BREAKPOINT (SIGTRAP) Crashed Thread: 0 Dispatch queue: com.apple.main-thread 0 DrawThings InfiniteCanvas.ChessboardView.layoutSubviews() + 1052 1 DrawThings InfiniteCanvas.ChessboardView.layoutSubviews() + 124 ``` Registers at crash show `x8 = 0x7ff0000000000000` (IEEE 754 negative infinity) — the canvas bounds resolve to infinity when the view has zero size, which traps on conversion to Int. **Workaround (if crash-looping)** Delete `~/Library/Containers/com.liuliu.draw-things/Data/Library/Saved Application State/com.liuliu.draw-things~iosmac.savedState/` and relaunch, choosing "Don't Reopen" if prompted. **Environment** - macOS 15.7.3 (24G419) - Draw Things 1.20260518.2 - MacBook Pro M2 Max (Mac14,6)
0 条评论