Hitting Jasserts OSX 11.1

Building Projucer I’m hitting this jassert:

jassert (major == 11 && minor == 0);

inside: SystemStats::OperatingSystemType SystemStats::getOperatingSystemType()

NSView set bounds:

// Repaint behaviour of setFrame seemed to change in 10.11, and the drawing became synchronous,
// causing performance issues. But sending an async update causes flickering in older versions,
// hence this version check to use the old behaviour on pre 10.11 machines
static bool isPre10_11 = SystemStats::getOperatingSystemType() <= SystemStats::MacOSX_10_10;
1 Like

Yikes apologies!

Related question after hitting this assert too: why is Juce so focused on translating each possible OS release into an enum value? I mean: I get that it’s nice to ask for the OS version and get an enum back which you can use in a switch, but it isn’t exactly future proof… This issue first popped up when Big Sur got introduced and all asserts on version.major == 10 went off, and now again on for version == 11.0 when Big Sur updated to 11.1 in a short time.

If you don’t have OS development insider knowledge, and thus cannot predict what future version numbers will look like, isn’t it just far more practical to just return the version as a float or such instead? Or even better: a packed 32 bit value with each byte holding a version part? (make that packed 64 bit if you feel a 255 max is too brittle). The latter option also allows perfectly for comparison operators, and allows for more info too.

Or am I missing something here?

4 Likes