We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

PdfViewer crash on unload.

Hi,
PdfViewer's keep crashing when I'm trying to unload resource directly using method Unload() on pdfViewer.
Here's link to my github with minimum code required to reproduce this bug. Github
Basically what I did is.. I have created two pages. First page contains button which pushing another one through navigation stack. Second page has PdfViewer and a button. Resource is being loaded inside a constructor of the second page directly in code-behind (to make things as simple as I can). Button has clicked event in code-behind as well, which is invoking Unload() method directly on pdfViewer control. This crash comes on Android platform. I haven't checked this bug on iOS yet. Here's some more information from the debugger.
=================================================================
Native Crash Reporting
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

=================================================================
Basic Fault Adddress Reporting
=================================================================
Memory around native instruction pointer (0xa2bab3ff):0xa2bab3ef 00 00 8b 6c 24 70 8b 46 78 85 c0 74 16 0f b7 10 ...l$p.Fx..t....
0xa2bab3ff 8b 4d 50 39 ca 7c 0c 8b 7c 88 04 85 ff 0f 85 54 .MP9.|..|......T
0xa2bab40f 01 00 00 8b 44 24 78 c7 00 00 00 00 00 e8 6f 65 ....D$x.......oe
0xa2bab41f fd ff 89 2c 24 e8 e7 ab f8 ff 8b 76 78 85 f6 74 ...,$......vx..t

No native Android stacktrace (see debuggerd output).

=========================================================
06-17 08:32:30.754 E/mono-rt ( 3968): /proc/self/maps:========
Managed Stacktrace:
=================================================================
domain required for stack walk=================================================================

06-17 08:32:30.754 E/mono-rt ( 3968): 12c00000-12e25000 rw-p 00000000 00:04 602 /dev/ashmem/dalvik-main space (deleted)
06-17 08:32:30.754 E/mono-rt ( 3968): 12e25000-12e8d000 rw-p 00225000 00:04 602 /dev/ashmem/dalvik-main space (deleted)
06-17 08:32:30.754 E/mono-rt ( 3968): 12e8d000-22c00000 ---p 0028d000 00:04 602 /dev/ashmem/dalvik-main space (deleted)
06-17 08:32:30.754 E/mono-rt ( 3968): 22c00000-22c01000 rw-p 00000000 00:04 603 /dev/ashmem/dalvik-main space 1 (deleted)
06-17 08:32:30.754 E/mono-rt ( 3968): 22c01000-32c00000 ---p 00001000 00:04 603 /dev/ashmem/dalvik-main space 1 (deleted)
06-17 08:32:30.754 E/mono-rt ( 3968): 6f601000-6ffda000 rw-p 00000000 fd:20 32778 /data/dalvik-cache/x86/system@framework@boot.art
06-17 08:32:30.754 E/mono-rt ( 3968): 6ffda000-71e8c000 r--p 00000000 fd:20 32779 /data/dalvik-cache/x86/system@framework@boot.oat
06-17 08:32:30.754 E/mono-rt ( 3968): 71e8c000-73b88000 r-xp 01eb2000 fd:20 32779 /data/dalvik-cache/x86/system@framework@boot.oat
06-17 08:32:30.754 E/mono-rt ( 3968): 73b88000-73b89000 rw-p 03bae000 fd:20 32779 /data/dalvik-cache/x86/system@framework@boot.oat
06-17 08:32:30.754 E/mono-rt ( 3968): 73b89000-73c63000 rw-p 00000000 00:04 601 /dev/ashmem/dalvik-zygote space (deleted)
06-17 08:32:30.754 E/mono-rt ( 3968): 73c63000-73c64000 rw-p 00000000 00:04 5201 /dev/ashmem/dalvik-non moving space (deleted)
06-17 08:32:30.754 E/mono-rt ( 3968): 73c64000-73c75000 rw-p 00001000 00:04 5201 /dev/ashmem/dalvik-non moving space (deleted)
06-17 08:32:30.754 E/mono-rt ( 3968): 73c75000-7778a000 ---p 00012000 00:04 5201 /dev/ashmem/dalvik-non moving space (deleted)
06-17 08:32:30.754 E/mono-rt ( 3968): 7778a000-77b89000 rw-p 03b27000 00:04 5201 /dev/ashmem/dalvik-non moving space (deleted)
06-17 08:32:30.754 E/mono-rt ( 3968): 98fc0000-99bc0000 rw-p 00000000 00:00 0 [anon:libc_malloc]
06-17 08:32:30.754 E/mono-rt ( 3968): 99bed000-9a1c0000 rw-p 00000000 00:04 18514 /dev/ashmem/dalvik-large object space allocation (deleted)
06-17 08:32:30.754 E/mono-rt ( 3968): 9a1c0000-9a280000 rw-p 00000000 00:00 0 [anon:libc_malloc]
06-17 08:32:30.754 E/mono-rt ( 3968): 9a300000-9a400000 rw-p 00000000 00:00 0
06-17 08:32:30.754 E/mono-rt ( 3968): 9a4a2000-9a4b2000 rwxp 00000000 00:00 0
06-17 08:32:30.754 E/mono-rt ( 3968): 9a4b2000-9a4cb000 rw-p 00000000 00:04 17531 /dev/ashmem/dalvik-large object space allocation (deleted)
06-17 08:32:30.754 E/mono-rt ( 3968): 9a4cb000-9a4fb000 rwxp 00000000 00:00 0
06-17 08:32:30.754 E/mono-rt ( 3968): 9a4fb000-9a4fc000 ---p 00000000 00:00 0
06-17 08:32:30.754 E/mono-rt ( 3968): 9a4fc000-9a4fd000 ---p 00000000 00:00 0
06-17 08:32:30.754 E/mono-rt ( 3968): 9a4fd000-9a600000 rw-p 00000000 00:00 0
06-17 08:32:30.754 E/mono-rt ( 3968): 9a600000-9a700000 rw-p 00000000 00:00 0
06-17 08:32:30.755 F/libc ( 3968): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x50 in tid 4014 (pool-4-thread-1)
06-17 08:32:30.765 D/Mono ( 3968): Loading reference 10 of /storage/emulated/0/Android/data/com.companyname.PDFViewerPoC/files/.__override__/Syncfusion.SfPdfViewer.XForms.Android.dll asmctx DEFAULT, looking for System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
06-17 08:32:30.765 D/Mono ( 3968): Assembly Ref addref Syncfusion.SfPdfViewer.XForms.Android[0xacb61560] -> System.Core[0xb3fd8640]: 7


