My app downloads a PNG image of a map (around 10KB in size) and that image gets stored to application storage via Application.Storage.setValue("lastImage", imageData) so that if the user exits the app and re-opens it, the image is can be pulled from storage and displayed immediately without having to wait for download again. The image is drawn to the screen with Graphics.drawBitmap2() typically.
This is all working fine for the most part: images are downloaded, stored, displayed, etc. The problem is after device reboot / sleep. Then when I load the app, it and the device crash instantly. This happens on an Edge 840 solar. Everything works fine in the simulator, but you can't simulate a reboot / restart of the app there. If I comment out the drawBitmap2() call, the app loads no problem (with no image displayed), but it will begin crashing again once that line of code is back. To fix it I first have to create a version of the app that writes null to the "lastImage" key and cleans up whatever bad data seems to have gotten in to the storage.
I'm using SDK 7.3.1 and API level 4.1.0, but it also seemed to happen with API level 5.0.0.
As just a small quirk I've seen: occasionally the image loads without crashing the app, but it's real strange: it looks super zoomed in and interlaced almost. I'm able to refresh it within the app (since it didn't crash) and it starts looking normal again, but it's definitely not being saved that way to storage deliberately.
The log left in Debug/Uploads/Error/err_log.txt after a crash is this:
[
{
"unit_id":"3444214113",
"product_name":"Edge 840",
"software_part_number":"006-B4062-00",
"ms_since_epoch":1728250519000,
"system_version":"24.19",
"build_type":"PRODUCTION",
"backtrace":"
Function Address: 0x603D1146
Call Address at Function: 0x603D11C4
Function Address: 0x60E183A4
Call Address at Function: 0x60E1844C
Function Address: 0x60E0408C
Call Address at Function: 0x60E040A8
Function Address: 0x603D34D8
Call Address at Function: 0x603D3AD4
Function Address: 0x60DFF118
Call Address at Function: 0x60DFF364
Function Address: 0x60DFD750
Call Address at Function: 0x60DFD828
Function Address: 0x60E36368
Call Address at Function: 0x60E364E2
Function Address: 0x60E399F8
Call Address at Function: 0x60E39A3E
Function Address: 0x60E39B40
Call Address at Function: 0x60E39DB8
Function Address: 0x60E3C448
Call Address at Function: 0x60E3C45E
Function Address: 0x60DFA500
Call Address at Function: 0x60DFA5C2
Function Address: 0x60E2FAC8
Call Address at Function: 0x60E2FBF6
Function Address: 0x601CF1B0
Call Address at Function: 0x601CF2BC
Function Address: 0x601CE3B4
Call Address at Function: 0x601CE43A
Function Address: 0x6021FC5C
Call Address at Function: 0x6021FDA4
Function Address: 0x602229A4
Call Address at Function: 0x60222A38
Function Address: 0x601CDB44
Call Address at Function: 0x601CDC02
Function Address: 0x60DB2BEE
Call Address at Function: 0x60DB2BF4
Function Address: 0x602229A4
Call Address at Function: 0x60222A38
Function Address: 0x601CDB44
Call Address at Function: 0x601CDC02
Function Address: 0x602126A4
Call Address at Function: 0x60212916
Function Address: 0x60DADF08
Call Address at Function: 0x60DADF10
",
"error_cause":"RTL Trap",
"proprietary_info":{
"Commit ID":"886a566e98c1daed24c97afa0d186131dfeaecd6",
"Time":"2024-10-6 23:35:19",
"Ram Dump":"N/A",
"ESht PC":"0x6044F989",
"ESht SP":"0x629E9BD8",
"ui_page_ids":"838",
"ui_page_stack_depth":"1",
"RTL Error Number":"6E5D8024",
"Error Message":"D09F228C,00000000,00000000,D097C27C,0000B888,00000000,00000000,0000FFFF,00F50000,00000000,00000000,00000000,00000000,62345538,603D0C80,603D11C4,A00B001F",
"Task Name":"cfx thread",
"Saved SP":"62345538",
"Saved LR":"603D0C80",
"Saved PC":"603D11C4",
"R[0]":"0xD09F228C",
"R[1]":"0x00000000",
"R[2]":"0x00000000",
"R[3]":"0xD097C27C",
"R[4]":"0x0000B888",
"R[5]":"0x00000000",
"R[6]":"0x00000000",
"R[7]":"0x0000FFFF",
"R[8]":"0x00F50000",
"R[9]":"0x00000000",
"R[10]":"0x00000000",
"R[11]":"0x00000000",
"R[12]":"0x00000000",
"R[13]":"0x62345538",
"R[14]":"0x603D0C80",
"R[15]":"0x603D11C4",
"cpsr":"A00B001F"
}
,
"Project Specific":{
"data" : {
}
}
},
{
"unit_id":"3444214113",
"product_name":"Edge 840",
"software_part_number":"006-B4062-00",
"ms_since_epoch":1728251261000,
"system_version":"24.19",
"build_type":"PRODUCTION",
"backtrace":"
Function Address: 0x603D1146
Call Address at Function: 0x603D11C4
Function Address: 0x60E183A4
Call Address at Function: 0x60E1844C
Function Address: 0x60E0408C
Call Address at Function: 0x60E040A8
Function Address: 0x603D34D8
Call Address at Function: 0x603D3AD4
Function Address: 0x60DFF118
Call Address at Function: 0x60DFF364
Function Address: 0x60DFD750
Call Address at Function: 0x60DFD828
Function Address: 0x60E36368
Call Address at Function: 0x60E364E2
Function Address: 0x60E399F8
Call Address at Function: 0x60E39A3E
Function Address: 0x60E39B40
Call Address at Function: 0x60E39DB8
Function Address: 0x60E3C448
Call Address at Function: 0x60E3C45E
Function Address: 0x60DFA500
Call Address at Function: 0x60DFA5C2
Function Address: 0x60E2FAC8
Call Address at Function: 0x60E2FBF6
Function Address: 0x601CF1B0
Call Address at Function: 0x601CF2BC
Function Address: 0x601CE3B4
Call Address at Function: 0x601CE43A
Function Address: 0x6021FC5C
Call Address at Function: 0x6021FDA4
Function Address: 0x602229A4
Call Address at Function: 0x60222A38
Function Address: 0x601CDB44
Call Address at Function: 0x601CDC02
Function Address: 0x60DB2BEE
Call Address at Function: 0x60DB2BF4
Function Address: 0x602229A4
Call Address at Function: 0x60222A38
Function Address: 0x601CDB44
Call Address at Function: 0x601CDC02
Function Address: 0x602126A4
Call Address at Function: 0x60212916
Function Address: 0x60DADF08
Call Address at Function: 0x60DADF10
",
"error_cause":"RTL Trap",
"proprietary_info":{
"Commit ID":"886a566e98c1daed24c97afa0d186131dfeaecd6",
"Time":"2024-10-6 23:47:41",
"Ram Dump":"N/A",
"ESht PC":"0x6044F989",
"ESht SP":"0x629E9BD8",
"ui_page_ids":"838",
"ui_page_stack_depth":"1",
"RTL Error Number":"6E5D8024",
"Error Message":"D0E475BC,00000000,00000000,D097C27C,0000B888,00000000,00000000,0000FFFF,00F50000,00000000,00000000,00000000,00000000,62345538,603D0C80,603D11C4,A00B001F",
"Task Name":"cfx thread",
"Saved SP":"62345538",
"Saved LR":"603D0C80",
"Saved PC":"603D11C4",
"R[0]":"0xD0E475BC",
"R[1]":"0x00000000",
"R[2]":"0x00000000",
"R[3]":"0xD097C27C",
"R[4]":"0x0000B888",
"R[5]":"0x00000000",
"R[6]":"0x00000000",
"R[7]":"0x0000FFFF",
"R[8]":"0x00F50000",
"R[9]":"0x00000000",
"R[10]":"0x00000000",
"R[11]":"0x00000000",
"R[12]":"0x00000000",
"R[13]":"0x62345538",
"R[14]":"0x603D0C80",
"R[15]":"0x603D11C4",
"cpsr":"A00B001F"
}
,
"Project Specific":{
"data" : {
}
}
}]
Any help here is appreciated! I know it's a bunch of function addresses that only Garmin folks are going to know about, but I've been really racking my brain here: trying smaller images, quantizing the colors on device, quantizing on server, converting the downloaded image to a BufferedBitmap or Bitmap before rendering it, moving code from onStart() to onLayout(). Nothing seems to make a difference.