First, try performing this find manually using the same criteria as your script. If that works, your script may be damaged and you may want to replace that script with a new one. (Or just replace the entire file with a recent back up, or a backed up clone where you import all your data from your current copy.)
If your manual find also fails, I suggest that you recover a copy of your file and test the recovered copy even if recover does not discover any problems. It's possible that an index has become corrupted and Recover rebuilds all indexes without actually inspecting them for problems.
If the recovered copy works. Recover the original file again but use only these advanced recover options:
Copy File Blocks "As Is"
Rebuild Indexes [Now]
BTW, a simpler way to find all invoices where the current balance is not zero is to set up an omit find request that omits all invoices where the value of that field is zero.
I have tried the manual find and it does fail so I'll try the recover. many thanks!