Closed
Bug 23667
Opened 25 years ago
Closed 24 years ago
NPP_StreamAsFile is never called
Categories
(Core Graveyard :: Plug-ins, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
M17
People
(Reporter: rginda, Assigned: serhunt)
References
()
Details
(Keywords: shockwave, Whiteboard: [nsbeta2+])
Attachments
(3 files)
2.44 KB,
patch
|
Details | Diff | Splinter Review | |
8.76 KB,
patch
|
Details | Diff | Splinter Review | |
10.45 KB,
patch
|
Details | Diff | Splinter Review |
The test page mentioned in the above url works fine in 4x, but seems to start improperly in Mozilla. Console output: InstantiateEmbededPlugin for application/x-kaon-nimble debug: edburns ns4xPlugin::CreatePlugin instance start called created stream for http://newton.kaon.com/trip/trip.nim InstantiateFullPagePlugin.. returning Document http://newton.kaon.com/trip/test.html loaded successfully Document: Done (12.296 secs) killing stream for http://newton.kaon.com/trip/trip.nim
Comment 1•25 years ago
|
||
I see this. The plugin window shows a message " Reading program..." and then does nothing.
Comment 2•25 years ago
|
||
I wrote the plugin in question (it works in Netscape 3 & 4, and Opera), and using my debugger, I have confirmed that the following sequece of event occurs: NPP_New is called NPP_SetWindow is called NPP_NewStream is called -- I return NP_AsFile in *stype, and return NPERR_NO_ERROR as my return value NPP_WriteReady is called -- I return STREAMBUFSIZE (which is 0x0FFFFFFF like the samples) NPP_Write is called with my data NPP_DestroyStream is called NPP_StreamAsFile is never called! That's why the plugin doesn't start up.
Comment 3•25 years ago
|
||
Oh, forgot to mention: I return "len" in NPP_Write, and NPP_DestroyStream has a reason of 0.
Comment 4•25 years ago
|
||
This is related to 27763.
Comment 9•24 years ago
|
||
Marking shockwave as bug 15546 and bug16519 are marked DUPs of this bug and indicates that this problem also affects shockwave. Nominating nsbeta2 as having shockwave work is part of beta2 criteria. Changing summary to "NPP_StreamAsFile is never called" to make the issue clearer. VYV03354, just to confirm, are we 100% certain that each of those bugs is really the exact same issue as this bug (i.e. "NPP_StreamAsFile is never called")? (I'm totally ignorant about the technical internals here and can't tell either way myself.) The previous Summary was quite generic ("Plugin does not work correctly,") and we wouldn't want to DUP all other examples of plug-ins not working correctly for different reasons. If these bugs are indeed all caused by NPP_StreamAsFile not being called, thanks for great detective work on finding the DUPs! If not, would you please REOPEN the other reports? Thanks!
Comment 10•24 years ago
|
||
We couldn't call NPP_StreamAsFile since disk cache did not exist. So, in my understanding, "marked later until disk cache arrives" bug is a same problem. But I'm reopening bug 16519 and adding dependency since it also covers another problem (NPP_DestroyStream).
Comment 11•24 years ago
|
||
By the way, http://newton.kaon.com/trip/test.html seems to be no longer available. Where is the new URL?
No longer blocks: 16519
Comment 12•24 years ago
|
||
NPP_StreamAsFile is called now because of linux legacy plug-in support. (thanks, rusty!) I copyed tmpfile stuff from pre-necko code since current code is for linux only. And I removed workaround for bug 16519 to avoid NPP_DestroyStream called twice. This seems to be working.
Comment 13•24 years ago
|
||
Comment 14•24 years ago
|
||
There's a similar patch for the tmp file stuff over at http://bugzilla.mozilla.org/show_bug.cgi?id=37237. But it should be noted that these are just temporary workarounds. Using the tmp dir should not be a substitute for a working cache.
Comment 15•24 years ago
|
||
A new URL where you can test is: http://www.kaon.com/gallery.html
Comment 17•24 years ago
|
||
Comment 18•24 years ago
|
||
Added patch that fixes nsPluginHostImpt.cpp - uses the browser cache. Removed all the code that were work arounds for not having a cache. Tested on Win32 using an xpcom plugin and using the nn4 flash plugin.
Keywords: patch
Comment 19•24 years ago
|
||
*** Bug 27763 has been marked as a duplicate of this bug. ***
Comment 20•24 years ago
|
||
adding myself to cc
Comment 21•24 years ago
|
||
Assignee | ||
Comment 22•24 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 23•24 years ago
|
||
The test url is outdated. Pls provide a new url to verify this bug. Thnx.
Reporter | ||
Comment 24•24 years ago
|
||
Updated URL from Joshua's comment. The plugin in question seems to get further than it used to, but doesn't actually work for me yet. Perhaps this is due to some other problem.
Comment 25•24 years ago
|
||
Yes, this still does not work. The plugin window opens but I see an error saying " Error processing File: XML error at Line1 : not well-formed." Reopening this bug. Build used:2000070508 on windows.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 26•24 years ago
|
||
That error message is most likely caused by my code not groking that a compressed file (".nmz") is compressed, which would most likely be caused by the new Mozilla caching code not preserving file name extensions. Is that the case? Alternately, it might be that the caching code is changing the file contents somehow. If the file you are hitting is a ".nmz", you can gunzip it to see the original XML. If the file is a ".nim" the XML is right there. Let me know if you need me to download the latest mozilla build and run my stuff under the debugger to give you more details...
Reporter | ||
Comment 27•24 years ago
|
||
Latest Mozilla binaries are at ftp://ftp.mozilla.org/pub/mozilla/nightly/latest/ If you'd like to run Mozilla under a debugger, you can build it yourself using the source tarball (in the same place as the binaries) or by pulling from CVS, see http://www.mozilla.org/build/ for more info, or email me.
Comment 28•24 years ago
|
||
Correct - filenames and extensions are not preserved in the cache.
Assignee | ||
Comment 29•24 years ago
|
||
Sean, should this be reassigned to cache people?
Comment 30•24 years ago
|
||
This turned out to be 2 problems. The first, NPP_StreamAsFile is never called, has been fixed. The second is cache related and should be opened as a separate bug if at all. I gave Joshua a workaround that he can use in his 4x plugin but that doesn't address the fact that the cached file does not maintain its file extension in mozilla as it did in nn4.
Assignee | ||
Comment 31•24 years ago
|
||
I filed a new bug 'Cache does not preserve file names' -- 44721. Marking this one fixed.
Assignee | ||
Comment 32•24 years ago
|
||
Now really marking.
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Comment 33•24 years ago
|
||
verified that plugin part is working (2000070608).
Status: RESOLVED → VERIFIED
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•