I think I found a regression with _thread in micropython 1.20 -> 1.23 [PICO W] #15927
GM-Script-Writer-62850
started this conversation in
General
Replies: 1 comment 6 replies
-
I suggest changing |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
EDIT:
#16008
Seems calling ntptime.setTime() while _thread is running makes everything break in 1.23
Made some code to replicate the issue
output:
ORIGINAL POST: While my W5500 PICOs are working great and i can actually use dual cores without random crashes, my PICO W in another story
so i was working on one of my PICO Ws, now updated with 1.3 running a new version of my code when suddenly my code was 'freezing' but could get unstuck, well after fixing a few dozen bugs in my untested code i got everything fixed and had it running, unconnected from my laptop and connect it to it's own power and i turn around and it froze.
out of time i just disabled my second thread leaving a feature broken w/ no idea how it was breaking anything
so i get some more time to work on it today fixed some more bugs and try to debug this freezing issue i find the line it is freezing on, then it starts freezing in a completely different area of the code (different asycio loop)
note that one of my bug i had when this was happening was the second core was sleeping for 1000x longer than expected, but core 2 was testing 2 GPIO input pins, finding 2 false values and sleeping for a very long time, but how can that make core 1 freeze?
well after fixing so many bugs in my code i found all unrelated to the issue i deiced to revert back to micropython 1.2 and guess what no longer happens...
When this happens it happens seconds after power on
When the pico powers up it starts a few uasyncio serveries, get wifi up, get clock set, get main process started, get the web GUI running
Anyone have a known issue for this? some simple code to trigger it? i know NOBODY is going to look at over 1000 lines of my code and hook up a D18B20 and max7219 to try to find this issue, but if you want to prove me wrong
note that now that i am using a max7219 instead of driving panels directly i could just use a single core, but i hate to waste a core when i could use it and make it feel super responsive regardless of what is happening
Note, this freeze happens around 50% of the time
Also noticed the stop button works in Thonny w/ micropython 1.2 but not 1.3 when using 2 cores
Beta Was this translation helpful? Give feedback.
All reactions