While reading 256 KB UTF-8 JSON file my Playdate crashed and is now frozen and unresponsive.
This code worked fine on the simulator just fine but on hardware it crashes in the loop and I am not able to restart by pressing the a button like the screen says.
print("init load 0")
local file = playdate.file.open(path, playdate.file.kFileRead)
print("init load 1")
jsontxt = ""
while true do
l = file:readline()
if l == nil then
break
end
print(l)
jsontxt = jsontxt .. l
end
print("init load 2")
file:close()
print("init load 3")
All the buttons do nothing and windows does not recognize the Playdate as a functioning device.
I tried to open up the unit so I could unplug the battery but I don't have a bit that will mate with the doughnut screws. I am using SDK v1.12.3
so... two questions.
- How can I reset the Playdate so it works again? Or do I just have to wait like 14 days for the battery to die?
- Why did this crash in the first place? am I somehow overflowing some buffer?