Closed Bug 308814 Opened 19 years ago Closed 12 years ago

weird "Error calling method on NPObject" error

Categories

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

x86
All
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: bugzilla, Unassigned)

References

()

Details

Attachments

(1 file)

if you go to (flash installed needed) http://tdconline.dk/ and press the Menu button just right of the logo I see this in the console: Error: Error calling method on NPObject! Source File: http://i.tdconline.dk/tree/ngto_mail.js Line: 865 what does this mean and why do I get this error when the flash menu shows?
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050915 Firefox/1.6a1
Component: General → Plug-ins
Product: Firefox → Core
QA Contact: general → plugins
Version: unspecified → Trunk
This is very probably a duplicate of bug 309044 (which has a test case or two)
damn. this bug is still present with the fix for bug 309044 in :(
Michelle is this only a issue in the Flash 8 plugin or is it a mozilla issue? to reproduce: http://tdconline.dk/ and press the Menu button just right of the logo
From the plug-in side, here is what is going on: - NPP_GetValue for NPPVpluginScriptableNPObject is called on plug-in. - plug-in calls NPN_CreateObject - NP_Allocate is called on plug-in - plug-in calls NPN_RetainObject - NP_Deallocate is called on plug-in - NPP_GetValue for NPPVpluginScriptableNPObject is called on plug-in. - plug-in calls NPN_CreateObject - NP_Allocate is called on plug-in - plug-in calls NPN_RetainObject - NPP_GetValue for NPPVpluginScriptableNPObject is called on plug-in. In this case, we already have an object, so we don't need to create one. - plug-in calls NPN_RetainObject (as advised by Brendan) then at browser shutdown: - NP_Deallocate is called on plug-in I don't know if this is a browser or plug-in problem but my guess would be it is a browser issue.
Johnny: any chance you could take a look on this and check if this is a browser bug or a plugin bug. it seems like a browser bug.
Flags: blocking1.9a1?
Additional info: This problem is reproduced in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 with flash plug-in 8,0,22,0 under WinXP. Message "Error calling methods on NPObject!" appears on JavaScript console when I try to initialize flash variable using SetVariable() method (note, that PercentLoaded() already returned 100 and IsPlaying() returned true). Using try {} catch {} cannot handle this error. The error is reproduced periodically. Attempts to perform SetVariable() after time interval about 10 milliseconds after PercentLoaded() reached 100 frequently cause errors. When time interval is about 200 milliseconds and more, the error not appears.
Unzip or use <a href="https://addons.mozilla.org/firefox/212/">Mozilla Archive Format</a>. PS: http://www.webdeveloper.com/forum/showthread.php?t=95598 reports Flash 6 doesn't cause the error.
This is an NPRuntime issue, which is a feature first used in Flash Player 8. Thus, Flash Player 6 wouldn't exhibit this issue. At that time, XPConnect was used for JavaScript interaction.
All weird Flash behaviour disappeared once i tested via a web server. (junction to project folder in Apache htdocs) It'd be nice to have a clear notification from Flash.
The original test case in comment #1 no longer reproduces this bug for me, potentially because they changed the site, not sure. I've tried Firefox 1.5.0.6 on WinXP with both Flash Player 8 and Flash Player 9r16. Is there still a valid way to repro this issue? Should the attachment in comment #8 be run locally?
My testcase shows the bug when run locally.
CT, I am trying reproduce the "Error calling mathod on NPObject" JavaScript console error you are seeing, but so far I don't see it. Here's what I'm doing: 1. Store the testcase locally on your machine 2. Launch Win Firefox 1.5.0.6 on Win XP 3. Open the JavaScript console 4. From the local location, open index.htm 5. Click Pass the variable 6. Click Probe Flash Object I see nothing in the JavaScript console window with either Flash Player 8 or 9.
Flash player 8,0,22,0 in Opera 9.01 returns "undefined". Flash player 8,0,24,0 in IE6 returns "hello". Flash player 8,0,22,0 in Firefox 1.5.0.6 gets "Error calling method on NPObject!" I'll try updating Flash player. At work i think i have beta 9 though.
I ran the Flash Player 9,0,16,0 installer from Firefox 1.5.0.6 and it didn't list Opera 9.01, although i did have to close it as well before installing. No difference in results.
Attachment #233081 - Attachment mime type: application/octet-stream → application/zip
So can someone on Windows reproduce the problem? Martijn? Or gavin? I clearly can't on Linux (where the latest Flash is 7.x), and my attempts to actually install Flash on Windows were met with complete failure (both via the plug-in wizard and directly off the Macromedia site) -- Firefox just doesn't see the plug-in.
(In reply to comment #16) > So can someone on Windows reproduce the problem? Martijn? Or gavin? Yes, I can reproduce the issue, using a recent trunk debug build and "Shockwave Flash 8.0 r24" (according to about:plugins). The stack to the code that throws the exception is http://pastebin.mozilla.org/130 . You can ping me on IRC if you want more details.
Bz helped me debug a bit. I reproduced the bug locally by downloading the attached testcase and running it in a trunk debug build. The exception is thrown at: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/modules/plugin/base/src/nsJSNPRuntime.cpp&rev=1.20#1262 because ok is 0 after: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/modules/plugin/base/src/nsJSNPRuntime.cpp&rev=1.20&mark=1244#1237 The method being invoked on the plugin is "SetVariable" (*(JSString*)(method &~7)). Strangely enough, I was not able to reproduce the bug after uploading the file to a server and accessing it via http. The call to SetVariable succeeds in that case (perhaps a timing issue?).
I do get this error too; moreover try-catch somehow doesn't work (in order to "mute" the error message) Flash 9.0 r16 + FF 1.5.0.6
Flags: blocking1.9a1? → blocking1.9-
Keywords: qawanted
Whiteboard: [wanted-1.9]
Reproduced with Mozilla/5.0 (Firefox 2.0; Kubuntu) Gecko ID:0000000000${Flags} using testcase. Shockwave Flash 9.0 d78. OS should be All. Error calling method on NPObject! index.htm (line 22) passFlashindex.htm (line 22) onclickindex.htm (line 1)
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
I'm still getting this with Flash 10.0 r15, Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8pre) Gecko/2009021904 GranParadiso/3.0.8pre ID:2009021904 It happens within URL http://amch.questionmarket.com/adscgen/d_layer.php?sub=amch&type=d_layer&survey_num=551882&site=23&code=559562&p=1&protocol=http&noiframe=1 , but unfortunately that URL seems to only work in as an iframe for a page that I can no longer find. Since I'm getting this on Linux I'm changing the platform to "All".
OS: Windows XP → All
I confirm the error on linux using the testcase from comment 8. Error console throws the NPObject error. Screenshot: http://www.grabup.com/uploads/518be64a58393d53c3449158f115d830.png Tested on: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2
I'm having similar problem with our own plugin. While there seems to be no problems with property access (read or write) method calls are failing with the "NPMethod called on non-NPObject wrapped JSObject!" exception. Trapping in gdb shows that the object class is in fact something named "XPCCrossOriginWrapper" rather than &sNPObjectJSWrapperClass but I'm at loss with what to do with that information.
Oh, just realized I'm calling the plugin from chrome. Doing the same from web page is working fine. My problem is probably different.
I confirm the error on Windows XP using the testcase from comment 8. Error console throws the NPObject error. "Pass the variable" Errore: Error calling method on NPObject! File sorgente: file:///D:/Comodo/Downloads/1155224924795_0/index.htm Riga: 22 "Probe Flash object" Errore: Error enumerating properties on scriptable plugin object File sorgente: file:///D:/Comodo/Downloads/1155224924795_0/index.htm Riga: 33 Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 Shockwave Flash / File: NPSWF32.dll / Versione: 11.1.102.62 / Shockwave Flash 11.1 r102
I confirm comment 25 on Nightly 21.0a1 (2013-01-27) Win 7 x64.
Keywords: qawanted
Priority: -- → P3
This error also occurs in chromium - it's entirely possible its a flash NPAPI issue.
Yeah, let's not track this further; it can certainly happen if the Actionscript method in Flash throws an error.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
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: