nilbus / pinewood-derby

Pinewood derby status board & sensor driver
Other
17 stars 9 forks source link

Redo button works but causes an exception #43

Open nilbus opened 9 years ago

nilbus commented 9 years ago
NoMethodError (undefined method `runs' for nil:NilClass):
  app/controllers/races_controller.rb:31:in `block in redo'
  app/controllers/races_controller.rb:29:in `redo'
st-atila commented 9 years ago

The workaround is to: 1) activate the 'redo' button, 2) ctrl-c the application, 3) restart the application; then the application will continue.

nilbus commented 9 years ago

Doesn't the application continue for you without restarting it?

st-atila commented 9 years ago

Doesn't the application continue for you without restarting it? not exactly; the app webpage refreshes waiting for heat to proceed, but it does not report sensor data. (linux [mint 13/ ubuntu 12], current version of pinewood-derby, mock-sensor or newbold derbystick)

the console output at error begins with: 13:52:24 web.1 | E, [2015-02-22T13:52:24.014706 #28524] ERROR -- : Actor crashed! 13:52:24 web.1 | ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: UPDATE "single_values" SET "value" = ?, "updated_at" = ? WHERE "single_values"."id" = ? 13:52:24 web.1 | /home/trogdor/.rvm/gems/ruby-2.2.0/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step'

nilbus commented 9 years ago

Oh! I'm glad you reported that. That had never happened on my end.

nilbus commented 9 years ago

@st-atila Does that error happen consistently every time you hit Redo, or just sometimes? I haven't been able to reproduce it.