[hatari-devel] Re: Hatari crash with --cmd-fifo |
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
Hi, On 18.5.2025 12.37, Thomas Huth wrote:
The problem is that in Main_Init(), Control_CheckUpdates() is called before Screen_Init(), so taking a screenshot via the fifo command fails badly. No clue how to best fix this, though. We could of course skip the SaveScreen if the surface has not been initialized yet, but I'm a little bit afraid that this only papers over the real problem. I think the command fifo should only be taken into consideration once Hatari has properly been initialized. But lLooking at the comment there, the Control_CheckUpdates() has been added for enabling window embedding? Could that maybe be done in a different way, e.g. via a command line option instead?
I moved control socket/fifo input to be processed only after everything is initialized, which fixed the crashes.
I didn't really like adding yet another Hatari CLI option, so I added code to send the embed info when such request is processed (instead of CLI option guaranteeing it to be sent slightly earlier, when screen is initialized).
This could cause some temporary embedding glitches (size mismatches), before things get into sync, but as embedding is only supported for X11, which will soon disappear from distros, it's not much of a priority.
Unfortunately, I do not have any X11 installs on which to test the embedding change I pushed. If somebody is still using X11, please try whether Python UI Hatari window embedding still works as expected!
- Eero
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |