Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background crashes for v6.4.1 #1494

Closed
mmdumi opened this issue Dec 9, 2019 · 7 comments
Closed

Background crashes for v6.4.1 #1494

mmdumi opened this issue Dec 9, 2019 · 7 comments
Labels
bug A defect in the library

Comments

@mmdumi
Copy link

mmdumi commented Dec 9, 2019

Bug Report

Latest v6.4.1 sdl ios framework crashes in background with the attached crash logs.

Expected Behavior

Not crashing in background any more.

OS & Version Information
@joeljfischer
Copy link
Contributor

Hello @mmdumi When you say iOS 11+, do you mean that you're receiving crash reports only on iPhone X on iOS 11, 12, and 13? Do you not receive these crashes on some iOS versions, or on other iOS devices?

Do you have reproduction steps? What module(s) are you connecting to / with what versions (if that info is available)? Any additional information improves our odds of being able to fix this issue.

@joeljfischer joeljfischer added the bug A defect in the library label Dec 9, 2019
@mmdumi
Copy link
Author

mmdumi commented Dec 9, 2019

Screenshot 2019-12-09 at 16 33 04

As you can see in the attached screenshot, we can see the issue in all OS versions. Our app targets iOS 11+.
I am not able to replicate it but as you can see in this other screenshot, the number of affected users and crashes is really high.
Screenshot 2019-12-09 at 16 35 00

@joeljfischer
Copy link
Contributor

@mmdumi Thank you, even that information helps. We'll do our best to replicate it. There's no more information about devices beyond "Apple"? It would be helpful to know if it's only on low-RAM devices, for example.

@joeljfischer
Copy link
Contributor

@mmdumi Can you additionally confirm that this was not seen on previous sdl_ios versions? We received that information separately, but it's surprising given that the differences in our IAP transport from v6.3.1 to v6.4.1 are extremely minimal. Were you using an earlier sdl_ios version that did not display this crash (like v6.2, etc.)?

@joeljfischer
Copy link
Contributor

After doing some additional investigation today, this is a very strange issue. Here's what I believe I can say:

  1. As noted in the screenshots above, this only occurs in the background.
  2. This only occurs when the IAP transport is disconnecting, most likely due to the USB cord being pulled.
  3. This appears to happen in low memory situations (both examples are < 5% memory available).
  4. This appears to happen in Apple's runloop / Stream code. I'm not 100% sure why. I modified the code slightly, but I unfortunately have no way to test because I haven't been able to replicate the issue.

I suspect that what may be occurring is that the system is forced to keep the app in memory because it's connected, but then wants to kill the app due to the memory pressure as soon as it disconnects. The only strike against that theory is that you say it didn't happen in previous library versions.

I did create a branch with a very minor change bugfix/issue-1494-background-crashes. I haven't been able to reproduce the issue so I cannot test this fix. The only change that it made is to not "double-remove" the stream from the run loop after it's been closed. I tested the change and it doesn't appear to cause any issues, but as I said, neither can I test it.

@mmdumi
Copy link
Author

mmdumi commented Dec 9, 2019

Thank you. Are you planning on releasing a new version sometime soon with this fix ?

@joeljfischer
Copy link
Contributor

We would prefer to have the fix confirmed beforehand, but we will discuss internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect in the library
Projects
None yet
Development

No branches or pull requests

2 participants