Closed Bug 542248 Opened 14 years ago Closed 14 years ago

[OOPP] silverlight: ###!!! ASSERTION: Shouldn't return null and NPERR_NO_ERROR!: 'npobject' (or crash [@ mozilla::plugins::PluginInstanceParent::GetActorForNPObject(NPObject*)])

Categories

(Core Graveyard :: Plug-ins, defect)

x86
Windows 7
defect
Not set
normal

Tracking

(status1.9.2 .4-fixed)

VERIFIED FIXED
Tracking Status
status1.9.2 --- .4-fixed

People

(Reporter: benjamin, Assigned: benjamin)

References

Details

(Whiteboard: [fixed-lorentz])

Attachments

(1 file)

Silverlight OOPP:
###!!! ASSERTION: Shouldn't return null and NPERR_NO_ERROR!: 'npobject'
in PluginInstanceParent::InternalGetValueForNPObject

This is requesting NPNVPluginElementNPObject. I don't think this is a good assertion (an immediate crash follows). As far as I know, if a plugin doesn't want to provide a prototype NPObject, it can still respond to NPNVPluginElementNPObject with NPERR_NO_ERROR and a null object.
Hrm, my thinking is wrong... this is our plugin host returning NPNVPluginElementNPObject, and it should always have a value.

STR:
visit http://timheuer.com/silverlight/bouncingplane/
http://silverlight.net/learn/videos/all/how-do-i-improve-graphics-performance-using-cachemode/
OS: Linux → Windows 7
Summary: [OOPP] silverlight: ###!!! ASSERTION: Shouldn't return null and NPERR_NO_ERROR!: 'npobject' → [OOPP] silverlight: ###!!! ASSERTION: Shouldn't return null and NPERR_NO_ERROR!: 'npobject' (or crash [@ mozilla::plugins::PluginInstanceParent::GetActorForNPObject])
Ben, I have a few signatures in the crash reporter on this.
I have the same crash signature for the Adobe PDF Plugin, when I try to save pdfs or (less frequently) when I open them:

http://crash-stats.mozilla.com/report/index/9cdcc0f1-b470-4e29-9c5f-b4bae2100130
http://crash-stats.mozilla.com/report/index/243f0d73-8dad-44f1-bd78-721f32100130

I don't know if this is the same problem, but at least it is the same signature.
If we navigate away from the page, there is a period of time where the plugin is still trying to do stuff before we tear down the frame tree and call NPP_Destroy. In this period of time, NPN_GetValue(NPNVPluginElementNPOBject) will return null/NPERR_NO_ERROR because it can't get a JSContext* for the page. This patch just makes it so that we return an error just as NPNVWindowNPObject does.
Assignee: nobody → benjamin
Status: NEW → ASSIGNED
Attachment #424776 - Flags: review?(joshmoz)
Attachment #424776 - Flags: review?(joshmoz) → review+
Comment on attachment 424776 [details] [diff] [review]
Null-check, rev. 1

Great, I assume you're planning to put this on the 1.9.2 branch. We should probably do it as a normal stability update, no need to wait for Lorentz.
Summary: [OOPP] silverlight: ###!!! ASSERTION: Shouldn't return null and NPERR_NO_ERROR!: 'npobject' (or crash [@ mozilla::plugins::PluginInstanceParent::GetActorForNPObject]) → [OOPP] silverlight: ###!!! ASSERTION: Shouldn't return null and NPERR_NO_ERROR!: 'npobject' (or crash [@ mozilla::plugins::PluginInstanceParent::GetActorForNPObject(NPObject*)])
http://hg.mozilla.org/mozilla-central/rev/101321ab7040
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment on attachment 424776 [details] [diff] [review]
Null-check, rev. 1

I don't think it really matters whether this hits branches (at least until Lorentz hits), but I also don't think it could hurt.
Attachment #424776 - Flags: approval1.9.2.1?
Verifying fixed using today's nightly on Win7 x-64

Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a1pre) Gecko/20100203 Minefield/3.7a1pre ID:20100203081257
Status: RESOLVED → VERIFIED
Comment on attachment 424776 [details] [diff] [review]
Null-check, rev. 1

Didn't make 1.9.2.2, we'll look at next time.
Attachment #424776 - Flags: approval1.9.2.2? → approval1.9.2.3?
Blanket approval for Lorentz merge to mozilla-1.9.2
a=beltzner for 1.9.2.4 - please make sure to mark status1.9.2:.4-fixed
Attachment #424776 - Flags: approval1.9.2.4? → approval1.9.2.4+
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: