YUView icon indicating copy to clipboard operation
YUView copied to clipboard

fix: resolve crashes caused by using the ffmpeg library

Open julee opened this issue 1 year ago • 3 comments

  • Addressed issue where repeated reloading of the ffmpeg library led to crashes. Previously, each component attempted to load the ffmpeg library and executed an unload before loading, causing other components to retain stale function addresses if the library was reloaded at a different address. This issue was particularly prevalent on macOS.
  • Fixed undefined behavior due to incorrect size assumption of std::function objects. On certain platforms like arm64 macOS, sizeof(std::function<void()>) is 32, not the same as a pointer size. This discrepancy led to undefined behavior when forcibly casting.

This fix ensures that the library is loaded only once per process and corrects the handling of std::function objects to prevent crashes.

julee avatar Jul 17 '24 04:07 julee

The issue is that an I/O intensive process is happening in the main thread as the GUI, so the GUI becomes unresponsive. The solution would be to run a worker in a background thread. I agree this needs to be improved, but it adds complexity with little benefit: the GUI is not very useful during this process.

Usually during the wiping process, the GUI is partially responsive in case the user clicked "abort" or the X (exit), but during a few parts of the process, it becomes even less responsive.

az0 avatar Aug 16 '24 03:08 az0

See the prototype at https://github.com/bleachbit/bleachbit/issues/968 . To get updates, click the "subscribe" button on that page.

az0 avatar Mar 15 '25 00:03 az0