Git Product home page Git Product logo

mruby-fsm's People

Contributors

pbosetti avatar take-cheeze avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mruby-fsm's Issues

Dependency in mrbgem.rake

imho this line should be added to mrbgem.rake, because this gem is dependent on it:
spec.add_dependency 'mruby-signal'

Using current mruby from github.

Best regards,

Hugo

bug: single-state machine in infinite loop crashes after a while

bug

A finite state machine implemented using mruby-fsm with a single state in an infinite loop crashes after a random number of cycles.

how to reproduce

  1. build mruby using "run_test.rb" provided in the repository;
  2. run the following test program ("test.rb"):
fsm = FSM::Machine.new(:counter)
fsm.params.counter = 0

loop_state = FSM::State.new("loop")
loop_state.in_loop do
  fsm.params.counter += 1
  puts "fsm.params.counter += 1  =>  #{fsm.params.counter}"
end
loop_state.timing = 0.010
fsm.add(loop_state)

fsm.run "loop"
  1. wait a random number of cycles (187|1006|6630|50826|73511|...) until the program exits with one of the following errors:
trace:
    [0] test.rb:12
test.rb:12: cannot set instance variable (ArgumentError)

or

trace:
    [0] test.rb:12
test.rb:12: non float value (TypeError)

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.