Skecth does't work if bigger than 8K

If I comment the prints, then the application works. Any idea?

Another possibility is that you have an uninitialised variable somewhere. That can cause behaviour like you describe.

--Phil.