Repository navigation
Commit 5c3589d
Organizer: fix 4 null-pointer crashes on cold start (#66)
getResource() can legitimately return null when a resource fails to
load (e.g. the data server isn't reachable/ready yet) -- three call
sites dereferenced it unconditionally: WxResourceTreeCtrl::loadChildren(),
CalcMgr::getTypeAndState(), and CalcMgr::onSelectionChange(). A fourth,
different bug in the same chain: CalcMgr::focusOnTree() dereferenced
p_contextPanel, which can still be null when the tree control receives
a real GTK focus-in event during CalcMgr::Create() itself, before
p_contextPanel has been constructed -- same premature-event-during-
construction class as the Gateway/GatewayPrefs layout crashes fixed
earlier this session, just via focus instead of size events.
All four found and fixed one at a time via real, symbol-matched
coredumps from a reliable cold-start repro (data server down,
ecce-organizer bootstraps it, launches Organizer immediately).
Verified: Organizer now survives the full startup sequence cleanly and
shows its real login dialog once the data server is reachable, instead
of crashing before any window appears.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent ca7b7ad commit 5c3589d
2 files changed
Lines changed: 34 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2165 | 2165 | | |
2166 | 2166 | | |
2167 | 2167 | | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
| 2176 | + | |
2168 | 2177 | | |
2169 | 2178 | | |
2170 | 2179 | | |
| |||
4868 | 4877 | | |
4869 | 4878 | | |
4870 | 4879 | | |
4871 | | - | |
| 4880 | + | |
| 4881 | + | |
| 4882 | + | |
| 4883 | + | |
4872 | 4884 | | |
4873 | 4885 | | |
4874 | 4886 | | |
| |||
4959 | 4971 | | |
4960 | 4972 | | |
4961 | 4973 | | |
4962 | | - | |
| 4974 | + | |
| 4975 | + | |
| 4976 | + | |
| 4977 | + | |
| 4978 | + | |
| 4979 | + | |
| 4980 | + | |
| 4981 | + | |
| 4982 | + | |
4963 | 4983 | | |
4964 | 4984 | | |
4965 | 4985 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
269 | 280 | | |
270 | 281 | | |
271 | 282 | | |
| |||
0 commit comments