Problem found: I had a file named "kladblok0..jpg" in the "files" folder. It was being used in "root.LoadLayout("Mainpage")". After changing "kladblok0..jpg" to "kladblok0.jpg", the issue in debug mode was resolved. It is strange, though, that the release version—and installing in debug mode on an older tablet—didn't cause any problems.