We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose 21.4 is hanging for very close and long lines in method ShapeRenderer(NodeRendererBase).renderToSize(Graphics2D, float, float, float, float) line: 243

Hi,

I am looking for help with an issue where the processing of certain word documents is taking too long.

I am attaching the stack trace, an example file (input.docx), and a demo application to reproduce the issue.

Note that the demo app hangs on the text “Starting - Part 4”. It looks like it may take around 10 minutes for it to proceed, which blocks other important operations in the meantime. I think something is not working correctly. Can someone please raise a defect or assist?

Steps for running the demo app:

1.) Extract AsposeDemoForDefect140561.zip
2.) Create a sibling folder next to the JAR file called “AsposeDemoForDefect140561_lib”. This folder needs aspose-words-21.4.0-jdk17.jar
3.) input.docx should also be a sibling of the jar by default.
4.) Invoke the following command:
java -jar AsposeDemoForDefect140561.jar

5.) Confirm issue: The application hangs at text “Starting - Part 4” for over 10 minutes despite how small the file is.

Thank you for any help!

Stack Trace of Hang:

Thread [main] (Suspended)	
	PathDasher.appendLine(float, float) line: not available [native method]	
	DuctusRenderingEngine.feedConsumer(PathIterator, PathConsumer, boolean, float) line: 293	
	DuctusRenderingEngine.strokeTo(Shape, AffineTransform, BasicStroke, boolean, boolean, boolean, PathConsumer2D) line: 170	
	LoopPipe.getStrokeSpans(SunGraphics2D, Shape) line: 290	
	LoopPipe.draw(SunGraphics2D, Shape) line: 213	
	SurfaceData$PixelToPgramLoopConverter(PixelToParallelogramConverter).draw(SunGraphics2D, Shape) line: 160	
	ValidatePipe.draw(SunGraphics2D, Shape) line: 166	
	SunGraphics2D.draw(Shape) line: 2509	
	zzEN.zzZ(Graphics2D, zz1, GeneralPath, boolean) line: 115	
	zzOT.zzZ(zz1) line: 363	
	zzZV(zzK).zzZ(zz1) line: 45	
	zz1.zzZ(zzI1) line: 86	
	zzP(zzL).zzZ(zzI1) line: 20	
	zzP.zzZ(zzI1) line: 18	
	zzP(zzL).zzZ(zzI1) line: 20	
	zzP.zzZ(zzI1) line: 18	
	zzP(zzL).zzZ(zzI1) line: 20	
	zzP.zzZ(zzI1) line: 18	
	zzOT.zzZ(zz6, Graphics2D) line: 163	
	zzOT.zzZ(zz6, long, Graphics2D, float, float, float, float) line: 262	
	ShapeRenderer(NodeRendererBase).renderToSize(Graphics2D, float, float, float, float) line: 243	
	Main$1.visitGroupShapeStart(GroupShape) line: 45	
	GroupShape.zzZ(DocumentVisitor) line: 70	
	GroupShape(CompositeNode<T>).acceptCore(DocumentVisitor) line: 675	
	GroupShape.accept(DocumentVisitor) line: 65	
	Paragraph(CompositeNode<T>).acceptChildren(DocumentVisitor) line: 714	
	Paragraph(CompositeNode<T>).acceptCore(DocumentVisitor) line: 687	
	Paragraph.accept(DocumentVisitor) line: 378	
	Body(CompositeNode<T>).acceptChildren(DocumentVisitor) line: 714	
	Body(CompositeNode<T>).acceptCore(DocumentVisitor) line: 687	
	Body.accept(DocumentVisitor) line: 55	
	Section(CompositeNode<T>).acceptChildren(DocumentVisitor) line: 714	
	Section(CompositeNode<T>).acceptCore(DocumentVisitor) line: 687	
	Section.accept(DocumentVisitor) line: 136	
	Document(CompositeNode<T>).acceptChildren(DocumentVisitor) line: 714	
	Document(CompositeNode<T>).acceptCore(DocumentVisitor) line: 687	
	Document.accept(DocumentVisitor) line: 886	
	Main.main(String[]) line: 57	

AsposeDemoForDefect140561.zip (2.2 KB)

Main.zip (Source code of demo app) (822 Bytes)

input.zip (14.6 KB)

@apatter

We have not found the input.docx in this thread. Please ZIP and attach input Word document here for testing. We will investigate the issue and provide you more information on it.

Hi @tahir.manzoor - thank you - sorry about that. I just uploaded the input.zip file and added the link on my original message above (at the bottom of it).

Please extract the zip and place input.docx as a sibling of the sample app jar file.

Thanks,

@apatter

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSJAVA-2578. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSJAVA-2578) have been fixed in this Aspose.Words for Java 21.10 update.