espruino / espruino/BangleApps

[dtlaunch] Error on console and 1st page doesn display images

Open
#2,627 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-apps state-started type-bug
Dominant language
JavaScript
Stars
572
Forks
1.3k
Avg merge
17h 38m
Merged PRs (30d)
17

Description

Affected hardware version

Bangle 1

Your firmware version

2v16

The bug

Scenario: After launching the app, 1st page is empty, moving with btn3, so moving to next app, then the icon for second app is displayed and so on.

Expected: 1st page show 6 icons for apps

Checking on IDE, the app start with following errors:

2v16 (c) 2021 G.Williams
Uncaught Error: Expecting first argument to be an object or a String
 at line 14 col 211 in dtlaunch.app.js
...con),x+10,y+10,{scale:1.25});g.setColor(-1).setFontAlign(0,-...
                              ^
in function "draw_icon" called from line 15 col 218 in dtlaunch.app.js
...return i;draw_icon(p,i,selected==i);}
                                     ^
in function "drawPage" called from line 22 col 11 in dtlaunch.app.js
drawPage(0);

After clicking btn3, error on console:

Uncaught Error: Expecting first argument to be an object or a String
 at line 52 col 64 in dtlaunch.app.js
...con),x+10,y+10,{scale:1.25});
                              ^
in function "draw_icon" called from line 77 col 57 in dtlaunch.app.js
    if (oldselected>=0) draw_icon(page,oldselected,false);
                                                        ^
in function called from system

Screenshot - 02_03_2023 , 18_49_22
dtlaunch_emul_bj1

Installed apps

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue on a Bangle 1 running firmware 2v16, then inspect dtlaunch.app.js around draw_icon and drawPage(0), as identified in the console trace. Confirm that the first page renders six app icons and that moving between pages no longer produces the reported argument error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.