Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bangle2 / Settings Hangs when scrolling up and down through long menus #2382

Closed
hughbarney opened this issue Dec 11, 2022 · 10 comments
Closed
Labels
type-bug Something isn't working

Comments

@hughbarney
Copy link
Contributor

hughbarney commented Dec 11, 2022

download
7d20c736fe80cdcd385e932a052157caa4d9c435

Affected hardware version

Bangle 2

Your firmware version

2.16.28

The bug

Whilst scrolling up and down through the settings menus the Bangle2 hangs and becomes unresponsive.
When connected to the IDE there are no error messages.
The only way to recover is a long press reboot of the Bangle 2.

I been experiencing this kind of hang on all of the v2.16.x builds I have installed (.0 .7 .25 and .28)

I have narrowed it down to a minimum configuration of
bootloader 0.55
settings 0.55
standard launcher 0.19
lock widget 0.7
anton clock 0.11
simplest clock 0.6

I have reproduced multiple times with the standard launcher and the icon launcher as the launcher. Also with Anton Clock or Simplest clock as the default clock. This tells me it is not a problem with the launchers or the clocks. Using simplest clock eliminates any issues with 'fast load'.

To reproduce

Go into the settings menu
Select a long menu (eg Utils)
Scroll up and down the menus a few times.
Very quickly you will see the display become corrupted and part of a menu stuck in the widget area of the display.
At this point the Bangle might already be hung
Continue to scoll up and down (swiping) a few more times and between 1-6 times the Bangle2 will hang.
If connected to the IDE nothing is displayed and the console is unresponsive (full hang).
The only way out is to do a long button reset.

@hughbarney hughbarney added the type-bug Something isn't working label Dec 11, 2022
@hughbarney hughbarney changed the title Settings / Device Hangs when scrolling up and down through long menus Bangle2 / Settings Hangs when scrolling up and down through long menus Dec 11, 2022
@hughbarney
Copy link
Contributor Author

Attached id a backup file of config.
issue_2382_banglejs_backup.zip

@thyttan
Copy link
Collaborator

thyttan commented Dec 11, 2022

Attached id a backup file of config.
issue_2382_banglejs_backup.zip

I restored the backup but I haven't managed to reproduce the bug.

@hughbarney
Copy link
Contributor Author

hughbarney commented Dec 11, 2022

I have reproduced quite easily on a 2nd Bangle 2 now (same config)
Done a short video at:

https://www.dropbox.com/s/i4sjm9ckcyzym2v/VID_20221211_161039.mp4?dl=0

I also noted that installing swipe menus made the issue go away, then I could uninstall swipe menu and it would come back.

@thyttan
Copy link
Collaborator

thyttan commented Dec 11, 2022

I also noted that installing swipe menus made the issue go away, then I could uninstall swipe menu and it would come back.

This really makes me think it's something with E.showscroller that isn't updated with the latest changes, as suggested on the forum thread.

@BartS23
Copy link
Contributor

BartS23 commented Dec 11, 2022

I was able to reproduce the bug.

I have narrowed it down to the following:

var menu = {
  '< Back': () => print
};

for (n = 0; n <= 10; n++) {
  menu[n] = {};
}

E.showMenu(menu);

If you enter the following lines in the left side of the IDE, the watch will hang/reboot

Bangle.emit("drag", { "x": 0, "y": 0, "b": 1, "dx": 0, "dy": -250 })
Bangle.emit("drag", { "x": 0, "y": 0, "b": 1, "dx": 0, "dy": 167 })

The bug occurs only when Back is set.

@gfwilliams
Copy link
Member

Thanks for the report - and thanks @BartS23 for such a concise way to reproduce this - I'll have a look and see if I can find/fix this this morning.

Just to add I managed to reproduce with the standard launcher too (as you'd expect given showScroller). Given the hang it may be related to the scrolling code - it's possible it's related to the LCD speed improvements that went into 2v16

@gfwilliams
Copy link
Member

It looks like just g.setClipRect(0,24,175,175).scroll(0,167) will do it, so it's an internal Espruino issue.

Should now be fixed with espruino/Espruino@f612b25

The code shown above won't break it now, and I could previously crash the Bangle as in the original report, and I don't seem to be able to now - so if you update to the latest cutting edge release (or 2v17 when released) then that should fix it

@hughbarney
Copy link
Contributor Author

Wow, great collaboration. Thanks for fixing so quicklty. I will upgrade to latest fw straight away.
Well done to @BartS23 for finding the lines of code that would trigger this.

@hughbarney
Copy link
Contributor Author

I have tested and the hang bug is fixed in 2.16.33 but I still get screen corruption in the settings app on scrolling through long menus. I will log a new bug for that.

@gfwilliams
Copy link
Member

Thanks. New issue -> #2393

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants