Error loading multiple files

I have an error on Xamarin Android, when I try to upload files up to 3x. I open the first, without problems, I open the second, without problems, from the third, I get an error in Visual Studio:

---------------------------
Microsoft Visual Studio
---------------------------
EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object.
   at Mono.Debugging.VisualStudio.ExceptionsAdapter.OnUnhandledException (Object sender, TargetEventArgs args) in E: \ A \ _work \ 3268 \ s \ src \ Debugging.VisualStudio.Vsix \ Integration \ ExceptionsAdapter.cs: line 83
   at System.EventHandler`1.Invoke (Object sender, TEventArgs e)
   at Mono.Debugging.Client.DebuggerSession.OnTargetEvent (TargetEventArgs args) in E: \ A \ _work \ 3268 \ s \ external \ debugger-libs \ Mono.Debugging \ Mono.Debugging.Client \ DebuggerSession.cs: line 1204
   at Mono.Debugging.Soft.SoftDebuggerSession.HandleBreakEventSet (Event [] es, Boolean dequeuing) in E: \ A \ _work \ 3268 \ s \ external \ debugger-libs \ Mono.Debugging.Soft \ SoftDebuggerSession.cs: line 2057
   at Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet (EventSet es) in E: \ A \ _work \ 3268 \ s \ external \ debugger-libs \ Mono.Debugging.Soft \ SoftDebuggerSession.cs: line 1740
   at Mono.Debugging.Soft.SoftDebuggerSession.EventHandler () in E: \ A \ _work \ 3268 \ s \ external \ debugger-libs \ Mono.Debugging.Soft \ SoftDebuggerSession.cs: line 1640
---------------------------
OK
---------------------------

My upload code:
if (pdf == null)
                {
                    pdf = new SfPdfViewer ()
                    {
                        HorizontalOptions = LayoutOptions.FillAndExpand,
                        VerticalOptions = LayoutOptions.FillAndExpand,
                        IsPasswordViewEnabled = false,
                        PreserveSignaturePadOrientation = true
                    };
                }

                pdf.InputFileStream = PdfDocumentStream;

Xamarin: 4.5.0.356
SyncFusion: 18.1.0.48
Android: 8.1.0

1 Reply

AV Ashokkumar Viswanathan Syncfusion Team May 12, 2020 07:02 AM UTC

Hi SyncFusion Algorama, 
 
We have created a sample to reproduce the issue, “Application crashes with null reference exception while loading PDF document multiple times”, but its working as expected.  
 
Please find the sample in the below link, 
 
Kindly share the following details to analyze more on this issue and assist you with the better solution   
  • Simple sample/ modify the above sample to reproduce the issue. 
  • PDF document with which you have reproduced. 
  • Replication procedure to reproduce the issue. 
 
Regards, 
Ashok Kumar Viswanathan. 


Loader.
Up arrow icon