Qt iOS and NSZombieEnabled
-
Hi all!
I'm seeing a problem on my app of crashes only on iOS with error code: EXC_BAD_ACCESS KERN_INVALID_ADDRESS. After a bit of research, I learned that this is an iOS specific error caused by a dangling pointer. I'm having a lot of trouble trying to repro this crash so I'm trying to fix it but I won't be sure it worked until I deploy. I want to play safe and make sure the app stops crashing even if I somehow didn't manage to fix the dangling pointer. I saw that Xcode has an option to ensure that this error doesn't crash the app and just registers a warning instead. It's the NSZombieEnabled environment variable. I'm using QMake (Qt 5.15.8) and I'm not sure how to specify Xcode environment variables such as this one in my .pro file.
Any help much appreciated!
-
I haven't, but as I mentioned; I can't repro the crash. So I have to fix it using guesswork, which is why I want some kind of failsafe with NSZombieEnabled. I think it might be a race condition issue (crash happens when removing elements from a QVector) so I added mutex locks to these methods, but I won't know for sure until the app is deployed and I see the number of crashes go down. So I just want to be doubly sure it'll fix it.