Sorry Lily, I didn't see your comment before after I committed the fix to trunk with revision 1076802.
I don't quite understand what you mean with "From looking at the code, I don't see much." Can you please clarify?
Note that if you reuse the database between runs it will quickly grow very large and may appear to hang while it is inserting data.
The expected behavior for the fix is that you won't see the error / stacktrace reported by Knut when ij is exiting (which it will do when it has executed all the SQL commands in the script file). Since the bug is intermittent, it is not that easy to "prove" that it will never happen again.
If you see it now, the stacktrace should be different.