RESOLVED FIXED 11430
REGRESSION: Crash when loading PDF using AdobePDFViewer.plugin (Acrobat 7)
https://bugs.webkit.org/show_bug.cgi?id=11430
Summary REGRESSION: Crash when loading PDF using AdobePDFViewer.plugin (Acrobat 7)
Kevin M. Dean
Reported 2006-10-27 05:47:59 PDT
Crashes when loading a pdf using the Adobe PDF plugin. On a side-note, I was trying to evaluate if webkit continues to give the status "Failed to open page (see Activity window for details)" every time a pdf is viewed like Safari does. The Activity window says: "Plug-in Cancelled". It says this every time, but the pdfs are shown.
Attachments
Crash log (38.88 KB, text/plain)
2006-10-27 05:48 PDT, Kevin M. Dean
no flags
Crash log (36.26 KB, text/plain)
2006-11-12 06:47 PST, Mark Knopper
no flags
Crash Log for PDF crash (30.85 KB, text/plain)
2007-03-19 05:26 PDT, Patricia Warwick
no flags
Yet another PDF crash log (32.30 KB, text/plain)
2007-04-02 08:47 PDT, Peter Norby
no flags
Yet another PDF crash log (658.58 KB, text/plain)
2007-06-19 12:29 PDT, Jay Batson
no flags
Kevin M. Dean
Comment 1 2006-10-27 05:48:47 PDT
Created attachment 11238 [details] Crash log
mitz
Comment 2 2006-10-27 07:31:29 PDT
The regression occurred in r17264 due to a change to IconLoader::startLoading(). If the frame is "documentless", you need to bail out for now (see bug 10902).
Brady Eidson
Comment 3 2006-10-27 10:47:30 PDT
Oh that crazy Maciej... I'll take this and clean it up later today after I get some more stuff out of my tree
mitz
Comment 4 2006-11-06 11:33:29 PST
*** Bug 11530 has been marked as a duplicate of this bug. ***
Brady Eidson
Comment 5 2006-11-06 13:15:41 PST
*** Bug 11530 has been marked as a duplicate of this bug. ***
Brady Eidson
Comment 6 2006-11-06 13:17:51 PST
Patch reviewed in bug 11530 - didn't even realize it was closed as a dupe of this one. Committed in r17626
Brady Eidson
Comment 7 2006-11-06 13:18:33 PST
Kevin, please verify
Kevin M. Dean
Comment 8 2006-11-06 15:53:05 PST
Still crashes with the same crash log on my end with r17630
Mark Knopper
Comment 9 2006-11-12 06:47:49 PST
Created attachment 11495 [details] Crash log
Mark Knopper
Comment 10 2006-11-12 06:48:17 PST
I am getting a similar crash with today's nightly (r17743). It happens at this URL: http://www.toledomuseum.org/pdf/Map_with_directions.pdf To reproduce go to this page (http://www.toledomuseum.org/Info_main.htm ) and click on "Printable Museum-area map with driving directions (in PDF format): Click here". A new window opens and the crash happens after that. I will post the crash log.
Kevin M. Dean
Comment 11 2006-11-16 05:06:50 PST
EasyFix? Still crashing here.
mitz
Comment 12 2006-11-17 08:32:22 PST
I looked at the crash logs again and realized that this bug is about using Adobe's PDF Viewer plugin. On a debug build of TOT I get the following error prior to the crash: ERROR: NPP_NewStream failed with error: 1 responseURL: http://media.corporate-ir.net/media_files/irol/10/107357/corpGov/AppleSupplierCoc111305.pdf (WebKit/Plugins/WebBaseNetscapePluginStream.m:226 -[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]) Earlier nightlies (r17205 and earlier) don't crash immediately, but don't display the PDF. Some crash when I close the window containing the PDF plugin. Even earlier nightlies (before r15598; fix for bug 10009) don't load the Adobe plugin and use WebKit's native PDF View instead, making it difficult to determine when the bug was introduced. See also bug 10510.
Alexey Proskuryakov
Comment 13 2006-11-17 12:00:30 PST
> ERROR: NPP_NewStream failed with error: 1 I have checked in gdb - stock Safari/WebKit also get this error. It's a bit weird, because the plugin fills out the response before returning the error (1 == NPERR_GENERIC_ERROR), but seems to be unrelated. BTW, this might be related to the "Plugin cancelled" error in Activity window. The problem at hand is caused by _loader being nil (this is a "manual" stream that is created with plain alloc+init sequence instead of initWith...). However, I'm not sure if fixing this by adding nil checks is right. > Earlier nightlies (r17205 and earlier) don't crash immediately, but don't > display the PDF. Some crash when I close the window containing the PDF plugin. I also got a crash deep inside the Adobe plugin after adding nil checks for _loader. > EasyFix? Still crashing here. Removed EasyFix, added NeedsRadar.
Kevin M. Dean
Comment 14 2006-12-01 13:29:05 PST
I've updated to Acrobat 8 which in-turn updated the pdf plugin. It no longer crashes, but I don't know if this got fixed before I upgraded. Can someone who's still running version 7 of the plugin see if it still crashes for them.
Alexey Proskuryakov
Comment 15 2006-12-01 21:02:00 PST
Yes, the underlying regression in WebKit is still present - it cannot cope with an error returned from the plugin.
David Kilzer (:ddkilzer)
Comment 16 2006-12-17 16:10:28 PST
*** Bug 11851 has been marked as a duplicate of this bug. ***
Mark Rowe (bdash)
Comment 17 2007-01-16 19:06:03 PST
Maciej Stachowiak
Comment 18 2007-02-07 05:26:16 PST
The Radar is closed due to the new Acrobat 8, but as Alexey says this is still a real regression, so adding back NeedsRadar.
Maciej Stachowiak
Comment 19 2007-02-10 19:12:28 PST
Alexey Proskuryakov
Comment 20 2007-03-18 09:34:29 PDT
Looks like the problem has been fixed during loader refactoring (which has changed this code very heavily). I can not reproduce it anymore; here is what I tried: 1) Hacked the return value of NPP_NewStream to be an error (matching how Acrobat 7 worked), patch below. 2) Opened the bug URL - but Acrobat 8 doesn't even get to this point in code, so it didn't prove anything. 3) Opened www.adobe.com/flash - the Flash plugin got this code to execute, but WebKit didn't have any problem handling the error. I couldn't test with Acrobat 7 because of bug 10510. However, I'm confused by the duplicates that were filed much later than bug 10510, yet used Acrobat 7. Does Acrobat 7 work for anyone with nightlies? Index: /Users/ap/WebKit/WebKit/Plugins/WebBaseNetscapePluginStream.m =================================================================== --- /Users/ap/WebKit/WebKit/Plugins/WebBaseNetscapePluginStream.m (revision 20268) +++ /Users/ap/WebKit/WebKit/Plugins/WebBaseNetscapePluginStream.m (working copy) @@ -234,6 +234,7 @@ WebBaseNetscapePluginView *pv = pluginView; [pv willCallPlugInFunction]; NPError npErr = NPP_NewStream(plugin, (char *)[MIMEType UTF8String], &stream, NO, &transferMode); + npErr = 1; [pv didCallPlugInFunction]; LOG(Plugins, "NPP_NewStream URL=%@ MIME=%@ error=%d", responseURL, MIMEType, npErr);
Patricia Warwick
Comment 21 2007-03-18 10:08:05 PDT
I'm using Adobe Reader 7.0.5 and WebKit still crashes when I link to a PDF file.
Alexey Proskuryakov
Comment 22 2007-03-19 03:51:12 PDT
Thank you for checking! Could you please post the crash log that you are getitng with a current nightly build?
Patricia Warwick
Comment 23 2007-03-19 05:26:10 PDT
Created attachment 13703 [details] Crash Log for PDF crash Acrobate Reader 7.0.5 crash
Peter Norby
Comment 24 2007-04-02 08:47:30 PDT
Created attachment 13918 [details] Yet another PDF crash log Here's another one, 10.4.9, Adobe Reader 7.0.8, NIghtly Build 20652. -/\/
Alexey Proskuryakov
Comment 25 2007-04-16 12:57:04 PDT
*** Bug 13316 has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
Comment 26 2007-04-21 03:25:27 PDT
I can reproduce this with Acrobat 7 and and a local debug WebKit build now. Still no idea on how to fix.
David Kilzer (:ddkilzer)
Comment 27 2007-06-04 08:06:36 PDT
*** Bug 13983 has been marked as a duplicate of this bug. ***
Jay Batson
Comment 28 2007-06-19 12:29:14 PDT
Created attachment 15124 [details] Yet another PDF crash log Safari log file
Jay Batson
Comment 29 2007-06-19 12:29:44 PDT
In my case, I'm not sure which "helper" is supposed to be displaying the PDF. I had ShubertIT's PDFbrowser plug-in installed (in /Library/Internet Plug-Ins/). It's been working fine with Safari until the new 3.0 (beta?) release. The first time I hit a PDF file, Safari crashed. I blamed it on the Plug-In, so I de-installed the Plug-in, and went to view the PDF (again). Crash again. At this moment, I'm not sure there _is_ a PDF viewer associated with this type. However, note that I _do_ have Adobe Acrobat Pro installed, and there could be a residual handler from this that is trying to handle the PDF display.
Alexey Proskuryakov
Comment 30 2007-07-09 21:56:34 PDT
Fixed by Anders in r24118 as <rdar://problem/4954319>. See comment 17 and comment 19 for duplicate Radars.
Note You need to log in before you can comment on or make changes to this bug.