Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt iOS and NSZombieEnabled

Qt iOS and NSZombieEnabled

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 2 Posters 301 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • NihilishN Offline
    NihilishN Offline
    Nihilish
    wrote on last edited by Nihilish
    #1

    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!

    1 Reply Last reply
    0
    • JoeCFDJ Online
      JoeCFDJ Online
      JoeCFD
      wrote on last edited by
      #2

      Did you try valgrind?

      1 Reply Last reply
      0
      • NihilishN Offline
        NihilishN Offline
        Nihilish
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • JoeCFDJ Online
          JoeCFDJ Online
          JoeCFD
          wrote on last edited by
          #4

          Then try to run the debug build of your app with Valgrind. Valgrind may be able to help you find this specific problem and even more surprises. I normally run my apps with valgrind before releases.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved