Bug 41006 - PDF View feature crashes app on Android 4.1 - “ Warning: Setting up fake worker”
Summary: PDF View feature crashes app on Android 4.1 - “ Warning: Setting up fake worker”
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 6.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Habersack
URL:
Depends on:
Blocks:
 
Reported: 2016-05-10 20:32 UTC by Ashley Gazich [MSFT]
Modified: 2016-09-01 20:03 UTC (History)
4 users (show)

See Also:
Tags: XATriaged
Is this bug a regression?: ---
Last known good build:


Attachments

Description Ashley Gazich [MSFT] 2016-05-10 20:32:05 UTC
### Summary

Customer reports:

We are trying to render pdf file as shown on https://developer.xamarin.com/recipes/cross-platform/xamarin-forms/controls/display-pdf/ 
and use just file:///android_asset/pdfjs/web/viewer.html without '?file=...' query (as was mentioned for API19<), also I've changed DEFAULT_URL in viewer.js to my file's path. It works fine with API 22, 23 – PDF file displayed on the screen, but it crashes with API 16 (Android 4.1).

Non-public report: https://kb.xamarin.com/agent/case/343661


### Results

This was successfully reproduced by Xamarin support.

[Web Console] Warning: Setting up fake worker. at file:///android_asset/pdfjs/build/pdf.js:224
[Web Console] PDF 110dd61fd57444010b1ab5ff38782f0f [1.4 pdfeTeX-1.21a / TeX] (PDF.js: 1.1.366) at file:///android_asset/pdfjs/web/viewer.js:6722
Thread finished: <Thread Pool> #5
[Mono] [0x5c3ed550] worker finishing
[IMGSRV] :0: __map: Map device memory failed
[GraphicBufferMapper] registerBuffer(0x6d968fa0) failed -14 (Bad address)
[mono-rt] 
[mono-rt] Attempting native Android stacktrace:
[mono-rt] 
[mono-rt] at memcpy+136 [0x400aa1f4]
[mono-rt] at ???+3455343 [0x5afac96f]
[mono-rt] at ???+3430467 [0x5afa6843]
[mono-rt] at ???+3429427 [0x5afa6433]
[mono-rt] at ???+3429465 [0x5afa6459]
[mono-rt] at WebCore::LayerAndroid::LayerAndroid(WebCore::LayerAndroid const&)+400 [0x5afa97b5]
[mono-rt] at ???+3447369 [0x5afaaa49]
[mono-rt] at WebCore::LayerAndroid::LayerAndroid(WebCore::LayerAndroid const&)+400 [0x5afa97b5]
[mono-rt] at ???+3425827 [0x5afa5623]
[mono-rt] at WebCore::LayerAndroid::LayerAndroid(WebCore::LayerAndroid const&)+400 [0x5afa97b5]
[mono-rt] at ???+3425827 [0x5afa5623]
[mono-rt] at WebCore::LayerAndroid::LayerAndroid(WebCore::LayerAndroid const&)+400 [0x5afa97b5]
[mono-rt] at ???+3425827 [0x5afa5623]
[mono-rt] at WebCore::LayerAndroid::LayerAndroid(WebCore::LayerAndroid const&)+400 [0x5afa97b5]
[mono-rt] at ???+2383611 [0x5aea6efb]
[mono-rt] at ???+2383725 [0x5aea6f6d]
[mono-rt] at ???+2383773 [0x5aea6f9d]
[mono-rt] at dvmPlatformInvoke+112 [0x40748e30]
[mono-rt] at dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+394 [0x40778083]
[mono-rt] at ???+160352 [0x40752260]
[mono-rt] at dvmInterpret(Thread*, Method const*, JValue*)+180 [0x40756b68]
[mono-rt] at dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272 [0x4078a7f1]
[mono-rt] at dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20 [0x4078a81b]
[mono-rt] at ???+345043 [0x4077f3d3]
[mono-rt] at __thread_entry+48 [0x400aebb0]
[mono-rt] at pthread_create+172 [0x400ae308]
[mono-rt] 
[mono-rt] =================================================================
[mono-rt] Got a SIGSEGV while executing native code. This usually indicates
[mono-rt] a fatal error in the mono runtime or one of the native libraries 
[mono-rt] used by your application.
[mono-rt] =================================================================
[mono-rt] 
[libc] Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 2809 (WebViewCoreThre)


### Version info (from Xamarin support team)

== Xamarin Studio Business ===
Version 5.10.3 (build 51)
Installation UUID: ee07b9c8-41e3-496f-a1ab-e8a3ed3db20f
Runtime:
   Mono 4.2.3 (explicit/832de4b)
   GTK+ 2.24.23 (Raleigh theme)
   Package version: 402030004

=== Xamarin.Profiler ===
Version: 0.22.0.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Apple Developer Tools ===
Xcode 7.2 (9536.2)
Build 7C46t

=== Xamarin.iOS ===
Version: 9.6.1.9 (Xamarin Business)
Hash: 5f11db8
Branch: master
Build date: 2016-03-25 21:26:55-0400

=== Xamarin.Android ===
Version: 6.0.3.5 (Xamarin Business)
Android SDK: /Users/dominicnahous/Library/Developer/Xamarin/android-sdk-macosx
   Supported Android versions:
       2.3   (API level 10)
       4.0.3 (API level 15)
       4.1   (API level 16)
       4.2   (API level 17)
       4.4   (API level 19)
       5.0   (API level 21)
       5.1   (API level 22)
       6.0   (API level 23)
SDK Tools Version: 25.1.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.3
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===
Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===
Version: 2.4.2.1 (Xamarin Business)
=== Build Information ===
Release ID: 510030051
Git revision: f3c0d982165f785772d125f02668370d929014fb
Build date: 2016-03-24 18:51:31-04
Xamarin addins: ee5cfd3ecb6b20de47c1d25efb9a9abc101e8ce7
Build lane: monodevelop-lion-cycle6-c6sr3
=== Operating System ===
Mac OS X 10.10.5
Darwin Dominics-MacBook-Pro.local 14.5.0 Darwin Kernel Version 14.5.0
   Wed Jul 29 02:26:53 PDT 2015
   root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
Comment 1 Marek Habersack 2016-05-19 07:50:03 UTC
@Ashley, I understand it happens with the unmodified sample/recipe from https://developer.xamarin.com/recipes/cross-platform/xamarin-forms/controls/display-pdf/ ?
Comment 2 Marek Habersack 2016-05-19 09:05:25 UTC
@Ashley, I cannot reproduce it in a 4.1 emulator, can you please request the customer to package their modified sample? Please then attach the sample to this bug and change the status to NEW from NEEDINFO, thanks!

Note You need to log in before you can comment on or make changes to this bug.