
(Text link for those who can't see the image: http://www.rickdangerous.co.uk/zx/ql/qltrouble.png)
This listing is one of the not-so-secret bits from a QL program I'm almost finished with, and at the moment it stands at 22K of SuperBASIC. So, all things considered, it's not exactly filling up the QL's memory. I'm loading the program into QemuLator, with the JS ROM, and I've tried Toolkit II both on and off. I'm editing on Notepad++, with the file held on an ancient 128MB flash drive, which is vastly larger than I'll ever need for simple text files, formatted in FAT.
Most of the time, lrun_program_bas will get the program to run - but not every time. Sometimes, it stops with this "bad line" error right from the start. Other time, it will run just fine - but when I break into it to alter a line or test a procedure, once again it won't start. And the corruption you see above isn't always obvious; sometimes I'll get the "At 9680 bad line" error, and on listing the program in the 9600s, it'll look fine - the same with a couple of window-definition procedures I've put at 10000 and 11000. Also, the line 999 STOP sometimes shows this corruption, and sometimes it doesn't, as well as line 1030 which is just a variable. It always seems to be the same lines that are corrupted.
I've saved an extra version of the program from Notepad++ as a new, clean text file (then made it LF-only), loaded that and it's still corrupting.
I've saved another version of the text file on the hard drive instead of the USB flash drive, and it's still corrupting.
I've then trimmed a copy of that down to a few of the procedures (so I can get one right), and it's still corrupting.
At this stage, I am out of ideas as to what could be causing the trouble.
What happen? Someone set up QL listing the bomb, by the looks of things.