I use exitTo() to link the two components.
In testing, the RACING app crashes with out Of Memory Error when it is invoked from STARTING, even though there is plenty of memory for the individual components run independently. RACING runs independently with Peak Memory of 102 Kb.
However the crash is intermittent: ~90% on the device and ~10% in the simulator (videolink here ). I have of course been at pains to ensure that the the test environments are identical.
I rebooted the Mac and ran in the same manner - with no crash. (VIDEO HERE ) showing the second app running correctly with a PEAK memory of 105Kb.
I can't show the console output as it's the exited to app that's crashing, but when I run it on a physical device I get:
(VA-HR)
ERROR: Out Of Memory Error
DETAILS: Failed invoking <symbol>
STORE_ID: 00000000000000000000000000000000
CALLSTACK:
@PC = 0x30000dad
@PC = 0x30000e64
/Users/.../Documents/watchApp/raceQs_Racing/source/main.mc (onStart:27)
(F5)
---
Error: Out Of Memory Error
Details: 'Failed invoking <symbol>'
Time: 2019-01-10T02:31:55Z
Part-Number: 006-B2697-00
Firmware-Version: '12.00'
Language-Code: eng
ConnectIQ-Version: 3.0.7
Filename: QS_RACE
Appname: QsPlus
Stack:
- pc: 0x30000f9f
It seems to me that there may be a latency issue: the first app has not completely cleared memory before the second app is loaded.
I can't think of any way to delay the loading of RACING since I lose control on the execution of exitTo(). Any ideas?