defold icon indicating copy to clipboard operation
defold copied to clipboard

Game crash on iOS when screen auto-locks

Open dri-richard opened this issue 4 years ago • 8 comments
trafficstars

Describe the bug Running a TestFlight build of the game, when the screen locks due to the phone's auto-lock settings, the system will sometimes report that the app has crashed.

To Reproduce (REQUIRED)

  1. Set the device auto-lock timeout to a low value, e.g. 1 minute
  2. (Unconfirmed) enable low power mode
  3. Run the game
  4. Wait for the screen to lock
  5. Unlock the phone and observe that the game has crashes

Defold version:

  • Version [e.g. 1.2.185]

Platforms (REQUIRED):

  • Platforms: iOS
  • OS: iOS 13.6
  • Device: iPhone 7 Plus

Logs (OPTIONAL): crash_report.txt

dri-richard avatar Aug 23 '21 13:08 dri-richard

I have updated reproduction steps from the team member who sees this bug. It appears that resuming the game from sleep causes it to freeze, and then trying to resume it a second time causes the crash.

  1. Play the game with battery saver on, and a short auto-lock time
  2. Wait for the screen to lock
  3. Press the home button to wake it up
  4. See if the game is responsive (if it is, try again)
  5. Press the home button again to return to the iOS home screen
  6. Select the game icon to resume it
  7. Crash

At step 4, apparently the game is not responsive to input, and Spine animations have ceased, but music continues.

dri-richard avatar Aug 26 '21 09:08 dri-richard

Thank you for the clear steps. We will look into this soon!

britzl avatar Aug 26 '21 11:08 britzl

By the way, does it also happen on iOS 14 devices, or only 13?

britzl avatar Aug 26 '21 11:08 britzl

We only have confirmed crash reports on a single iOS 13 device. That user has downloaded some Defold games from the App Store which run ok and don't show this behaviour. I can't reproduce on my iPhone 6S running iOS 13.4

dri-richard avatar Aug 26 '21 13:08 dri-richard

@dri-richard is this still an issue for you?

britzl avatar Oct 26 '21 21:10 britzl

I’ve asked the team member who reported this to verify, he’s away today so I’ll report back ASAP.

dri-richard avatar Oct 27 '21 14:10 dri-richard

  • Which extensions are used?
  • Can this be reproduced with a project without extensions?
  • Can you share a sample project?

britzl avatar Nov 02 '21 10:11 britzl

  • Which extensions are used?

defold-input defold-orthographic extension-push/ monarch extension-firebase extension-firebase-analytics extension-facebook/archive extension-adinfo/archive DefAppsFlyer/archive

Can this be reproduced with a project without extensions?

We haven't tried. This bug has only been reproduced by a remote-working artist, so distributing builds for him to test is non-trivial. He has seen this issue in at least one other Defold game - Travel Blast.

Can you share a sample project?

I'd need to spend half a day working with the artist mentioned above to create a minimal project, and we don't currently have time to do so.

dri-richard avatar Nov 09 '21 10:11 dri-richard