Trying to debug error in GetKidsIndex

I am getting the following error when calling the PageInsert method via C#. I am not able to find any documentation on your site related to this method and I am trying to determine what data I am passing in could result in this error message.

pdftron.Common.PDFNetException: Exception:
Message: Invalid index in Kids index stack.
Conditional expression: stack_idx>=0 && stack_idx<int(m_page_pos.size())
Filename : PageIterator.cpp
Function : PDFTRON::PDF::PageIterator::GetKidsIndex
Linenumber : 145

When I am calling the method, I am passing in the page number, and the page I want inserted.

This error means that the source PDF (i.e. its page tree) is corrupt. If you would like send a file to support at pdftron, and we will take a further look at the file (e.g. to see whether it can be repaired etc.)