malcolmholmes / pico-clock-green-python

MicroPython implementation of C Pico-Clock-Green code
Apache License 2.0
28 stars 16 forks source link

pico-clock breaks after some minutes #15

Open the-it opened 3 years ago

the-it commented 3 years ago

After running for some minutes, the program crashes and leaves the user with a line of dots (in the shape of one row of the picture to show). Most of the time, this state persists and will not recover. So you have to plug the device out and in again.

Nevertheless, I encountered two times where the clock miraculously returned to the program flow :shrug: . 2021-10-01 14 45 15

the-it commented 3 years ago

This is an interesting one.

We leak memory apparently.

free memory: 320
..........
Active since 1010 seconds
free memory: 160
..........
Active since 1020 seconds
free memory: 155616
..........
Active since 1030 seconds
free memory: 155456

But the garbage collecting than kicks in. My suspicion is that this happens sometimes to late.

Will run some further tests. Use the clock during the day with instrumentation.

the-it commented 3 years ago

Kind of a red herring. I had two breaks today ... both in very healthy memory conditions. :shrug:

cpyarger commented 3 years ago

I have also had this happen a few times. after a little bit of time it seems to fix itself.

GeoffRiley commented 3 years ago

I had this happen with the C code for a while when I first got the device… I ended up trying a different Pico and it hasn't happened since. It could have been the removal and reinsertion, or it could have been a problem with something in the Pico being borderline but other than during a power cut, that one hasn't been off since.

jcoquerygithub commented 2 years ago

Might be solved by #19

jcoquerygithub commented 2 years ago

@the-it can you check if, with the new code, you still have issues, mine is now running for month without problem. thx for your feedback.