Any fix for makeImageRequest on CIQ 4+ devices?

I have a function that calls makeImageRequest in the background, and updates the watch face with the image when it is received. This works perfectly in the sim for a "Captain Marvel" watch so I know that the code can and does work, but I get this on the Fenix 7x sim:

When using SDK 7:

Error: Exception occurred
Details: failed inside handle_image_callback
Exception: Class usage is not allowed for the current app type.

It seems to me that because calls to makeWebRequest work on every device I've tested and makeImageRequest works on some devices that this error message about class usage is a red herring.

With SDK 6 I get this instead:

Error: Out Of Memory Error
Details: failed inside handle_image_callback
Stack:

Is there any hope that this will be fixed?

  • The callback method for makeImageRequest is never called, or else I would see the first statement of that function which is a println telling me that. This error is (apparently) from makeImageRequest itself.

  • How big is the image?  Remember with makeImageRequest, it's actually been converted to a format usable on the watch using a Garmin Server.  Could it be related to AMOLED vs MIPS as with AMOLED, you're probably getting a larger image.

    The 955 is CIQ5 but is MIP and has a smaller display (smaller image?).  What happens with it?  Same as the f7x? The 255s is also CIQ5 and has a smaller display than the 955.

  • I'm trying this with a Fenix 7x which is only slightly bigger than the 955. I have even tried it with a 3x3 9 pixel image, which according to nginx requires 517 bytes for the return headers and png image. The graphics pool usage according to the sim memory dialog is 89712 out of ? It doesn't look like a memory space issue. On the Captain Marvel the 3x3 bitmap resource requires 817 bytes. Maybe it's a graphics pool thing because in theory makeImageRequest is supposed to return a bitmap reference in CIQ 4+, but it seems less like low memory and more like something else.

    Since you asked, it does not work on the 955 or the even smaller Fenix 7s.

  • I'm not, the callback function is never called, the error comes from makeImageRequest so there is no response and no data. If there was data it would be saved in an application storage variable, and background.exit(data) would be a dictionary {"image"=>"cPic") which is the name of the storage variable. This works in CIQ 3.

    	public function onReceiveCenterImage(response as Number, data as imgData) as Void {
    		logTime("response " + response + ", getTimer " + System.getTimer());
    	

    Line 2 never gets executed in CIQ 4+.

  • Yes, I forgot you mentioned you got the error before the callback.

    What does your makeImageRequest look like, as far as parameters, etc. ?

    Have you tried this on a real device or just the sim?

  • Background: 2024-06-08 16:22:13 rqCI v_httpURL https://testing.asjohnson.com/g1/ci/ffa0f28f1a9e91d2133a05fc4ff987c817fb2ab4_6459281_0/MAJ.jpg
    Background: 2024-06-08 16:22:13 rqCI _httpParams {p=>0, w=>3, h=>3}
    Background: 2024-06-08 16:22:13 rqCI _cPic {symbol (8389661)=>3, symbol (8391907)=>1, symbol (8389694)=>2, symbol (8389657)=>3}
    // => 3 is :maxWidth and :maxHeight, => 1 is :packingFormat, => 2 is :dithering
    Communications.makeImageRequest(v_httpURL, _httpParams, _cPic, method(:onReceiveCenterImage));
    
    Error: Exception occurred
    Details: failed inside handle_image_callback
    Exception: Class usage is not allowed for the current app type.

    Just the sim. I'm trying to get this working before I go through the developer hoops and get my beta watch face approved. But your point is well taken, it may just be a sim problem, but it's still a problem.

  • Beta apps are never approved.  As soon as you upload one, you can use it right away.  If there are no app-settings, just try a sideload..

  • I modified to always try to get an image instead of on demand. Here's the CIQ_LOG.BAK from the watch itself:


    ---
    Error: Exception occurred
    Details: failed inside handle_image_callback
    Time: 2024-06-08T21:48:57Z
    Part-Number: 006-B3907-00
    Firmware-Version: '17.23'
    Language-Code: eng
    ConnectIQ-Version: 5.0.0
    Filename: Annulus
    Appname: Annulus

  • Have you tried getting a different image from someplace else?