Found it. It was due to dynamic arrays not being set correctly. My only excuse is that the code at fault was being produced automatically by a parser I am working on :-( Bugger