Opened 12 years ago

Closed 12 years ago

#3851 closed Bug (fixed)

NSCFNumber autoreleased with no pool in place

Reported by: x190 Owned by: livings124
Priority: Low Milestone: 2.20
Component: Mac Client Version: 2.13
Severity: Minor Keywords: autorelease, leaking, no pool, HIToolbox
Cc:

Description

2.13 +(11565) has been throwing the following errors since installation.

This appears with use of r11565: SL 10.6.5:

12/21/10 9:40:28 PM Transmission[233] * NSAutoreleaseNoPool(): Object 0x10031b060 of class NSCFNumber autoreleased with no pool in place - just leaking 12/24/10 12:51:41 AM Transmission[373] * NSAutoreleaseNoPool(): Object 0x10031b200 of class NSCFNumber autoreleased with no pool in place - just leaking 12/24/10 2:35:46 PM Transmission[172] * NSAutoreleaseNoPool(): Object 0x101800860 of class NSCFNumber autoreleased with no pool in place - just leaking 12/24/10 8:14:19 PM Transmission[151] * NSAutoreleaseNoPool(): Object 0x10031b5f0 of class NSCFNumber autoreleased with no pool in place - just leaking

Also an issue with "HIToolbox" as documented in the forum:

https://forum.transmissionbt.com/viewtopic.php?f=4&t=11054

Change History (21)

comment:1 Changed 12 years ago by x190

I found the trigger for the "HIToolbox" issue. and yes it does seem to have a tie in with removal of a file/folder of a multi-file/folder torrent.

Steps to trigger:

#1 Remove a file/folder from a partially completed multi-file/folder torrent. #2 Right-click on that file/folder in the Inspector and select "Reveal in Finder".

Immediately you will get the "HIToolbox" error, likely because "Reveal in Finder" should be grayed out at that point.

Ties in with Trac Ticket #3852.

Last edited 12 years ago by x190 (previous) (diff)

comment:2 Changed 12 years ago by x190

HIToolbox error still present in 11600. Same trigger.

comment:3 follow-up: Changed 12 years ago by livings124

This ticket covers two completely separate issues. Please open a separate ticket for the HIToolbox issue. Also, there is no "Reveal in Finder" menu item - it's "Show in Finder". Where are you seeing this menu item?

Last edited 12 years ago by livings124 (previous) (diff)

comment:4 follow-up: Changed 12 years ago by livings124

What are you doing when those autoreleased messages appear?

comment:5 in reply to: ↑ 3 Changed 12 years ago by x190

Replying to livings124:

This ticket covers two completely separate issues. Please open a separate ticket for the HIToolbox issue. Also, there is no "Reveal in Finder" menu item - it's "Show in Finder". Where are you seeing this menu item?

You're right, my mistake. Simply bringing up the CM for a file in the Inspector-> Files (11600) gives the Console error and seems to have nothing to do with the data. Will open separate ticket. See #3857.

Last edited 12 years ago by x190 (previous) (diff)

comment:6 in reply to: ↑ 4 Changed 12 years ago by x190

Replying to livings124:

What are you doing when those autoreleased messages appear?

I can't link them to a specific action, however I'm not getting them with r11600.

Last edited 12 years ago by x190 (previous) (diff)

comment:7 Changed 12 years ago by x190

Large torrents were loaded at the time. 68GB +21GB +.7GB

comment:8 Changed 12 years ago by x190

Deleted this blurb as it represents a little late night paranoia and also charles has fixed the unnecessary console log entry issues.

Last edited 12 years ago by x190 (previous) (diff)

comment:9 Changed 12 years ago by x190

http://www.cocos2d-iphone.org/forum/topic/12177

Last post. See main.m vs. your main.m.

comment:10 Changed 12 years ago by x190

Did it again. r11600

12/29/10 1:08:13 AM Transmission[397] * NSAutoreleaseNoPool(): Object 0x101900b50 of class NSCFNumber autoreleased with no pool in place - just leaking

Only non-routine item in the Message Log was the completion and moving of a torrent.

Also, something burned thru 250 MB of memory over the evening.

comment:11 Changed 12 years ago by x190

Hi livings124,

That's the culprit. Error is thrown at torrent completion and move to default location from incomplete location. Should be a snap to fix, right? :)

Here's a little relevant inspiration.

http://forums.macnn.com/79/developer-center/162605/autoreleased-no-pool-place-just-leaking/

"'now' is set to be autoreleased when you create it using [NSCalendarDate calendarDate]. It then gets retained when you add it to myTextField, making its retainCount >=2. You then manually release it, dropping its retainCount to >=1. But, it's still set to be autoreleased from when it was created, and you don't have an autorelease pool present.

If you did, it would be dealloced when the pool was released, and myTextField would contain a stale pointer.

Fix by creating an NSAutoreleasePool at the beginning of doThis and releasing it at the end. For extra safety, use an NSException catcher so that if anything throws, your NSAutoreleasePool is still released before the thread is terminated."

SL 10.6.5 r11605

Last edited 12 years ago by x190 (previous) (diff)

comment:12 Changed 12 years ago by livings124

x190: try r11607

comment:13 Changed 12 years ago by livings124

  • Priority changed from Normal to Low
  • Severity changed from Normal to Minor

comment:14 Changed 12 years ago by x190

Is this change persistent in r11609? Unfortunately, r11609 still throws the error. Are you testing with a large multi-folder/file torrent? Also, do you have an incomplete location set?

12/30/10 12:17:54 PM Transmission[169] * NSAutoreleaseNoPool(): Object 0x10031b060 of class NSCFNumber autoreleased with no pool in place - just leaking

comment:15 follow-up: Changed 12 years ago by livings124

In r11609, when are you seeing this happening?

comment:16 in reply to: ↑ 15 Changed 12 years ago by x190

Replying to livings124:

In r11609, when are you seeing this happening?

From comment #11: Error is thrown at torrent completion and move to default location from incomplete location.

Any old quickie from mininova (legal) should do for testing. I have a different default and incomplete location set and I'm using .part extensions.

comment:17 follow-up: Changed 12 years ago by livings124

Is it when it's being moved AFTER completion?

comment:18 in reply to: ↑ 17 Changed 12 years ago by x190

Replying to livings124:

Is it when it's being moved AFTER completion?

Well it all happens, I think, within the same minute, however, on my next completion I'll try to correlate to the exact second. Those legal torrents complete within minutes. Aren't you seeing this error?

comment:19 Changed 12 years ago by livings124

Give r11613 a try.

comment:20 Changed 12 years ago by x190

r11614

2 completions, no errors.

comment:21 Changed 12 years ago by livings124

  • Milestone changed from None Set to 2.20
  • Resolution set to fixed
  • Status changed from new to closed
  • Version changed from 2.13+ to 2.13
Note: See TracTickets for help on using tickets.