Hello,
I am attaching a sample demo app and an input file. It should print text
“Start visiting shape” before calling the API and print “finished visiting shape” after it completes.
From the demo you will see that it never finishes. The code is hung in the following stack trace:
at sun/dc/pr/PathDasher.appendLine(Native Method)
at sun/dc/DuctusRenderingEngine.feedConsumer(DuctusRenderingEngine.java:293)
at sun/dc/DuctusRenderingEngine.strokeTo(DuctusRenderingEngine.java:170)
at sun/java2d/pipe/LoopPipe.getStrokeSpans(LoopPipe.java:290)
at sun/java2d/pipe/LoopPipe.draw(LoopPipe.java:213)
at sun/java2d/pipe/PixelToParallelogramConverter.draw(PixelToParallelogramConverter.java:160)
at sun/java2d/pipe/ValidatePipe.draw(ValidatePipe.java:166)
at sun/java2d/SunGraphics2D.draw(SunGraphics2D.java:2509)
at com/aspose/words/internal/zzFA.zzZ(Bytecode PC:336)
at com/aspose/words/internal/zzP5.zzY(Bytecode PC:64)
at com/aspose/words/internal/zzH.zzY(Bytecode PC:5)
at com/aspose/words/internal/zzZN.zzY(Bytecode PC:10)
at com/aspose/words/internal/zzZY.zzZ(Bytecode PC:12)
at com/aspose/words/internal/zzI.zzZ(Bytecode PC:29)
at com/aspose/words/internal/zzM.zzZ(Bytecode PC:7)
at com/aspose/words/internal/zzI.zzZ(Bytecode PC:29)
at com/aspose/words/internal/zzM.zzZ(Bytecode PC:7)
at com/aspose/words/internal/zzP5.zzZ(Bytecode PC:102)
at com/aspose/words/internal/zzP5.zzZ(Bytecode PC:138)
at com/aspose/words/NodeRendererBase.renderToSize(Bytecode PC:33)
…
The command to run the sample app is simply:
java -jar Aspose_Demo.jar
And ensure the input.docx file is a sibling as the path is hardcoded.
Can you please advise how we should proceed? When this thread gets hung, it blocks other threads in our production application and causes significant trouble. It requires a production restart.
Can you please let me know if it is possible for us to programmatically detect (using Aspose.Words API) which shapes will cause the infinite loop so that we can skip them and prevent issues in the production environment? This would be a nice short term workaround to alleviate the troubles.
Another potential workaround for the short term would be if we could somehow interrupt the Aspose thread. Is there some mechanism where we can tell Aspose to abort and end what it is doing quickly? I.e. does it check for the thread being interrupted or anything? Can I call Task.interrupt() to interrupt the task and have it finish? I am guessing that is not an option in a tight loop like where this is likely.
Also, please let us know when the issue can be resolved in Aspose directly.
Also, I was not able to upload the JAR or the word document as it is not authorized. Please let me know an acceptable method to upload the content.
Thanks,
Chase