Menu + Bitmap image crashes Pebble.js App - [ERROR] ault_handling.c:93: App fault

367 Views Asked by At

This Simple JS code seems to cause my Pebble App to crash with this error below if I go into the menu, back, then into the menu again. Is anyone able to tell me why this would happen? Thanks!

Image used as Bitmap from PNG - https://i.stack.imgur.com/QlP1v.jpg

[ERROR] ault_handling.c:93: App fault! {0a21d6a3-cff2-43f5-bfe8-82b3a381d8fe} PC: 0x5555aaaa LR: 0x809e8c9

var UI = require('ui');
var Vector2 = require('vector2');

var main = new UI.Window({

});
var playerBattleAnimation = new UI.Image({
 // Horizontal, Vertical
  position: new Vector2(35, 100),
  size: new Vector2(35 , 35),
  image: 'images/standingattack1'
});    

main.add(playerBattleAnimation); 

main.show();

main.on('click', 'up', function(e) {
  var menu = new UI.Menu({
    sections: [{
      items: [{
        title: 'Pebble.js',
        icon: 'images/menu_icon.png',
        subtitle: 'Can do Menus'
      }, {
        title: 'Second Item',
        subtitle: 'Subtitle Text'
      }, {
        title: 'Third Item',
      }, {
        title: 'Fourth Item',
      }]
    }]
  });
  menu.on('select', function(e) {
    console.log('Selected item #' + e.itemIndex + ' of section #' + e.sectionIndex);
    console.log('The item is titled "' + e.item.title + '"');
  });
  menu.show();
});
0

There are 0 best solutions below