-
Notifications
You must be signed in to change notification settings - Fork 211
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
MCU restarts using spinner control #459
Comments
@rvxfahim Sorry its taken so long for anyone to answer you. I've been busy working on a major update to the Builder. So I confirmed what you said, the spinner is broken in release 0.17 and onward and does work in 0.16. Since I made the last major change to XSpinner I decided to make sure I didn't ask for a pull with bad code. So where did things go wrong. I did what amounts to a binary search of commits to track down what pull request did break the spinner. Versions where Spinner works
Versions where Spinner is broken
So July 4 everything is OK and on July 10 the XSpinner causes Arduino Mega to reset. Paul-- |
is this a mega specific issue or are all mcus affected? I do not have any other board to test this. |
@rvxfahim @ImpulseAdventure Good question. I just tried a ESP32 and the same result.
Seems to be caught in a loop and then we run out of stack space. My guess is that when Calvin updated his code for Input Buttons he forgot to update this control with whatever is now required to fit his input model. If you really need this control you might be better off staying with Release 16 until Calvin is not longer MIA. Once I finish off my next release of the Builder (either 17b12 or 18.0) I'll take a deeper look at this if Calvin still hasn't answered. |
@rvxfahim @ImpulseAdventure I had some free time this morning so I took a look at this bug. When I first wrote this routine I used a feature of GUIslice API call compound elements (I also used this creating the first Keypad). This feature lets you define a new control based upon existing controls that you package together to make the new super control. For the spinner its simply two text buttons and one text field. Over time these compound elements have been re-written to use a technique I call Virtual elements. Complex Elements that Users can see with multiple parts but as far as GUIslice is concerned is only one control. Anyway, The XSpinner is the last control using compound elements and it seems this feature is broken in the latest GUIslice API. The good news is quite a bit of the API code can be removed if this feature is dropped. Rather then me going nuts trying to debug this feature I simply rewrote the XSpinner to use virtual elements and it works for me using Arduino mega and ESP32 boards I own. Attached is my new version. Post if it works for you using GUIslice 17 and if so I'll post a pull request. I can't say when or if Calvin would process or accept it since I still have an outstanding pull request from 23 days ago. Paul-- |
This is working on top of the 0.17 Guislice version. For now I consider this as a hotfix ✌️ |
@rvxfahim @ImpulseAdventure I made the pull request |
I just put a star in this repo https://github.com/ImpulseAdventure/GUIslice-Builder. Is this your repo ? |
Yes, Thanks! |
Thank you, Paul!! Yes, I have been very tied up at work and still not "moved in" with access to my dev computer & electronics (due to a prolonged renovation). I expect to have access to my dev setup soon as the reno wraps up. Again, apologies for the delays. Thank you very much for the "commit bisect" to identify the spinner issue! Yes, it is certainly likely that compound elements have triggered a boundary condition that is unhandled with the new control flow. As you're aware, the compound elements introduce a fair amount of complexity and may be (to my knowledge) relatively unused. For some time I have been inclined to to remove support for them (as they add a lot of overhead/complexity), but have not done so yet. I really like your updated XSpinner as a demonstration of the virtual elements. If possible, I think it may be a good idea to promote the @rvxfahim - Thanks for the initial testing and also confirming that Paul's PR works. I plan to merge those changes in. |
@ImpulseAdventure Yes, I think you can now remove support for compound elements. No other shipping controls use it. |
Describe the bug
MCU crashes if i press the up or down arrows of a spinner control, and nothing else on the screen and no program logic.
Crashes with latest guislice release.
I tested toggle button control, that works fine.
Device hardware
Version 0.16 does not have this issue
The text was updated successfully, but these errors were encountered: