Closed Bug 246245 Opened 20 years ago Closed 20 years ago

Leaks in some Mac specific code

Categories

(SeaMonkey :: General, defect)

PowerPC
macOS
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jhpedemonte, Assigned: jhpedemonte)

References

Details

(Keywords: memory-leak, Whiteboard: [150860/nsImageMac is "fixed1.7" !] fixed-aviary1.0)

Attachments

(2 files, 2 obsolete files)

While debugging another problem with 'leaks', found some unrelated leaking
memory in nsLocalFile::InitWithNativePath in the file nsLocalFileOSX.cpp.
Attached patch patch (obsolete) — Splinter Review
We are leaking "CFStringRef pathAsCFString" during the successful case.
Also found this leak:

Leak: 0x0e4ce790  size=16	instance of 'NSCFType'	
  0xa019740c 0x00012880 0x081239c0 0x00025555 
  Call stack: [thread 927d6a0b]: | 0x0 | _dyld_start | _start | main | 
  main1(int, char**, nsISupports*) | nsAppShellService::Run() | 
  nsAppShell::Run() | nsMacMessagePump::DoMessagePump() | 
  nsMacMessagePump::GetEvent(EventRecord&) | 0x927fdb80 | 0x927ece68 | 
  0x927d93dc | 0x927d9100 | 0x927f8b90 | 0x927e892c | 0x927e4a34 | 0x927d25a4 | 
  0x927d23ec | 0x927e2fe4 | 0x9280b4a0 | 0x927d6a0c | 0x927d25a4 | 0x927d2330 | 
  0x928787a4 | 0x92828e4c | 0x92818d90 | 0x9280ccbc | 0x928038cc | 0x92801764 | 
  0x927d6a0c | 0x927d25a4 | 0x927d2330 | 0x9282347c | 0x9284612c | 0x928269d0 | 
  0x927fe52c | 0x927e56b0 | 0x927fe52c | 0x927e558c | 0x927e32c4 | 0x927d6a0c | 
  0x927d25a4 | 0x927d2330 | 0x92874da8 | 0x92874e4c | 0x928c2500 | 0x901fed54 | 
  0x901d71d4 | 0x90191f5c | malloc_zone_malloc 

But not sure what exactly is leaking.
That second leak looks like it's in the OS.
Yeah, I've noticed several other leaks that seem to occur deep in the system. 
Makes the leak logs somewhat hard to read!
Attached patch clipboard leak patch (obsolete) — Splinter Review
Assignee: general → pedemont
Status: NEW → ASSIGNED
More context.
Attachment #150469 - Attachment is obsolete: true
And this one is my fault!

Do we need a super reviewer for Mac specific patches?
*** Bug 246614 has been marked as a duplicate of this bug. ***
Comment on attachment 150860 [details] [diff] [review]
nsImageMac leak patch (checked in)

Regression.  Can cause memory to leak quite rapidly in some situations (bug
246614).
Attachment #150860 - Flags: superreview?(tor)
Attachment #150860 - Flags: approval1.7?
Attachment #150860 - Flags: superreview?(tor) → superreview+
Comment on attachment 150860 [details] [diff] [review]
nsImageMac leak patch (checked in)

a=dbaron (discussed with asa and leaf too).  One more respin won't hurt.
Attachment #150860 - Flags: approval1.7? → approval1.7+
Comment on attachment 150860 [details] [diff] [review]
nsImageMac leak patch (checked in)

Checked in to 1.7 branch and trunk.
Attachment #150860 - Attachment description: nsImageMac leak patch → nsImageMac leak patch (checked in)
Whiteboard: [150860/nsImageMac is "fixed1.7" !]
Whiteboard: [150860/nsImageMac is "fixed1.7" !] → [150860/nsImageMac is "fixed1.7" !], needed-aviary1.0
Whiteboard: [150860/nsImageMac is "fixed1.7" !], needed-aviary1.0 → [150860/nsImageMac is "fixed1.7" !]
Whiteboard: [150860/nsImageMac is "fixed1.7" !] → [150860/nsImageMac is "fixed1.7" !] fixed-aviary1.0
I just found out that 1.7 final has been released. I hope at least for the Mac a
point release will still be release since the memory usage of this release is
still very high, although it has vastly improved from 1.7RC3.

I have launched 1.7 (final) and within five minutes the memory usage was already
at 82MB+. This is not good for a release which is supposed to be the next stable
release of Mozilla replacing the 1.4 release.

Thanks for the work reducing the 1.7 memory footprint! I believe more work on
memory leaks in 1.7 is still required for this to be an acceptable release on
the Mac. (I would help, but I am just learning how to program and would do
moreharm than good.)
I am wondering what the status of fixing this bug is. The last time I tested Moz
1.7 final the browser crashed almost every 5 minutes.

I would like to test 1.7+ (1.8a) but am unable to until this bug is fixed. I
cannot use a browser which is so crach prone as a result of this bug. I am stuck
using a betat version of 1.7 before the nsImageMac library code was modified.  

If this bug cannot be fixed is it possible to revert the code back before the
change which introduced the memory leak and crashes. I would rather accept
slightly incorrectly displayed GIFs as opposed to large memory leaks and crashes. :)
Product: Browser → Seamonkey
Comment on attachment 150471 [details] [diff] [review]
clipboard leak patch (checked in)

Just switch flavorList to be a nsAutoArrayPtr<ScrapFlavorInfo>.
Attachment #150454 - Flags: superreview+
Comment on attachment 150471 [details] [diff] [review]
clipboard leak patch (checked in)

Got sr=peterv from IRC.  Checked in.
Attachment #150471 - Attachment description: clipboard leak patch → clipboard leak patch (checked in)
Comment on attachment 150454 [details] [diff] [review]
patch

Ha! Seems pinkerton checked in a fix for this a couple of days ago!  Oh well.
Attachment #150454 - Attachment is obsolete: true
Ran 'leaks' recently and didn't notice anything Mac specific left.  ->FIXED
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Severity: normal → critical
Keywords: mlk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: