Giter Club home page Giter Club logo

Comments (10)

jimmy-huang avatar jimmy-huang commented on June 18, 2024

The "exit" message usually means the jerryscript engine ran out of memory, it could be that we have memory leak in the JS objects and slowly leaking memory, especially it's right around after a fixed number of tries.

from zephyr.js.

yhe39 avatar yhe39 commented on June 18, 2024

The ButtonLEDs.js has the same issue: after click button hundreds of times. Will have "exit" message in the output and the button events will stop arriving.

from zephyr.js.

grgustaf avatar grgustaf commented on June 18, 2024

If you could try applying the patch I posted here to your JerryScript repo, as I describe in #78, I think this might fix the problem.

from zephyr.js.

yhe39 avatar yhe39 commented on June 18, 2024

We add the
if (chunk_p == NULL)
{
return;
}
to the jerry-core/jmem/jmem-poolman.c.
and then test the ButtonLEDs.js. after click button near 400 times, Will have "exit" message in the output and the button events will stop arriving.

from zephyr.js.

grgustaf avatar grgustaf commented on June 18, 2024

My PR #101 may have fixed this. It seems to address the problem that my chunk_p == NULL patch was for.

Do you have automated equipment to test 400 button presses or did you do that manually? I tried to do it myself but ran out of patience! :)

from zephyr.js.

yhe39 avatar yhe39 commented on June 18, 2024

We add the following code to arduino/digital/Button.js

gpio.open({pin:pins.IO2}).then(function(pin){
    var test = true;
    var con = 0;
    setInterval(function () {
        con ++;
        test = !test;
        pin.write(test);
        print(con);
    },500);
});

And connect IO2 and IO4. after reboot, the console has output, after about 300+ times. have "exit" and the test stop.

ButtonLEDs.js use the same method. :)

from zephyr.js.

grgustaf avatar grgustaf commented on June 18, 2024

You guys are smart! :)

from zephyr.js.

yhe39 avatar yhe39 commented on June 18, 2024

:)
After the PR#101 merged, we retest the two samples. the issue still exist, after click button about 400 times, Will have "exit" message in the output and the button events will stop arriving.

from zephyr.js.

grgustaf avatar grgustaf commented on June 18, 2024

This should really be fixed in #117 now. I've added samples/AutoButton.js that includes the code expecting a loopback wire to simulate button presses. But I also hope you'll test the original two samples the way you did before.

from zephyr.js.

miaobin avatar miaobin commented on June 18, 2024

Verified this issue has been fixed in #117.

from zephyr.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.