Closed Bug 364474 Opened 18 years ago Closed 18 years ago

Exception... "Could not convert Native argument" when referencing embed element that has Zylom plugin loaded

Categories

(Core :: XPConnect, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: martijn.martijn, Assigned: jst)

References

()

Details

(Keywords: regression, testcase, verified1.8.1.2)

Attachments

(4 files, 2 obsolete files)

I'm sorry already, but for the testcase, you need the Zylom plugin installed, because it seems to be triggered with that plugin.
You can install the plugin here: http://www.uk.zylom.com/game/710/delicious-winter-edition.html
when you click on the "play" button. You need to do a manual install.

I get this js error with the testcase (as I said you need to have the Zylom plugin installed, which is windows only, I'm afraid):
[Exception... "Could not convert Native argument"  nsresult: "0x8057000a (NS_ERROR_XPC_BAD_CONVERT_NATIVE)"  location: "JS frame :: file:///C:/Documents%20and%20Settings/mw/Bureaublad/zylom_plugin_exception.htm :: doe :: line 10"  data: no]

This regressed on trunk between 2006-07-18 and 2006-07-19:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2006-07-18+04&maxdate=2006-07-19+05&cvsroot=%2Fcvsroot

On 1.8.1 branch this regressed between 2006-08-01 and 2006-08-02:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=MOZILLA_1_8_BRANCH&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2006-08-01+05&maxdate=2006-08-02+05&cvsroot=%2Fcvsroot

The patch that was checked in between those time-zones is the patch from bug 344873, so my guess is that's a regression from that bug.
Attached file testcase (obsolete) —
Flags: blocking1.9?
Flags: blocking1.8.1.2?
Taking bug.
Assignee: nobody → jst
Loading that testcase with the zylom plugin installed (and flash 9) I don't see the exception in question, but I do however see these errors in the error console:

Error: ZylomNotification_ExtensionObject is not defined
Source File: javascript:ZylomNotification_ExtensionObject('ZGP_STATE','STATE_INITIALIZING');
Line: 1

Error: ZylomNotification_ExtensionObject is not defined
Source File: javascript:ZylomNotification_ExtensionObject('ZGP_ERROR','STATE_INVALID_PARTNER_NAME');
Line: 1

Error: str is not defined
Source File: https://bugzilla.mozilla.org/attachment.cgi?id=249257
Line: 14

I'd need more information to get any further in tracking this issue down.
Attached file testcase (obsolete) —
You were getting the js str error, because I didn't declare it at the right spot.
I fixed that with this testcase.
But apparently, you're not getting the exception.
Attachment #249257 - Attachment is obsolete: true
Attached image screenshot
This is what I get to see on the screen.
I just tried it again, I wiped out my previous installation of the plugin, and then reinstalled with this file, downloaded from: http://media.zylom.com/games/plugin/1/gamesplayer.exe
It installs stuff at my computer at:
C:\Documents and Settings\All Users\Application Data\Zylom\ZylomGamesPlayer
After I've done that, I can reproduce this bug in current trunk build and current Firefox2 build.
Not blocking the release, but we will take a patch if one shows up.
Flags: blocking1.8.1.2? → blocking1.8.1.2-
This reverts the behavior in this case to what it was before bug 344873 was fixed.

The problem in this case is that the zylom plugin installs itself into a place where we don't look for XPT files. It installs a registry key that points to where the XPT file (and the plugin DLL) is located, but we don't ever read the key that tells where the XPT file is. To make an XPT file discoverable by Firefox it needs to be installed into the plugins directory.
Attachment #251147 - Flags: superreview?(bugmail)
Attachment #251147 - Flags: review?
Attachment #251147 - Flags: review? → review?(joshmoz)
Wow, thanks for fixing this, Johnny!
Comment on attachment 251147 [details] [diff] [review]
Revert plugin scripting code to not throw exceptions if XPT file not found.

"Return NS_OK in such a case to avoid having this generate exceptions in JS."

That makes it sound like this is just quieting an exception. It would be nice if the comment reflected the fact that it allows web pages to access the DOM node for the plugin even if the plugin isn't scriptable.
Attachment #251147 - Flags: review?(joshmoz) → review+
Attachment #251147 - Flags: superreview?(jonas) → superreview+
Attachment #251983 - Flags: approval1.8.1.2?
Comment on attachment 251983 [details] [diff] [review]
Same change with updated comment.

approved for 1.8 branch, a=dveditz for drivers
Attachment #251983 - Flags: approval1.8.1.2? → approval1.8.1.2+
Fix landed on the branch (and on the trunk yesterday).
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1.2
Resolution: --- → FIXED
Attached file testcase
Oops, my previous testcase had the exception hard-coded in the page. This is the correct testcase.
Attachment #250438 - Attachment is obsolete: true
Verified fixed on trunk. I can see the bug with a 2007-01-18 trunk build, but not anymore with a 2007-01-19 trunk build.
Also verified fixed on the 1.8.1 branch build, I don't see the exception there anymore.
Status: RESOLVED → VERIFIED
Flags: blocking1.9?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: