nanopb: Crash on startup

I’m getting a strange crash for my iOS app on startup, this crash doesn’t always occur, only sometimes.

This bit of code seems to be the issue, (specifically p[i]):

static bool safe_read_bool(const void *pSize)
{
    const char *p = (const char *)pSize;
    size_t i;
    for (i = 0; i < sizeof(bool); i++)
    {
        if (p[i] != 0)
            return true;
    }
    return false;
}

It’s giving me the following error Thread 1: EXC_BAD_ACCESS (code=1, address=0x1f01ee8ec)

Based on the stacktrace the issue seems to be due to Firebase attempting to start something. What could be the reason for this, how can I rectify it? I’ve been busy for the past few days and can’t seem to find a solution.

Stacktrace: Screenshot 2024-03-14 at 13 09 17

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Comments: 16

Most upvoted comments

Issue is resolved, see above comment.

I would wait for 10.23.0 release, as they fixed something in 10.22.1 that affects only Xcode 15.3, which is not public on CocoaPods yet (the latest public version being 10.22.0) and I would update the sdk to 10.22.0 and use Xcode 15.2 until then instead

Thank you for the help! 😃

Sorry, I meant 10.22.0, not 10.20.0