After integrating the callback, the game now sometimes crashes when regaining focus on iOS. Defold’s own console sometimes has time to fire an error (these two errors happened separately):
ERROR:SCRIPT: Unbalanced Lua stack, expected (0), actual (1)
ERROR:SCRIPT: Unbalanced Lua stack, expected (4), actual (3)
The crash only happens when gameanalytics.setRemoteConfigsListener() is used, and it happens even if the Lua listener method contains no code. When setRemoteConfigsListener() is not used, this message is printed to the console, but it doesn’t crash:
WARNING:GameAnalytics: Received remote configs update but no listener was set!
I can’t see a clear error in the MacOS console, but in case it’s useful, here are the death throes of the crash and subsequent auto-restart: crash.txt (104.4 KB)
I haven’t been able to replicate the crash on Android.
Also posted here: https://github.com/GameAnalytics/GA-SDK-DEFOLD/issues/30
Any idea what could cause this?