If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Prism crashes Firefox Trunk when downloading a file [NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED] [@ nsJAR::Open(nsIFile*) ]

RESOLVED FIXED

Status

Mozilla Labs
Prism
--
critical
RESOLVED FIXED
9 years ago
6 years ago

People

(Reporter: IU, Assigned: mfinkle)

Tracking

({crash})

unspecified
x86
Windows NT
crash
Bug Flags:
blocking1.0 ?

Details

(crash signature)

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b1pre) Gecko/20081001 Firefox/2.0.0.11
Build Identifier: 0.2.1

If Prism is used with the 20081001 Firefox Trunk, the browser is crashed whenever saving a file.  The following exception is generated just before the crash:

Error: 'JavaScript component does not have a method named: "onDownloadStateChange"' when calling method: [nsIDownloadProgressListener::onDownloadStateChange] = NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED

Breakpad IDS:
http://crash-stats.mozilla.com/report/index/720efa61-8fd6-11dd-86e0-001cc45a2c28
http://crash-stats.mozilla.com/report/index/0f21df78-8fd6-11dd-a188-001cc45a2c28

Browser Build ID: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b1pre) Gecko/20081001

Reproducible: Always

Steps to Reproduce:
1. Install the lastest Firefox 3.1 Trunk (tested on Win XP SP3)
2. Start Firefox and go to Tools --> Options... --> Main
3. Select "Always ask me where to save files."  Click OK
4. Open Error Console and make sure logging of "Errors" is enabled
5. Install Prism for Firefox 0.2.1
6. Visit http://fileforum.betanews.com/detail/Sysinternals_Suite/1194884530/1
7. Click the "Download Now" link and save the file someplace other than Desktop
8. Note the exception in Error Console
9. Firefox Crashes
Well, this might be a Prism bug, because it somehow allows to pass a null argument to pass to the zip-reader open method, but that function still should not crash when a null argument is passed, so I filed bug 458158 for that.

Comment 2

9 years ago
http://crash-stats.mozilla.com/report/index/176b39e8-9017-11dd-80cf-001a4bd43ef6

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2pre) Gecko/20081008 Minefield/3.1b2pre ID:20081008032217

Comment 3

9 years ago
Could have sworn we knew about this. I remember discussing the nsJAR:Open() issue with someone a while back. Anyway, I agree: the problem is both Prism (shouldn't pass in NULL) and Firefox (should check the parameter, not just crash).
Some reports with better stacks (i.e., non-Windows)
http://crash-stats.mozilla.com/report/index/5f3955a9-f02b-4f27-9061-4ea820081118
http://crash-stats.mozilla.com/report/index/14f9f753-6108-4352-8d4d-64f420081118
(Reporter)

Updated

9 years ago
Depends on: 458158
Flags: blocking1.0?
Keywords: crash
(Reporter)

Updated

9 years ago
Summary: Crashes 20081001 Firefox Trunk, mercilessly, when downloading a file [NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED] [@ nsJAR::Open(nsIFile*) ] → Prism crashes Firefox Trunk when downloading a file [NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED] [@ nsJAR::Open(nsIFile*) ]
I hit this with 100% reproducibility on a trunk Windows build with refractor installed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Created attachment 353948 [details] [diff] [review]
patch

This patch adds some checks to refractor-overlay.js to keep a null file from being passed to WebAppInstall.install(file)

The patch also adds onDownloadStateChange, which keeps the error from appearing in the console. This part seemed unrelated to the crash.
Assignee: nobody → mark.finkle
Attachment #353948 - Flags: review?(matthew.gertner)

Comment 7

9 years ago
Confirm the crashes even if you try to save a Images as ..... with 3.1 Beta 2

Comment 8

9 years ago
Comment on attachment 353948 [details] [diff] [review]
patch

I can't for the life of me remember who I discussed this with, but you might want to check with someone on the Firefox side as well since I don't think it should crash even if you pass in a NULL pointer.
Attachment #353948 - Flags: review?(matthew.gertner) → review+
(In reply to comment #8)
> (From update of attachment 353948 [details] [diff] [review])
> I can't for the life of me remember who I discussed this with, but you might
> want to check with someone on the Firefox side as well since I don't think it
> should crash even if you pass in a NULL pointer.

bug 458158
Modified: mozilla-code\mozilla-prism\mozilla\prism\extension\chrome\content\refractor-overlay.js  
Sending content: mozilla-code\mozilla-prism\mozilla\prism\extension\chrome\content\refractor-overlay.js  
Completed: At revision: 21373
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
(Reporter)

Comment 11

9 years ago
So does this mean the next Prism build will not longer crash Firefox, in spite of the bug 458158 being moribund?
(In reply to comment #11)
> So does this mean the next Prism build will not longer crash Firefox, in spite
> of the bug 458158 being moribund?

Correct
Crash Signature: [@ nsJAR::Open(nsIFile*) ]
You need to log in before you can comment on or make changes to this bug.