monome / norns

norns is many sound instruments.
http://monome.org
GNU General Public License v3.0
633 stars 147 forks source link

tape previewing causes tape to crash #1628

Closed robbielyman closed 1 year ago

robbielyman commented 1 year ago

pointed out on Lines and in the comments of #1607. scrolling with E2 while previewing or quick back-and-forth movements with E3 can (sometimes? consistently?) cause Tape to become unresponsive until SYSTEM > RESTART. checking the logs, it looks like tape.reader.open() continues to be called (I see several successful "Tape Reader::file size" messages), but after playback stops working there are no more messages of the form Tape::reader closed file or similar.

I'm imagining the easiest fix would be to enforce some kind of debouncing in Lua, but I figured it would be worth raising this as an issue on the off-chance that someone who understands the tape system better than me has thoughts.

catfact commented 1 year ago

broadly spoeaking, this should be debugged in the tape c++ module. we already know it isn't robust enough to handle programmatic control of playback / file handling with arbitrary timing. sorry i can't really promise to make time to rewrite it myself..

(using timers in lua could work but would certanily be clunky and error prone)

catfact commented 1 year ago

jsut to ping this, if its still an issue - unless/until tape backend is rewritten, debouncing in lua would probably be a good idea.