Closed Bug 823410 Opened 13 years ago Closed 12 years ago

[PDF.js] Pdf files are not loading pdfviewer, just exits immediately back to browser

Categories

(Firefox OS Graveyard :: Gaia::PDF Viewer, defect, P3)

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-basecamp:-, b2g18 affected, b2g18-v1.0.1 affected)

RESOLVED WORKSFORME
B2G C3 (12dec-1jan)
blocking-basecamp -
Tracking Status
b2g18 --- affected
b2g18-v1.0.1 --- affected

People

(Reporter: tchung, Unassigned)

References

()

Details

(Whiteboard: testrun 5.1 ,inarirun2)

Attachments

(4 files)

Attached image screenshot
Visit sites that should launch a .pdf file within pdfviewer. You'll see pdf.js try to load, and then immediately exit back to the browser. The file never loads and can not be viewed. Requesting bb+, since pdfviewer is a v1 feature. See screenshot logcat: 12-19 23:29:14.132: I/GeckoDump(2296): XXX FIXME : Got a mozContentEvent: activity-choice 12-19 23:29:14.322: E/GeckoConsole(2296): Content JS INFO at app://system.gaiamobile.org/js/window_manager.js:1079 in createFrame: %%%%% Launching PDF Viewer as remote (OOP) 12-19 23:29:14.412: D/memalloc(2296): /dev/pmem: Allocated buffer base:0x4be5a000 size:614400 offset:1843200 fd:112 12-19 23:29:14.442: D/memalloc(2296): /dev/pmem: Allocated buffer base:0x4be5a000 size:614400 offset:5632000 fd:187 12-19 23:29:14.863: D/memalloc(2296): /dev/pmem: Allocated buffer base:0x4be5a000 size:614400 offset:6246400 fd:193 12-19 23:29:14.893: E/profiler(4449): Registering start signal 12-19 23:29:14.903: D/memalloc(2296): /dev/pmem: Freeing buffer base:0x4c148000 size:532480 offset:3072000 fd:113 12-19 23:29:14.903: D/memalloc(2296): /dev/pmem: Freeing buffer base:0x4c0b2000 size:532480 offset:2457600 fd:155 12-19 23:29:14.903: D/memalloc(2296): /dev/pmem: Freeing buffer base:0x4bef0000 size:81920 offset:614400 fd:130 12-19 23:29:14.903: D/memalloc(2296): /dev/pmem: Freeing buffer base:0x4c134000 size:81920 offset:2990080 fd:166 12-19 23:29:14.903: D/memalloc(2296): /dev/pmem: Freeing buffer base:0x4c01c000 size:614400 offset:1843200 fd:112 12-19 23:29:14.903: D/memalloc(2296): /dev/pmem: Freeing buffer base:0x4c3b9000 size:614400 offset:5632000 fd:187 12-19 23:29:15.213: E/GeckoConsole(4449): [JavaScript Warning: "Unknown property '-moz-align-self'. Declaration dropped." {file: "resource://gre-resources/ua.css" line: 44}] 12-19 23:29:15.453: I/Gecko(4449): ###################################### forms.js loaded 12-19 23:29:15.673: D/memalloc(2296): /dev/pmem: Allocated buffer base:0x4be5a000 size:614400 offset:614400 fd:112 12-19 23:29:16.004: E/GeckoConsole(4449): [JavaScript Warning: "Error in parsing value for 'background-image'. Declaration dropped." {file: "app://pdfjs.gaiamobile.org/content/web/viewer.css" line: 208}] 12-19 23:29:16.004: E/GeckoConsole(4449): [JavaScript Warning: "Error in parsing value for 'background'. Declaration dropped." {file: "app://pdfjs.gaiamobile.org/content/web/viewer.css" line: 220}] 12-19 23:29:16.004: E/GeckoConsole(4449): [JavaScript Warning: "Error in parsing value for 'background'. Declaration dropped." {file: "app://pdfjs.gaiamobile.org/content/web/viewer.css" line: 221}] 12-19 23:29:16.004: E/GeckoConsole(4449): [JavaScript Warning: "Error in parsing value for 'background'. Declaration dropped." {file: "app://pdfjs.gaiamobile.org/content/web/viewer.css" line: 223}] 12-19 23:29:16.004: E/GeckoConsole(4449): [JavaScript Warning: "Error in parsing value for 'background'. Declaration dropped." {file: "app://pdfjs.gaiamobile.org/content/web/viewer.css" line: 224}] 12-19 23:29:16.004: E/GeckoConsole(4449): [JavaScript Warning: "Expected color but found 'top'. Error in parsing value for 'background'. Declaration dropped." {file: "app://pdfjs.gaiamobile.org/content/web/viewer.css" line: 225}] 12-19 23:29:16.004: E/GeckoConsole(4449): [JavaScript Warning: "Error in parsing value for 'background-image'. Declaration dropped." {file: "app://pdfjs.gaiamobile.org/content/web/viewer.css" line: 243}] 12-19 23:29:16.004: E/GeckoConsole(4449): [JavaScript Warning: "Error in parsing value for 'background-image'. Declaration dropped." {file: "app://pdfjs.gaiamobile.org/content/web/viewer.css" line: 244}] 12-19 23:29:16.004: E/GeckoConsole(4449): [JavaScript Warning: "Error in parsing value for 'background-image'. Declaration dropped." {file: "app://pdfjs.gaiamobile.org/content/web/viewer.css" line: 245}] 12-19 23:29:18.756: E/profiler(4466): Registering start signal 12-19 23:29:21.419: I/Gecko(2296): [Parent 2296] WARNING: pipe error (139): Connection reset by peer: file ../../../gecko/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 431 12-19 23:29:21.429: I/Gecko(2296): [Parent 2296] WARNING: pipe error (152): Connection reset by peer: file ../../../gecko/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 431 12-19 23:29:22.330: D/memalloc(2296): /dev/pmem: Allocated buffer base:0x4be5a000 size:614400 offset:5632000 fd:131 12-19 23:29:22.420: D/memalloc(2296): /dev/pmem: Freeing buffer base:0x4bef0000 size:614400 offset:614400 fd:112 12-19 23:29:22.430: D/memalloc(2296): /dev/pmem: Freeing buffer base:0x4c44f000 size:614400 offset:6246400 fd:193 12-19 23:29:22.500: D/memalloc(2296): /dev/pmem: Allocated buffer base:0x4be5a000 size:532480 offset:614400 fd:112 12-19 23:29:22.540: D/memalloc(2296): /dev/pmem: Allocated buffer base:0x4be5a000 size:81920 offset:1146880 fd:155 12-19 23:29:22.540: D/memalloc(2296): /dev/pmem: Allocated buffer base:0x4be5a000 size:614400 offset:1843200 fd:166 12-19 23:29:22.590: D/memalloc(2296): /dev/pmem: Allocated buffer base:0x4be5a000 size:532480 offset:2457600 fd:171 12-19 23:29:22.610: D/memalloc(2296): /dev/pmem: Allocated buffer base:0x4be5a000 size:81920 offset:2990080 fd:186 12-19 23:29:22.750: D/memalloc(2296): /dev/pmem: Freeing buffer base:0x4c01c000 size:614400 offset:1843200 fd:166 12-19 23:29:22.760: D/memalloc(2296): /dev/pmem: Freeing buffer base:0x4c3b9000 size:614400 offset:5632000 fd:131 12-19 23:29:23.181: E/profiler(4472): Registering start signal 12-19 23:29:24.112: E/GeckoConsole(4472): [JavaScript Warning: "Unknown property '-moz-align-self'. Declaration dropped." {file: "resource://gre-resources/ua.css" line: 44}] Repro 1) install unagi nightly build: 20121219070201 2) launch browser, and visit a site that loads pdf files (www.uscis.gov <== forms) (www.irs.gov <== w-2 form on left side) 3) verify the screen will change to load the pdf, and then exit back to browser before ever loading the pdf. Expected; - pdf loads, and user can view it ActuaL; - pdf never loads, exits to browser app
blocking-basecamp: ? → +
Priority: -- → P3
Target Milestone: --- → B2G C3 (12dec-1jan)
I assume this is due to OOM, however I am not sure whether logcat can verify that or not ..
My first guess is like Tim but this pdf ((www.uscis.gov <== forms) (www.irs.gov <== w-2 form on left side)) is supposed to be a small pdf :/
(In reply to Vivien Nicolas (:vingtetun) from comment #2) > My first guess is like Tim but this pdf ((www.uscis.gov <== forms) > (www.irs.gov <== w-2 form on left side)) is supposed to be a small pdf :/ And this is an OOM: PDF Viewer app_622 622 109 177188 103028 ffffffff 400236ec S /system/b2g/plugin-container the app consume way too much memory for displaying this particular PDF.
Works fine with some other PDFs: PDF Viewer app_1136 1136 109 242912 51588 ffffffff 40dd08c0 R /system/b2g/plugin-container Brendan do you know why the linked PDFs consume soo much memory? On the previous comment the consumed RSS is 177188.
(In reply to Vivien Nicolas (:vingtetun) from comment #2) > My first guess is like Tim but this pdf ((www.uscis.gov <== forms) > (www.irs.gov <== w-2 form on left side)) is supposed to be a small pdf :/ And I was wrong. This one is a big PDF file of 304 Pages with a big image on the first page. Should we really block on this one? The final fix probably include some deep investigations of PDF.js and optimizations...
blocking-basecamp: + → ?
blocking-basecamp: ? → -
pdf never loads, exits to browser app on Build id: 2012121707202
The pdf viewer is available by doing hard reboot of the device (removing the battery and replacing)
OOM should be caused by image loading. I remove lines of pdf.js:1937-1938 then the pdf (www.irs.gov <== w-2) can be opened without image. we may try some effective way to open large image.
forget my comment, it still happened :(
Issue persists on Unagi build 20130104070203. Went to http://apps.irs.gov/app/picklist/list/formsInstructions.html and tried to view one of the tax forms. See attached screen shot for the result.
Surprisingly I was able to open sample pdf one time(from http://samplepdf.com) as well as W2 and W4 forms from www.irs.gov after trying 10-15 times and hard resetting device (by pulling battery out 5 times) ones it opens you able to see document and scroll up and down and even zoom in and out. It takes a while to open it with a spinner indicator on a screen. The rest of the times Bug repro on Unagi Build 20130104070203 - as originally described.
UCID browser-111 Testcase found here https://moztrap.mozilla.org/results/case/61186/
Whiteboard: testrun 2
Issue occurs in Unagi build 20130115070201 with December 5th kernel.
This issues is still there on Unagi device Build ID: 20130125070201 using the december 5th kernel v 1.0.0-Pre release. Notes: Tried to download from sample.pdf. Pdf opens up and immediately goes back to the browser. User is unable to view the PDF file.
Whiteboard: testrun 2 → testrun 3
More information: Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/94a2d6fcdfde Gaia: 6369dbf33b622faf4b4d176fed30b77c5c319dfc Test Suite Name: PDF viewer UCID: PDF viewer-002, PDF viewer-003 Link to the failed test case: https://moztrap.mozilla.org/runtests/run/702/env/296/?pagenumber=1&pagesize=20&sortfield=order&sortdirection=asc&filter-id=4936&filter-id=4937
Unagi Build ID: 20130225070200 Kernel Date: Dec 5 Gecko: http://hg.mozilla.org/releases/mozilla-b Gaia: 5691a16fff8e1403c75ed9d6f3a443b7e58198c6 Test Suite Name: PDF viewer UCID: PDF viewer-002 I downloaded and opened from www.irs.gov W2.form the PDF file.It has 8 pages. This file opens in PDF Viewer, only the first three pages are displayed, others show only a white screen and loading process. The PDF viewer cannot open the rest of the pages and then it's crashes. This PDF file crashes also in master build
Whiteboard: testrun 3 → testrun 5.1
Need to repro in-house, and file a new bug w/ the smaller PDF file.
Keywords: qawanted
PDF viewer goes back to the browser immediately as soon as it is opened. This is found on Unagi Build ID: 20130322070203 Kernel Date: Dec 5 Gecko: http://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/4931ec89ebbe Gaia: 85fd164691bb852f1cfaf82405df4380629ced6e Also found in MASTER: Build ID: 20130327030651 Gecko: http://hg.mozilla.org/mozilla-central/rev/178a4a770bb1 Gaia: 8fc1b68d4018ad7d9dad272426b19e576189ac4f
Attached file w-2 form
attaching the file in case it changes (for next year)
Sounds like we've reproduced this per comment 19.
Keywords: qawanted
Whiteboard: testrun 5.1 → testrun 5.1 ,inarirun2
I believe Geo was suggesting to create a more narrowed down PDF file in house? It is reproducible with the attached PDF. I suspect it has to do with the large embedded images in the PDF.
(In reply to Naoki Hirata :nhirata (please use needinfo instead of cc) from comment #22) > I believe Geo was suggesting to create a more narrowed down PDF file in > house? > It is reproducible with the attached PDF. > > I suspect it has to do with the large embedded images in the PDF. I actually think that would be a different bug, so I'm not sure there's value to getting a reduced PDF here. The app getting killed implies a OOM, likely due to large images as part of the PDF seen in the PDF viewer.
I think what I meant was that comment 17 looked like a different bug than the one originally reported, since it said it used a small PDF (8 pages) and we were plainly dealing with an OOM on huge PDFs (304 pages) as the main bug. Looked like it got lumped in because it was a PDF crash, but probably a different root cause. So, what I probably meant was repro on the smaller file from comment 17, and assuming that wasn't an OOM, refile a different bug to cover comment 17's scenario. Comment 19 also sounds different still, if it happens before any PDF at all is loaded. I'm not sure that strikes me as a repro, per comment 21. Of course, if we feel strongly it's all the same bug, disregard, but it does look to me a little like we opened a very general "PDFs fail" bug which we're lumping every PDF problem into.
Putting qawanted then to do bug cleanup work here.
Keywords: qawanted
As per comment 24 a new bug created for a different issue https://bugzilla.mozilla.org/show_bug.cgi?id=876906 For this bug: Tested provided URL link http://www.uscis.gov/files/form/i-907instr.pdf All pages are loading without any issue, also tried to load different PDF files all files are loading and viewable as expected
Keywords: qawanted
Closing then per comment 26.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: