"Index was out of range" exception in v11.32

"Index was out of range" exception in v11.32

Forum member · Jul 21, 2022
My team recently upgraded our applications to use DynamicPDF 11.32 (previously using 10.28). Since then we've had multiple instances of an unhandled exception within the DynamicPDF code during height assignment, during a document generation process that hasn't had this issue before. The relevant part of the exception details is as follows: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at #C0c.#s8c.#i7c(Int32 #j7c, Int32 #k7c) at ceTe.DynamicPDF.PageElements.Table2.set_Height(Single value) The height value being passed in this case is a small positive decimal value, between 10 and 11, for what it's worth. Oddly, this exception seems to be thrown after the assignment has been made, so we were able to prevent this exception from derailing the document generation process by wrapping it in a try-catch block. That's sort of messy, though, so it seems potentially worthwhile to report this here, in case it's a legitimate code bug that could be fixed on DynamicPDF's end.

Re: "Index was out of range" exception in v11.32

Support · Jul 22, 2022
Hi, We'd like to recreate this issue on our end to see if it's something that should be fixed in our API. Please send over the following information to [^a|mailto:support@dynamicpdf.com|opennewwindow|support@dynamicpdf.com^] so we can look into it further. 1. Simple console application or code sample which uses static data to recreate the error. 2. Full error message along with stack trace. 3. Exact version and build number of the DynamicPDF DLL file used in your application. You can find this information by right clicking on the DLL file>>Properties>>Details tab>>Product version. Take a screenshot of the Details tab and send it over to us. Please include a link for this forum in your email to support. Thanks, ceTe Software Support Team