Closed Bug 109281 Opened 23 years ago Closed 22 years ago

Mozilla 0.9.5 does not appear to release component ref counts correctly

Categories

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

PowerPC
Mac System 9.x
defect

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 148889
mozilla1.2alpha

People

(Reporter: miles.henderson, Assigned: peterlubczynski-bugs)

Details

Attachments

(1 file)

Mozilla 0.9.5 does not appear to be releasing component ref counts correctly. I 
have a scriptable plugin which is based on the 4x-scriptable plugin example 
code. This code works fine on windows. However, on the Mac Mozilla crashes if 
you close the main browser window and then exit mozilla via the menu. By 
putting trace statements into my plugin code, I can see that my scriptable 
component still has a refcount of two when Mozilla quits. On windows the 
refcount is zero and everything works ok. I am using the same scriptable 
component source code on both Mac and windows. This problem should be 
reproducable by building the 4x-scriptable component example for Mac OS 9 and 
embedding it in a page which contains Java script as per the example 
instructions. If you then close the browser window containing the plugin and 
quit via the menu, Mozilla will crash. Note that the crash is not immediately 
visible when using a debug build unless you run it using the debugger.

This bug also exists in Netscape 6.2 and I have also reported it via Netscapes 
Report Form.
Reporter: 0.9.5 is quite old at this point. Please try a more recent build:
http://ftp.mozilla.org/pub/mozilla/nightly/latest/MacMozillaInstaller.sea.bin
--->peterl
Assignee: av → peterlubczynski
Status: UNCONFIRMED → NEW
Ever confirmed: true
I have tried this on the latest nightly build and the crash is still present. 
However, Mac OS 9 does not always inform you of the crash. In order to see it 
happen consistently you either need to enable the crash reporter, or run 
mozilla in a debugger.
Reporter: can you attach a stack trace? What's the object that has the incorrect
ref count?
Attached image Stack Trace
The object that has the incorrect ref count is the scriptable instance of my 
plugin. The code for this is identical to that of the 4x-scriptable plugin 
example. On windows, I can see that ReleaseRef is called for this object 
correctly after the plugin has been destroyed. However, this does not happen on 
the mac. I believe that this is where the problem lies. It seems that something 
in mozilla is calling AddRef on my scriptable component but not ReleaseRef. 
Note that this only happens if you close the browser window containing the 
plugin and then quit mozilla. If you quit mozilla with the browser window open, 
everything is ok.
any change ? still happening with newer builds ?
Very strange, same stack as in bug 144838.
setting milestone
Priority: -- → P3
Target Milestone: --- → mozilla1.2alpha
moving discussion to bug 148889.

*** This bug has been marked as a duplicate of 148889 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
mass duplicate verifications . For filtering purposes, pls use keywd
"massdupverification"

Status: RESOLVED → VERIFIED
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: