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

Free Support Forum - aspose.com

Multithreading and Table.Height causing Access Violation issues

Hi,

Again we are having trouble releasing our products due to issues with Aspose.

below is the scenario, the same presentation generates fine in our single threaded client environment. but the batch generation which uses multi threading fails for the report and crashes and stop the batch generation .

we used debug dias 1.2 and found out that the issue was caused by the following stack:

NET Call Stack
Function
DomainBoundILStubClass.IL_STUB_PInvoke(System.Runtime.InteropServices.HandleRef, System.String, Int32, System.Runtime.InteropServices.HandleRef, System.Drawing.Internal.GPRECTF ByRef, System.Runtime.InteropServices.HandleRef, System.Drawing.Internal.GPRECTF ByRef, Int32 ByRef, Int32 ByRef)
System.Drawing.SafeNativeMethods+Gdip.GdipMeasureString(System.Runtime.InteropServices.HandleRef, System.String, Int32, System.Runtime.InteropServices.HandleRef, System.Drawing.Internal.GPRECTF ByRef, System.Runtime.InteropServices.HandleRef, System.Drawing.Internal.GPRECTF ByRef, Int32 ByRef, Int32 ByRef)
System.Drawing.Graphics.MeasureString(System.String, System.Drawing.Font, System.Drawing.PointF, System.Drawing.StringFormat)
..(System.String, System.Drawing.PointF, .a)
..(, , .a, .a, ByRef)
..(, , Aspose.Slides.Pptx.PortionEx)
..()
.…ctor(Aspose.Slides.Pptx.ParagraphFormatEx[], Aspose.Slides.Pptx.ParagraphExCollection, Single, Single, Int32, Single, Boolean, Aspose.Slides.Pptx.TextAnchorTypeEx, Boolean, Aspose.Slides.Pptx.BaseSlideEx, FloatColor, Aspose.Slides.Pptx.FontsEx, Aspose.Slides.Pptx.FontCollectionIndexEx, Single, Single, Int32)
Aspose.Slides.Pptx.TextFrameEx.(Single, Single, ., .�)
Aspose.Slides.Pptx.TableEx.(.[,], .�)
Aspose.Slides.Pptx.TableEx.()
Assette.PowerPointGenerator.PresentationGenerator.PopulateRowTablePaged(Aspose.Slides.Pptx.BaseSlideEx, Aspose.Slides.Pptx.ShapeEx, Aspose.Slides.Pptx.PresentationEx, Boolean, Single, Int32, Int32)
Assette.PowerPointGenerator.PresentationGenerator.ProcessSlide(Int32 ByRef, Aspose.Slides.Pptx.BaseSlideEx, Int32, Int32, Boolean)
Assette.PowerPointGenerator.PresentationGenerator.GeneratePresentaion(System.String, System.String, Int32, System.String, Int32)
Assette.PowerPointGenerator.Generator.GeneratePresentation(Int32, Int32, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, Boolean, System.String ByRef)
Assette.PowerPointGenerator.Generator.GeneratePresentation(Int32, Int32, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, Boolean, System.String ByRef)
Assette.PowerPointGenerator.Generator.GeneratePresentation(Int32, Int32, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String ByRef)
Assette.PowerPointGenerator.Generator.GeneratePresentation(Int32, Int32, System.String, System.String, System.String, System.String, System.String ByRef)
Assette.PowerPointGenerator.Generator.GeneratePresentation(Int32, Int32, System.String, System.String, System.String ByRef)
Assette.PowerPointGenerator.Generator.GeneratePresentation(Int32, Int32, System.String)
Assette.CA.StatementGeneratorService.StatementPptGenerationWorker.Doer()
System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
System.Threading.ThreadHelper.ThreadStart()


Full Call Stack
Function Arg 1 Arg 2 Arg 3 Arg 4 Source
GdiPlus!GdipMeasureString+df 18958590 31f390b8 00000001 10876fd0
DomainBoundILStubClass.IL_STUB_PInvoke(System.Runtime.InteropServices.HandleRef, System.String, Int32, System.Runtime.InteropServices.HandleRef, System.Drawing.Internal.GPRECTF ByRef, System.Runtime.InteropServices.HandleRef, System.Drawing.Internal.GPRECTF ByRef, Int32 ByRef, Int32 ByRef) 0454d9e0 0454d9e4 0454d9e8 31f37488
System.Drawing.Graphics.MeasureString(System.String, System.Drawing.Font, System.Drawing.PointF, System.Drawing.StringFormat) 31f37488 00000000 00000000 31f390d8
..(System.String, System.Drawing.PointF, .a) 31f38bf8 00000000 00000000 3208ee98
..(, , .a, .a, ByRef) 0454dac8 31f38e54 31f3751c 00000000
..(, , Aspose.Slides.Pptx.PortionEx) 31f3751c 00000000 0000000a 31f3751c
..() 3f800000 320811b8 32089994 2005532c
.…ctor(Aspose.Slides.Pptx.ParagraphFormatEx[], Aspose.Slides.Pptx.ParagraphExCollection, Single, Single, Int32, Single, Boolean, Aspose.Slides.Pptx.TextAnchorTypeEx, Boolean, Aspose.Slides.Pptx.BaseSlideEx, FloatColor, Aspose.Slides.Pptx.FontsEx, Aspose.Slides.Pptx.FontCollectionIndexEx, Single, Single, Int32) 00000010 00000000 3f800000 00000000
Aspose.Slides.Pptx.TextFrameEx.(Single, Single, ., .�) 00000002 323285ec 00000000 00000008
System.Globalization.CompareInfo.IsPrefix(System.String, System.String, System.Globalization.CompareOptions) 00000038 0161aee0 79163839 1d953ba0
clr!COMString::IndexOfCharArray+b3 79142c26 1d953b84 0454e1ac 0454e1a4
0x3232520c 0454e1a4 0289868d 00000000 00000000
0x0454e1ac 0289868d 00000000 00000000 00000000
0x0454e1a4 1f85ffac 0454e30c 0454ec6c 082ab80f
0x26a131b4

And then we debugged the service using visual studio “Attach process” option with the code, and found out that the exception is thrown when we call TableEx.Height method for a table. this is really frustrating to have such issues, its almost more than an year we are trying to release PPTX version of our product and every time we are struggling because of some Aspose issue. really appreciate a properly tested product.

i have attached the debug dias report, the direct inner exception details, and the template in the attachment for your reference.

Thanks,
Aneef

Hi Aneef,


Please accept my apologies for the caused inconvenience. We have always tried our best to serve your issue well. I have observed the issue that you are getting table height issue equals to null in thread environment but in order to reproduce the issue on our end please share the source project code. This way our development team will be able to quickly assess the situation.

We are sorry for your inconvenience,

Mudassir,

sorry for responding late on this. but if you see, we have been working on various simulators to reproduce errors we have got. and spending alot of time in creating them without concentrating on our actual development work. to reproduce this we have to almost write the same window service and prepare the sample data which might take sometime, with having the other issues.

but appreciate if your devs can look in to the code and see if there are any threading issues because the exception throws exactly when we try to get the table.Height property. we are happy to share a remote session if you are willing to so we can recreate and show you the error. also i think the attached logs gives alot of information too.

Thanks,
Aneef

Hi Aneef,


I agree with your point of view but at the same time you see when you provide all the necessary information it is easy for us to focus on your issue and developer can easily work over that and can produce results earlier. I may kindly request you to provide us with all necessary information to reproduce the data as because without that it will be hard for developer to reproduce the same on our end. I regret to share that unfortunately, we may not cater the online access to your system and visualize the issue.

We are sorry for your inconvenience,