hippware / rn-chat

MIT License
5 stars 0 forks source link

[ios] RNBGL randomly stops uploading location data points 2.0 #4037

Open bengtan opened 5 years ago

bengtan commented 5 years ago

We have another instance of this happening. Last time, I ticketed #3926. This time, I'm posting a new ticket because the symptoms are somewhat different.

For some reason, it seems to occur on Don's phone more frequently. It's not known whether it occurs on phones other than Don's.

The distinguishing symptom is as follows:

Normally, if the phone is moving, data points are spaced a few seconds apart. A few minutes suggests that RNBGL has paused/crashed/died (or something) during the interval.

Example screenshot:

Screenshot from 2019-08-21 13-03-26

bengtan commented 5 years ago

One cause of this has been identified as #4029.

However, #4029 does not explain all of the instances reported so far. There is probably another cause.

Quoting from Slack:

https://hippware.slack.com/archives/C2V6L53TQ/p1566361134001200

I have an idea but it's nothing much more than hopeful and wishful speculation at this point. It's possible that the app (Staging and Prod) is crashing on Don's phone but it's crashing due to low memory and/or memory pressure. I did some reading. Apparently if the phone is running out of memory, iOS may kill apps but a crash report or low memory report may not necessarily be generated. This could explain the symptoms that I'm seeing. So ... how to find out if it really is a low memory termination? There's no reliable way. It's just a bunch of guesswork. ...

bengtan commented 5 years ago

I have some code to add speculative/hopeful debugging information to try to catch these 'low memory' situations.

@mstidham, if you want to try them, please install codepush StagingBeng '4.20.1 + #3991 + PR #4038'. It's a cumulative codepush. The contents are as per the description.

I really dunno if it will yield anything.

But I'm going to put these changes into the app anyway because they may prove useful in the future.