You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever my process which is using ArduinoFirmata tries to exit gracefully, it never exits because ArduinoFirmata is stuck.
When I do a CTRL+C, the last few lines of the trace are:
/usr/local/firmata-server/vendor/bundle/ruby/1.9.1/gems/arduino_firmata-0.3.7/lib/arduino_firmata/arduino.rb:85:in `sleep': Interrupt
from /usr/local/firmata-server/vendor/bundle/ruby/1.9.1/gems/arduino_firmata-0.3.7/lib/arduino_firmata/arduino.rb:85:in `block in close'
from /usr/local/firmata-server/vendor/bundle/ruby/1.9.1/gems/arduino_firmata-0.3.7/lib/arduino_firmata/arduino.rb:81:in `loop'
from /usr/local/firmata-server/vendor/bundle/ruby/1.9.1/gems/arduino_firmata-0.3.7/lib/arduino_firmata/arduino.rb:81:in `close'
from /usr/local/firmata-server/vendor/bundle/ruby/1.9.1/gems/arduino_firmata-0.3.7/lib/arduino_firmata/arduino.rb:34:in `block in initialize'
When I add some debugging code to arduino.rb:82, it shows that @serial.closed? == true and @thread_status == true.
Looking through the code I would guess that the process_input thread is stuck on line 195 doing a blocking read. So it it never returns from line 41 to see that @status has been change to Status::CLOSE.
I personally don't see why it needs the at_exit do close end. It'll get closed automatically when the process exits. So perhaps the solution would be to remove that.
The text was updated successfully, but these errors were encountered:
Whenever my process which is using ArduinoFirmata tries to exit gracefully, it never exits because ArduinoFirmata is stuck.
When I do a CTRL+C, the last few lines of the trace are:
When I add some debugging code to arduino.rb:82, it shows that
@serial.closed? == true
and@thread_status == true
.Looking through the code I would guess that the
process_input
thread is stuck on line 195 doing a blocking read. So it it never returns from line 41 to see that@status
has been change toStatus::CLOSE
.I personally don't see why it needs the
at_exit do close end
. It'll get closed automatically when the process exits. So perhaps the solution would be to remove that.The text was updated successfully, but these errors were encountered: