Mysterious Crash - More Insight

Here is more info. I've zero'ed into the offending interface.  This works for the vast majority of users and instances. But enough users are experiencing this. I've added console prints and a user with a modern EDGE 1040 can replicate this error. The webRequest successfully grabs JSON data from the server with a STATUS=200 (this isn't a memory issue that returns a 401 code). It get to the background exit() no problem. The dictionary "outExit" contains the JSON data. This should instantly call "onBackgroundData()", which it does for almost everyone. But in these failure cases, it crashes during the call to onBackgroundData(). There is no LOG file created for the crash. And the IQ logo is different - a greyscale logo not the standard colored one. Any ideas on solving or troubleshooting this?

Could this be a watchdog crash? The BG process doesn't have much code. But it does a webRequest to grab a JSON packet. In the sim my time from onTemporalEvent() to exit() was 640ms just now.

Thanks!

  • I would log the following things:

    - the size of the returned json (if it can be significantly different for different users or requests)

    - SystemStats.freeMemory

    - I don't know if it's possible, but if it is then the free disk space or any info about the amount of disk / storage available/used

    Also: do you know if other users that have the same device also fail or they are successful?

  • When you do a Background.exit(data), the size of the data is limited to about 8kb, and based on what you are doing, the amount of data could vary, so sometimes it works, and sometimes it doesn't.  Data can be any number of things.  A dictionary, a string, and array of numbers, etc.  But you must keep in mind the size of what you return.

    If you are using getBackgroundData in the background to append new data to that the main app hasn't seen, it's easy to exceed the max.