Puck.js Execution Interrupted during event processing. New interpreter error: CALLBACK,MEMORY #3168
Replies: 5 comments
-
|
Posted at 2019-11-10 by Robin Sun 2019.11.10 Hello @user104751 While I don't have a definitive response just yet, I did notice in L#13 that variable 'a' doesn't appear to be defined. What is that line supposed to do? (EDIT: see edit pp below)
Is it possible that 'a' is defined in a separate module?
If 'a' becomes undefined might be a possible reason. One could wrap the guts of the setInterval function with a try/catch block to see if any errors could be trapped that are just bubbling up and missed. Is L#17 Has Just found this-Another user had the same error recently using setWatch(). See end of post: > http://forum.espruino.com/comments/14882864/ Let's start with the basics, what is the result of |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-10 by user104751 The example comes from here: http://www.espruino.com/Puck.js+Infrared. Here's the output of process.memory() before and after loading the code. process.env follows.
| |_ ___ ___ _ ||___ ___
It is possible that the IR signals are not properly formulated i.e. more than a few transitions. |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-10 by @allObjects @user104751, I think you get some noise and may be additional signals that makes your interrupt buffer to overflow... If your receiver is just sticked into puck's thru holes and the leads do not make good contact, lightest vibration - even from loud sound / music - give you additional signals and buffer overruns. With additional signals may come from other sources or reflections. Also, if you keep sending the buffer may overflow. |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-10 by user104751 I did just stick the IR pins without soldering! Just curious how I could look into the size of the interrupt buffer? What would be the function call? Thanks. |
Beta Was this translation helpful? Give feedback.
-
|
Posted at 2019-11-10 by @allObjects You can check the error flags - https://www.espruino.com/Reference#l_E_getErrorFlags - but more details you would have to access with peek... where though is not known to me... may be it can be figured out looking at the firmware / source code... You can bend / spread the leads a bit to get better contact. Check also the battery of your puck... Some architectural detail: Espruino has mainly two interrupt driven activities:
Since hardware events can happen much quicker than javascript can act on it, the events are put in the event queue. To not miss any events in JavaScript, JavaScript pieces should be as short/small as possible... after all, you have only one processor... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-11-10 by user104751
While running the following (example) code to read IR signals
I get this after a few reads:
What seems to be the issue?
How do I go about to debug this?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions