ProcessParagraphs() is throwing exception

when Paragraphs count is 1, document.ProcessParagraphs() is throwing following exception

System.IndexOutOfRangeException: ‘Index was outside the bounds of the array.’

@tmasna
Please attach the code snippet and document you are using.