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

WILCARD_VALUE not in closure #3

Closed
jdtsmith opened this issue Mar 28, 2020 · 3 comments
Closed

WILCARD_VALUE not in closure #3

jdtsmith opened this issue Mar 28, 2020 · 3 comments

Comments

@jdtsmith
Copy link

I'm getting this error occasionally:

Traceback (most recent call last):
  File "/flash/lib/scron/week.py", line 74, in _next_step
  File "/flash/lib/scron/week.py", line 61, in get_next_pointer
  File "/flash/lib/scron/scount.py", line 255, in get_next_pointer
  File "/flash/lib/scron/helpers.py", line 118, in items
AttributeError: 'closure' object has no attribute 'WILDCARD_VALUE'

Thanks for scron.

@fizista
Copy link
Owner

fizista commented Mar 29, 2020

Strange error.

On what device, you get that bug?

What version of micropython?

Could you add the following code before the 118 line in scron/helpers.py file:

  for attr in dir(self):
    print("obj.%s = %r" % (attr, getattr(self, attr)))

Maybe it will tell us more about what is going on there.

@jdtsmith
Copy link
Author

Thanks. I'm using Loboris MP on ESP32. In fact I found that scron does not run well at all under that port on the device, leading, in addition to occasional closure errors, to lots of CPU halts apparently related to memory handling, ala:

Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
...
assertion "VERIFY_PTR(ptr)" failed: file "/home/LoBo2_Razno/ESP32/MicroPython/MicroPython_ESP32_psRAM_LoBo/MicroPython_BUILD/components/micropython/py/gc.c", line 594, function: gc_free
abort() was called at PC 0x40117f23 on core 1
...

etc.

These halts were sporadic — sometimes immediately on import, sometimes later. I couldn't identify any particular step or sequence of actions that produced them. In the end I had to abandon scron and write my own simpler loop-polling based scheduler (borrowing the pointer idea, thanks). This has eliminated all such halts.

As to debugging this, I'd guess the issue will be that the loboris ESP32 MP port is no longer supported, so if it contains memory handling bugs that scron tickles, no one is there to address them.

Sadly, the loboris port has major functionality that I can't find anywhere else: display support for common packaged displays like ST7789, background threaded and efficient FTP client, multiple built-in as well as user-compilable font support, and much more. Given the development style, sadly there isn't much appetite to port any of this to mainline.

@fizista
Copy link
Owner

fizista commented Mar 30, 2020

Thank you for that information. So I thought this problem was related to some MicroPython port.

Maybe someone will discover the cause of these problems. Until then, I'm closing this bug report.

@fizista fizista closed this as completed Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants