I'm encountering an error when trying to save an SFDT string to a .docx file. The error specifically is System.IndexOutOfRangeException: 'Index was outside the bounds of the array.' This is occurring when calling the following method:
More info as follows:
I am using .Net Core 3.1 with SF packages DocIO.Net.Core, DocIORenderer.Net.Core, EJ2.WordEditor.ASPNET.Core - all version 21.1.39. I don't think it's relevant, but the frontend is using Vue.js (2.7x), and @syncfusion/ej2-vue-documenteditor version 21.1.37.
The documents are rendering perfectly in the browser, and I am sending 3 docs to the backend to be converted into documents then combined into a single PDF. I had previously been using an earlier version of Syncfusion.EJ2.DocumentEditor.WordDocument version 18.104.22.168 which worked flawlessly.
Of note, I am calling this in parallel which I think is contributing to the issue. When I remove the parallelism, its saves all of the documents correctly. Again, this was working in the previous version mentioned above, so I'd like to keep it running in parallel if possible.
It errors out on the same document, but if I process just that single document and save it, it works, which makes me think it has to do with the parallelism. I tried removing the image in the document that is erroring but it still threw the same error.
Any help would be appreciated.
Doug, we suspect that the reported problems are might be due to the contents in the input word document which used at your end. We need to investigate with the contents in your input Word document to reproduce the exact problem at our end. So, could you please provide us the input Word document which used at your end and share the details of issue if you faced any in console and a video reference of the replication procedure. Thereby, we will analyze further and provide you the appropriate solution at the earliest.
Note: If you have any confidential data in your Word document, please replace with some dummy data and provide us the same. We just need your document to recreate the problem you face.
Thank you Kavitha,
I uploaded a version of the word doc that is experiencing the error.
if I have time I'll try to compile more error info.
We recommend that you upgrade both the client and server sides to the latest version (v21.1.41) packages. Please upgrade and try it on your end. Also, please cross-check to ensure that if the issue persists, kindly share the sample codes you have used with the replication video for further validation.
NPM Link: (Client-side)
NuGet link: (Server-side)
It looks like the server side version is maxing out at v21.1.39 - are there newer versions
The latest version is V21.1.41 Please try it and let us know if you need any other assistance.
NuGet link: (Server-side)
I downloaded 21.1.41 for both the frontend and backend, however the error is still persisting. Were you able to encounter the error?
Through various testing, it appears to be tied to sending at least 3 documents into the parallel loop as the error does not occur on this form if I run it by itself, or with one other document.
I'll see if I can put together a sample project to re-create.
Doug, kindly share the sample codes you have used with the replication procedure video for further validation.
I created a basic reproduction of the necessary logic in the attached .Net application. It should have everything to reproduce the error mentioned above.
If you switch the `Parallel.ForEach` to a normal `foreach` loop, the program should not error out.
Let me know if you need anything else to debug.
Doug, Could you share the replication procedure video with error facing on your end for the exact replication and further validation ?
Sure, please see attached. If you launch the reproduction, it should run and encounter the error automatically.
Doug, currently, we are checking the issue and will get back to you by April 27, 2023.
We can reproduce the reported issue with provided Sample. Currently, we are validating and will get back to you by May 3, 2023.
Thank you for your time on this.
Thanks for your update, Doug.
We will get back to you by May 3, 2023.
Doug, Currently, we are validating on this and will update details once completed.
Would you be able to provide a status update?
Checking in on the status of this one. Please let me know.
have confirmed the reported issue 'Resolve the exception while saving multiple document in parallel'
as a defect and logged a defect report. We will fix this issue in our weekly release which is expected for the first week of June 2023.
You can track the status of the bug through the below feedback link:
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”
We are glad to announce that our patch release (v21.2.9) has been rolled out successfully. In this release, we have added the fix for the issue “Resolve the exception while saving multiple document in parallel”.
Please upgrade to the latest version packages to resolve this issue:
Please let us know if you need any further assistance.
Fantastic! Appreciate your help with all this.