Thanks for your reply. I think I have spotted the problem now. As Bruce suggested, I think the function that opens files was trying to call itself (indirectly) open a log file when it detected an error, resulting in an infinite recursive loop with no end condition. I am trying to come up with a design that doesn't suffer from this problem now.
Thanks again. As before, I have found TCH support excellent - second to none, in my opinion.
Thanks - Rowan
- TCH-Bruce likes this