Cog/Visualization
Christopher Snowhill b0368a7010 Visualization: Fix race condition on first launch crashing
Due to a race condition with the visualization control racing with
the Crashlytics consent dialog, it was possible that the repaint
function would be called before the control was fully initialized,
which would cause the visualization drawing code to crash due to
division by zero error.

The fix is two-fold: First guards were added to the borrowed
code so that the draw functions won't run if they would later
divide by zero on an uninitialized width property. Secondly, the
top level visualization windows added a startup variable guard
so their drawing code will return immediately if setup has not
completed yet.

Note that this bug was only just noticed in a recent App Store
submission, but was unrelated to the recent commits to the code
base, and could have triggered much earlier in the development
cycle. Strangely, it did not.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-01-15 17:43:03 -08:00
..
ThirdParty/deadbeef Visualization: Fix race condition on first launch crashing 2025-01-15 17:43:03 -08:00
SpectrumItem.h [Spectrum] Enable switching style at runtime 2022-07-05 13:43:21 -07:00
SpectrumItem.m [Spectrum] Enable switching style at runtime 2022-07-05 13:43:21 -07:00
SpectrumViewCG.h Implemented real pitch and time shifting using Rubber Band 2024-12-09 18:04:34 -08:00
SpectrumViewCG.m Visualization: Fix race condition on first launch crashing 2025-01-15 17:43:03 -08:00
SpectrumViewSK.h First module converted to swift, but broken 2022-08-05 21:38:44 -07:00
SpectrumViewSK.m Visualization: Fix race condition on first launch crashing 2025-01-15 17:43:03 -08:00
SpectrumWindowController.h Implemented real pitch and time shifting using Rubber Band 2024-12-09 18:04:34 -08:00
SpectrumWindowController.m Implemented real pitch and time shifting using Rubber Band 2024-12-09 18:04:34 -08:00