Closed Bug 261988 Opened 20 years ago Closed 19 years ago

Memory leak in NPN_GetURL/NPP_Write/NPP_DestroyStream calls

Categories

(Core Graveyard :: Plug-ins, defect)

x86
Windows XP
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED EXPIRED

People

(Reporter: brad, Unassigned)

References

()

Details

(Keywords: memory-leak)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.5 (KHTML, like Gecko) Safari/125.9
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv: 1.7.3)

Calls to NPN_GetURL (and subsequent calls to NPP_Write and NPP_DestroyStream) result in a memory 
leak approximately the size of the data returned from the requested URL.  We have modified our plugin 
software (WxScopePlugin, located at http://sdg.ocs.ou.edu) to only use those calls and not store the 
data returned from the calls in any local storage itself, yet the leak persists, pointing to a leak in the 
Mozilla/Firefox code itself.  This only occurs on the Windows build.  Firefox/MacOS X does not leak (nor 
does Safari, or Netscape 4.x for Windows, yes we still keep that around for testing).

To reproduce this, download our plugin softwware, then go to <http://sdg.ocs.ou.edu/people/brad/
leak/obs_refresh.wxml>.  The map shows a single observation product that requests data every 10 
seconds (the lower threshold for our plugin).  Memory usage should rise accordingly.

We also modified our plugin locally specifically for testing by placing a single call to NPN_GetURL (which 
calls the static exported geturl function) for a URL, then repeated that NPP_GetURL call in 
NPP_DestroyStream, thus resulting in endless requests for the site, while also eliminating any of our 
own allocation methods.  If you would like a copy of this plugin, please link 


Reproducible: Always
Steps to Reproduce:
1.  Download and install WxScopePlugin (available http://sdg.ocs.ou.edu).  Manually copy 
NPWXM32.DLL from "Program Files/WxScopePlugin" to Firefox's plugins folder (version 10.1 does not 
install for Firefox)
2.  Open http://sdg.ocs.ou.edu/people/brad/leak/obs_refresh.wxml.
3.  Observe memory usage growing.
Actual Results:  
Memory usage grew at approximately the size of the data returned from the URL requested in the map 
document linked above (http://sdg.ocs.ou.edu/people/brad/Data/testmdf.mdf) every time the plugin 
requested the file (every 10 seconds).

Expected Results:  
Memory usage should have remained constant over time.
Moving to correct Product/component.
Assignee: firefox → nobody
Severity: normal → critical
Component: General → Plug-ins
Keywords: mlk
Product: Firefox → Browser
QA Contact: firefox.general → core.plugins
Version: unspecified → Trunk
Jst, can yopu take a look at this and see if we leak in
NPN_GetURL/NPP_Write/NPP_DestroyStream
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.