Xojo 2020 R1 first run of my project in Windows this morning I run into this error:
Framework failed assertion at REALString.cpp:130
Condition: usageCount
What’s worse is that it happens so early in the process it simply hard crashes the app. It wasn’t until I put in a breakpoint or two that it actually gave me an error message.
I did submit this bug in the beta program in mid August but it was obviously not fixed.
Sadly REALString.cpp:130 just tells you the reference counting for a string is broken.
You have to know which string it is, which functions handled it and then maybe you can find the plugin or framework function not doing the proper retain call.
If you know which string it is, just put it in a global variable to increase reference count.
Or add to global array a few times to make sure it is not released.
You could run the app via lldb (on macOS) and put a break point at functions with DisplayFailedAssertion in the name. Then print back trace and maybe print the parameter to the function and look in the structure for the string to find the pointer to the string and look what’s inside. Not easy, but I remember doing something like this in past years to investigate a bug.
there seem to be many other reports & reasons this exception can come up
I founf at least 3 others with that exect description in feedback and others that seem to also mention it
We asked long ago for having more assertions changed to raise exceptions instead.
Like this could raise an exception telling string reference counting is broken for a string.