Acknowledged

Calling new Graphics.BufferedBitmap(..) causes crash on Fenix 7/7S/7X

It seems like even though Fenix 7S passes the Toybox.Graphics has :BufferedBitmap check, calling  new Graphics.BufferedBitmap(..) causes a crash

My sample code:

 if (Toybox.Graphics has :BufferedBitmap) {
 dcOffscreenBuffer = new Graphics.BufferedBitmap({
            :width=>dc.getWidth(),
            :height=>dc.getHeight()
        });  
}
Sample Crash log:
Error: Symbol Not Found Error
Details: 'Failed invoking <symbol>'
Time: 2022-02-23T01:06:25Z
Part-Number: 006-B3905-00
Firmware-Version: '6.57'
Language-Code: eng
ConnectIQ-Version: 4.0.7
Store-Id: 83a72327-8b23-43d3-8fbd-32f21a8de5a3
Store-Version: 18
Also happens in the simulator on Windows. Connect IQ SDK 4.0.9.
It also happens on the Fenix 7 and 7X at least in the simulator.
  • For 4.x devices you need to use createBufferedBitmap instead of BufferedBitmap. It was a change that was made for the 4.x devices, any other device(s) will use the BufferedBitmap method.

  • maybe it's a bug but if you first check :createBufferedBitmap it will run for f7

     if (Toybox.Graphics has :createBufferedBitmap)
    {
            //it's for f7 and others 4.x
         
             dcOffscreenBuffer = Graphics.createBufferedBitmap({
                :width=>dc.getWidth(),
                :height=>dc.getHeight()
            });  
        ...
    }