Line Input crashes when importing Unicode

Line Input crashes when importing Unicode

We have a facility for staff that allows them to download an Excel marking scheme, enter student marks and then to upload it as a tab delimited file (or xml file) back into the system. Last night a member of staff using the facility crashed both servers in our cluster.

On further inspection (and a lot of development server crashes!) I finally narrowed the problem down to a single line of code

Line Input #fileID, strLine

On further investigation it appears that the user exported their marking scheme from Excel using the ‘Unicode (.txt)’ rather than ‘ Text (.txt)’ and it’s the import of Unicode that was causing Domino to crash. My quick solution to stop the server crash is to use ‘Dos2Unix’ convert the file before importing. Although it seems to alter the format so that it no long imports correctly, it’s stopped the server from crashing.


Ah – I should have caught that from “Dos2Unix” which my dyslexic brain read as “Uni2Dos”, thinking Unicode transformation. If memory servers, line breaks / carriage returns differ from Dos to Unix, which might break the line input End Of Line detection. There may be some hope in using a Stream instead of line input, but I’ve found (some releases) have problems after you put so much text in the stream. Good luck getting it sorted out!

Thanks anyway, much appreciated. I think I’ll either have to rewrite the agent in Java or find a command line app that will do the conversion.

Agh – don’t open an Excel spreadsheet on your server. You’re potentially asking for any number of Microsoft’s exploitable vulnerabilities to infect your box.

If you use the NotesStream class (fully supported in LotusScript as of ND 6.5+) then you should be good-to-go.

Eric, thanks. I’d forgot all about NotesStream.

Jerry, thanks for the warning. Was the problem the 64kb print buffer? I’ve ran into similar issues where you print very big strings but they get truncated and you have to loop through the string splitting it into smaller chunks?

Comments are closed.