Files
proxmark3/tools
Paul KilarandClaude Opus 5 dc718d3e29 ePassport: fix the segfault on startup
The app died with SIGSEGV before drawing anything, on every entry point
including --help.

The window minimum size was pre-seeded into Kivy's Config, and
WindowBase.__init__ is the only place Kivy reads it - so it was applied from
inside WindowSDL.create_window(), while Window.initialized was still False.
If the window SDL has just made is smaller than that minimum, SDL resizes it
on the spot; the resize comes back through the SDL event filter into
EventLoop.idle(), which runs the clock and re-enters create_window(). Still
not initialised, that call runs setup_window() again and resizes again, until
the C stack gives out.

A scaled HiDPI session is enough to reach it: with sdl2-compat on SDL3 under
Wayland sizes come back in logical points, so the inherited 800x600 default
arrives as a 500x375 window, under the 760x520 minimum. Set the minimum on
Window once it exists instead, where the same resize takes Kivy's cheap
already-initialised path.

That exposed a second fault on the same path. _install_kivy_logging attached a
bare StreamHandler() to Kivy's own logger, and kivy.logger replaces sys.stderr
with a stream that feeds whatever is written to it back in as a warning -
kivy/logger.py cautions about exactly this. Any warning _KivyNoise did not
drop answered itself until the recursion limit stopped it, with stderr as the
broken part, so nothing legible came out. Not theoretical: this machine logs
"MTD: Unable to open device" at startup, which would have killed the app as
soon as the segfault was out of the way. Point the handler at the real stderr,
which Kivy leaves alone.

Behaviour change: a window that opens smaller than 760x520 is now grown to it,
rather than the constraint being imposed while the window is built.

Testing: 257 passed, 2 skipped (was 254/2); --help, a plain launch, --dump on
a generated sample and -v all start and stay up; black clean. Python-only
change, so no client or firmware build matrix applies.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-30 14:17:37 -04:00
..
2023-05-27 17:00:28 +02:00
2026-08-19 19:28:17 +02:00
2026-07-15 16:39:15 +02:00
2026-06-07 23:01:20 +02:00
2022-12-31 10:03:17 +01:00
2025-04-29 11:33:22 -04:00
2026-08-29 17:15:52 +02:00
2021-10-06 20:06:17 +02:00
2024-01-07 18:05:48 +01:00
2022-02-13 12:19:06 +01:00
2021-10-06 20:27:55 +02:00
2023-10-15 10:11:27 +02:00
2026-08-28 01:16:30 +02:00
2021-10-06 20:27:55 +02:00
2021-10-06 20:27:55 +02:00
2024-09-13 13:44:16 +02:00
2021-10-06 20:27:55 +02:00
2026-03-23 22:36:47 +01:00