SDKBOX OneSignal crash on startup

I’m at the end of my rope on this one. I’m getting an intermittent crash on the OneSignal SDKBOX plugin on startup. Often I’ll restart and it’s just magically gone. Or I’ll start up after a while and it crashes. I’ve tried updating to the latest Cocos version, updating the SDKBOX plugins, cleaning the entire solution. The issue keeps coming back.

Here’s a screenshot of the issue. I’m fairly certain this is a bug inside of SDKBOX’s OneSignal plugin implementation. I’m supposed to be finishing my build of this game today and I’ve definitely lost trust in SDKBOX here.

I can definitely say the following:

  • It seems like a race condition, since I can run the app 10 times and it’ll crash about 6/10 times. The other times it’s fine.
  • It only seems to be triggered when running from XCode. When I run the app from device it doesn’t appear to crash.
  • I have enabled the following Diagnostics on my target (which may be what’s triggering it): Malloc Scribble, Malloc Guard Edges, Zombie Objects

Dose it only happen with Zombie Objects turned on?

Regardless, we’ll do some more testing trying reproduce this issue. It would be great if we can get some kind of simple code from your projects so we can have a better chance of reproducing it.

I can confirm that it only seems to happen with Zombie Objects turned on.

I ran the app about 10 times in a row with Zombie Objects turned off – no problem.
I ran the app once with it turned on and it crashed… but then I ran it another 10 times and it was fine every time.

But it looks at least somewhat repeatable if I:

  1. Disable checking for Zombie Objects
  2. Run the app (succeeds)
  3. Stop the app
  4. Enable checking for Zombie Objects
  5. Run the app (crashes)

It doesn’t appear to work every time, but seems more common that way? Could be a timing issue too… I’m just not sure. But you asking about it at least makes it so that I can work around it by disabling the Zombie Objects checking, so thanks for that!

Yea, we never tested it with Zombie Objects mode on, so we’ll do some more testing on that.