Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Wed Jul 27, 2022 12:30 pm

Hi, I am using FreeSpire.Presentation 6.8.5 package in a .NET core 3.1 app. When I attempt to execute SaveToFile method on Presentation like this:
Code: Select all
ppt.SaveToFile(request.Profile.ProfileName + "_Profile_Export.pptx", FileFormat.Pptx2013);


then I receive a System.NullReferenceException
This error is bubbled up from within Spire package. Please note that when I look in to the directory location, I can see the PPT created. Yet the exception is thrown.
The stack trace is as follows:
Code: Select all
System.NullReferenceException:
   at spr⚯..ctor (Spire.Pdf, Version=7.8.9.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at spr⚯..ctor (Spire.Pdf, Version=7.8.9.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at sprᬊ..ctor (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at sprᬊ..ctor (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at spr᪼.ᜀ (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at sprᝇ.ᜀ (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at sprᝇ.ᜀ (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at sprᝇ.ᜁ (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at sprᝇ.ᜀ (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at sprᝇ.ᜀ (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at sprᝇ.ᜀ (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at sprᝇ..ctor (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at sprᝧ.ᜀ (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at sprᝎ.ᜌ (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at Spire.Presentation.Collections.ShapeList.ᜀ (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at Spire.Presentation.GroupShape.PptxPrepareForSaving (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at Spire.Presentation.ActiveSlide.PresentationBeforeSave (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at sprᝠ.ᜀ (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at spr᝚.ᜀ (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at spr᝚.ᜀ (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at spr᝚.ᜀ (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at spr᝚.ᜀ (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at Spire.Presentation.Presentation.SaveToFile (Spire.Presentation, Version=6.8.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3)
   at xxxExport.Controllers.ExportController.ExportxxxProfile (xxxExport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
   at lambda_method (Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)
   at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute (Microsoft.AspNetCore.Mvc.Core, Version=3.1.26.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor+SyncActionResultExecutor.Execute (Microsoft.AspNetCore.Mvc.Core, Version=3.1.26.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker+<<InvokeActionMethodAsync>g__Logged|12_1>d.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=3.1.26.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker+<<InvokeNextActionFilterAsync>g__Awaited|10_0>d.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=3.1.26.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow (Microsoft.AspNetCore.Mvc.Core, Version=3.1.26.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next (Microsoft.AspNetCore.Mvc.Core, Version=3.1.26.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync (Microsoft.AspNetCore.Mvc.Core, Version=3.1.26.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker+<<InvokeFilterPipelineAsync>g__Awaited|19_0>d.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=3.1.26.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker+<<InvokeAsync>g__Logged|17_1>d.MoveNext (Microsoft.AspNetCore.Mvc.Core, Version=3.1.26.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware+<<Invoke>g__AwaitRequestTask|6_0>d.MoveNext (Microsoft.AspNetCore.Routing, Version=3.1.26.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware+<Invoke>d__5.MoveNext (Microsoft.AspNetCore.Authorization.Policy, Version=3.1.26.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContextOfT`1+<ProcessRequestAsync>d__2.MoveNext (Microsoft.AspNetCore.Server.IIS, Version=3.1.26.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)

hspablahp
 
Posts: 1
Joined: Wed Jul 27, 2022 12:22 pm

Thu Jul 28, 2022 2:54 am

Hello Harpreet Singh,

Thanks for your message.
Since our latest Version of Spire.Presentation Pack Hotfix Version:7.7.5 includes more bug fixes, as for your situation, I prefer to recommend you to use this version to try again. If your issue still exists after testing, to help us look into your issue accurately, please share the following more details with us. You can upload them here or send them to us via email(support@e-iceblue.com). Thanks in advance.
1.Your full testing code as well as your input file(if any).
2.Your system information (E.g. Win10, 64 bit) and region setting (E.g. China, Chinese).

Sincerely
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Wed Aug 03, 2022 9:02 am

Hello Harpreet Singh,

Could you please let us know how is your issue going? Thanks in advance for your feedback and time.

Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Return to Spire.Presentation