Closed Bug 74938 Opened 24 years ago Closed 23 years ago

acrobat fails on plugin registration on Linux

Categories

(Core Graveyard :: Plug-ins, defect, P3)

x86
Linux
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.5

People

(Reporter: shrir, Assigned: srgchrpv)

References

()

Details

(Whiteboard: [PDT+] [correctness])

Attachments

(2 files)

Linux only (mac got fixed recently) Steps: 1 Put the nppdf.so file for acrobat plugin inside mozilla plugins folder 2 Go to the url above 3 Observe that the File Save dialog pops up.. (if you do not have acrobat as a helper app configured) 4 typing 'about:plugins' does not list the plugin... expected: acrobat should appear embedded inside the browser window just like on other platforms..
Since this never has worked, I think this is due to the gtk switch over and Adobe needs to update their plugin. Andrei, thouhts? If so, then Adobe needs to be evanglized.
Keywords: acrobat
Priority: -- → P3
Target Milestone: --- → Future
That's a possibility. But we need to make sure that we at least try to load the plug-in.
see the same prolem on Solaris. The plugin loading fails during the initializtion process. Immediately after the plugin(nppdf.so) is loaded, nppdf.so's NP_Initialize is called (see the code below). Note that the call to PR_FindSymbol returns a function pointer (not null) but the subsequent call to the returned function fails. The function call, pfnInitialize(&(ns4xPlugin::CALLBACKS),&callbacks), returns a NPError of 4, NPERR_MODULE_LOAD_FAILED_REEOR. /////////////// ns4xPlugin::CreatePllugin NP_PLUGINUNIXINIT pfnInitialize = (NP_PLUGINUNIXINIT)PR_FindSymbol(aLibrary, "NP_Initialize"); if (pfnInitialize == NULL) return NS_ERROR_UNEXPECTED; // XXX Right error? if (pfnInitialize(&(ns4xPlugin::CALLBACKS),&callbacks) != NS_OK){ -->> return NS_ERROR_UNEXPECTED; } //////////////////////////////////////////////////////////
So the library gets loaded and evev an entry point is retreived. Does not look like missing linked libraries. Serge, do you have any ideas what could happen here?
Changing summary and re-assign to Serge.
Assignee: peterlubczynski → serge
Summary: acrobat does not workas a plugin but works as a helper app → acrobat fails on plugin registration on Linux
av, shrir did unix mozilla ever handles pdf files using acrobat plugin? as I recall it does handle it using helper apps, am I right?
yes, it always worked as a helper app, never embedded as a plugin inside the browser.
Might this be similar to bug 56464 (RealPlayer plugin only works if Mozilla is compiled using gcc 2.95.2)?
using a build of gcc 2.95 doesn't solve the problem in this case.
Figures. No sooner do I say that I can't get acrobat to work in 4.x (in bug 84427), it starts working (albeit on a different box). It still doesn't work in mozilla and I think it may be due to nppdf.so requiring symbols not found in the mozilla tree. Here's the list of undefined symbols referenced by nppdf.so (nm --dynamic nppdf.so) but not found in libc, libdl, libX11 or libXt: CreateQueue DeQueue DestroyQueue EnQueue NPN_GetURLNotify CreateQueue DeQueue DestroyQueue EnQueue NPN_GetURLNotify List generated using: nm --dynamic /usr/lib/netscape/plugins/nppdf.so | grep -v ^0 | sed 's|^ ||' | grep ^U | sed 's|^U ||' > ack # That's 9 spaces in the first sed cat >findlibs<<EOF #!/bin/sh checklist="/lib/libc.so.6 /lib/libdl.so.2 /usr/X11R6/lib/libX11.so /usr/X11R6/lib/libXt.so.6" for l in $checklist; do rm -f found-$l done rm -f found-not for s in `cat $1`; do found=0 for l in $checklist; do nm $l | grep -c $s >/dev/null 2>&1 if [ $? = 0 ]; then echo $s >> found-`basename $l` found=1 break; fi done if [ $found = 0 ]; then echo $s >> found-not fi done EOF # Then sh -x findlibs ack
I have got the same problem, using the Acrobat 4.05 plugin. It works fine in Netscape 4.77 (by simply dropping nppdf.so in the netscape plugins directory), but not in mozilla build 2001061308.
Attached patch initial patch proposal (deleted) — Splinter Review
small notice: to run acrobat reader on linux you have to setenv PATH <wherever acrobat install dir>/bin:$PATH, or equivalent for your shell, then try 'acroread' it should start stand alone reader.
Wow! Acrobat is now working in the browser window! Thanks for the great effort, serge. Although, there are still some problems with the patch like it doesn't behave correctly on resizing the browser window, I think it worth checking into the trunk. The changes in GetPluginInfo code are likely to help with the long standing problem we have with starting Mozilla when audio device is active, because it will not try to initialize plugins on start up. r=av
Changing milestone as we have progress here.
Target Milestone: Future → mozilla0.9.5
The original design was to have ns4xPlugin wrap _all_ interfaces to 4.x plugins. I don't know if that is relevant anymore, maybe av or beard can comment. If it _is_ relevant, than promoting the logic to nsPluginsDirUnix.cpp is not right; we ought to continue to hide 4.x plugin logic from the brave new world. I'd suggest either altering ns4xPlugin::Create() to simply return a wrapped, but un-initialized plugin, or adding a static method to ns4xPlugin that can be used to extract the MIME type given a pLibrary or something. The changes in ns4xPlugin look fine to me.
This is good point. Although we decided to deprecate the new api (the Mozilla Plugin API as it has been known) and encourage people to stick with old api with some new additions to it for scriptability and access to the browser services (now we are promoting name NPAPI), I think we are still going to keep the Mozilla API in place as some vendors already invested in it and released commercial products based on it. So, the suggestion looks reasonble. I think something like ns4xPlugin::GetPluginInfo will be good to have.
Chris, thank you for comments. I completely agree it's better to keep all legacy (4.x) interfaces in one place, but those stuff is platform specific, and ns4xPlugin.cpp has a lot of #ifdef it's getting difficult to read, maybe it's time to break it by platforms. Sure, I'm going to implement something like static ns4xPlugin::GetPluginInfo for unix.
Nominating for the branch. This patch is going to fix a long standing and very annoying issue known as "hang on start up when audio device is active".
Keywords: nsbranch
Well... This sort of parameter overloading may seem confusing, I would prefer a clear flag, but not insisting. r=av.
I agree, but I have strong feeling we have to split ns4xPlugin.cpp by platforms or toolkits, and I do not want to add any platform specific methods into that now.
nsbranch+ per pdt triage please try to fix it within next couple of weeks
Keywords: nsbranchnsbranch+
Attachment 49297 [details] [diff] looks fine; sr=waterson. Let's get a bug on file to break ns4xPlugin up by platform as serge suggests. I agree that would be a good idea.
can I get PDT+ for check into the branch?
I was able to view pdf documents in 0.9.3 using the nppdf.so plugin from acrobat, but after switching to 0.9.4, it doesn't work anymore.
Do you mean you were able to run acrobat on unix as helper apps, not in browser window, am I right?
Adding correctness Status Whiteboard, correct/expected behavior does not occur.
Whiteboard: [correctness]
Whiteboard: [correctness] → [PDT] [correctness]
checked into the trunk modules/plugin/base/src/ns4xPlugin.cpp,v <-- ns4xPlugin.cpp new revision: 1.71; previous revision: 1.70 modules/plugin/base/src/nsPluginsDirUnix.cpp,v <-- nsPluginsDirUnix.cpp new revision: 1.14; previous revision: 1.13
resolve as FIXED
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
I don't think this was checked into the 0.9.4 branch. Looks like it still needs a PDT+ approval. Reopening...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
that's right, I did not check it into the 094 branch yet
hm..on today's trunk on linux 0924, my acroreader is not getting launched as a plugin. I get an error in the console. 500 Cannot exec acroread or acroexch errorno=2 Acrobat Plugin-Could not launch acrobat
see Comments From serge@netscape.com 2001-09-06 18:44
warning messages like: "Warning: Actions not found: addBookmark, viewBookmark, copy, undefined-key, find, findAgain, history, loadImages, openURL, mailNew, new, openFile, print, exit, reload, saveAs, paste, delete, cut, undo, historyItem, back, forward, abort, PageUp, PageDown Warning: Actions not found: ManagerGadgetNextTabGroup, ManagerGadgetPrevTabGroup, DrawingAreaInput, addBookmark, viewBookmark, copy, undefined-key, find, findAgain, history, loadImages, openURL, mailNew, new, openFile, print, exit, reload, saveAs, paste, delete, cut, undo, historyItem, back, forward, abort, PageUp, PageDown Warning: No action proc named "ManagerGadgetArm" is registered for widget "form" Warning: No action proc named "ManagerGadgetArm" is registered for widget "form" Warning: No action proc named "ManagerGadgetArm" is registered for widget "form" ... are coming from acrobat because it's trying to install 4.x translations which is irrelevant for 6.x browser.
Shrirang, have you been able to test this in the trunk changing the PATH variable? Need to confirm before getting PDT+ for this.
finally..yes. Awesome, Serge ! I have tested this fix on the linux 0924 trunk and it looks very good. I see the warning messages that serge mentioned above. Pls grant pdt+
Pls update the Patch Status for both patches. Check it into the branch - PDT+
Whiteboard: [PDT] [correctness] → [PDT+] [correctness]
cannot update attachments status, got error "You are not authorized to edit attachments" :(
checked into the MOZILLA_0_9_4_BRANCH new revision: 1.10.2.1; previous revision: 1.10 new revision: 1.67.2.2; previous revision: 1.67.2.1
Status: REOPENED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
Attachment #49297 - Flags: superreview+
Attachment #49297 - Flags: review+
looks good on today's linux branch (0927). VERIFIED.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: