mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-09-09 22:36:00 +00:00
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>