4 Replies

SS Sathish Sivakumar Syncfusion Team June 18, 2019 06:19 AM UTC

Hi Pawal, 
 
Greetings from Syncfusion.  
 
We tried to reproduce the issue “Application crashes when unloading the PDF document from SfPdfViewer” in Xamarin.Forms.Android, but it is working fine as expected. Kindly refer the sample in the below link which we created to reproduce the reported issue based on details provided in your update. 
  
  
Kindly share the following details to analyze more on this issue and it will be helpful for us to analyze more on this issue. 
1.     Modify / Simple sample with which the issue could be reproduced. 
2.     Replication procedure to reproduce the issue or screen shot illustrating the issue. 
3.     Android device specification with the OS version. 
4.     PDF document with which the issue could be reproduced 
  
Regards, 
Sathish 



PR Pawel Rudnicki June 18, 2019 09:06 AM UTC

Good morning Syncfusion Team,

Thank you very much for your support. I've checked sample that you have provided and still have the same error when I'm tapping on 'Unload'. I have tested it on iOS and everything seems to be fine. When I'm testing it on different android devices I'm keep getting this error. So far, I've checked it on a real android device and the emulated one.

1. Galaxy S9+, SM-G965F, Android Version: 9, Knox version: 3.2.1, API level 27, TIMA 4.0.0
2. Nexus 5X, OS. Marshmallow 6.0 - API 23

Not sure if it makes any difference, but I'm also use:
1. Microsoft Visual Studio Community 2019, Version 16.0.1
2. Xamarin 16.0.0.515,
3. Xamarin Android SDK - 9.2.0.5
4. Inside of Visual studio -> Android project -> properties -> Application -> Compile using Android version ( Android 8.1 (Oreo) ),

I have recorded a video that shows this error repro steps :) -> https://vimeo.com/user99854789/review/342945449/99beb48839


PR Pawel Rudnicki June 18, 2019 11:28 AM UTC

Hi,

After updating Visual studio to the latest version, so as xamarin components everything works just fine! Thank you for your support and I'm sorry for bothering you.

Kind Regards,
Paweł.


SS Sathish Sivakumar Syncfusion Team June 18, 2019 11:38 AM UTC

Hi Pawel, 

We are glad to hear that the reported issue is resolved. 

Regards, 
Sathish 


Loader.
Live Chat Icon For mobile
Up arrow icon