There seems to be an edge case bug. I can't really replicate the circumstances behind the bug, though it happened to me twice in a row, resulting in lost progress.
As I found it, the bug is in control.lua, line 321, inside the function Handler.handle_signal(). The local variable payout receives a floored value of a count divided by one thousand- while reasonable to assume that this would never return a negative value, my crashes revolved around payout having a value of -1. Since it bypassed the "payout == 0" check, the game would try to insert -1 items on line 333 and crash.
I resolved this issue by modifying line 321 to have a "<=" instead of an "==". There has not been an issue on my end since.