Repository navigation
Commit 6ba0486
Gateway: catch a zero-height window whenever it happens, not just once (#67)
Reproduced on beryllium 2026-09-22 -- the first repro this bug has had.
The window comes up showing nothing but its title bar, with
Gtk-CRITICAL: gtk_window_resize: assertion 'height > 0' failed
on stderr, and no resize handle to recover with. Crucially it is
INTERMITTENT: the same binary, same machine, same session starts
correctly most times. That is the signature of the wx3.2/GTK3 layout
reentrancy class CLAUDE.md describes, not of a deterministic path --
which also explains why it was never reproducible on the machine it was
originally reported against.
The existing safety net only ran once, at the end of the constructor,
so it could only catch a bad size that was already in place by then. It
now also runs on EVT_SIZE.
Two things it deliberately does NOT do: it does not call SetSize() from
inside the size handler, since that is the very reentrancy suspected of
causing this -- the correction is deferred with CallAfter() to the next
idle, after the in-flight layout pass has finished. And it guards
against queueing more than one correction at a time.
Still a safety net rather than a root cause: it makes the window usable
instead of leaving a title bar the user cannot resize. The root cause
needs someone with the repro to catch it in the act.
Unrelated and still unexplained: the same machine also saw a one-off
"free(): invalid size" at startup, which did not recur under gdb. Not
addressed here; do not assume this commit fixes it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFMUNbw2UpRPmgsqviAowb1 parent e612041 commit 6ba0486
2 files changed
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| 111 | + | |
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
| |||
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
137 | 185 | | |
138 | 186 | | |
139 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
| 112 | + | |
110 | 113 | | |
111 | 114 | | |
112 | 115 | | |
| |||
0 commit comments