Memory leak in OS X Notification Centre?

I don't know what happened, but my Mac seems to be really slow – actually it won't respond at all.

So I opened Activity Monitor app to see the RAM usage


User uploaded file

Whoa. I was stunned.


After a bunch of Googling on my phone (yup, because my Mac crashed), I do execute this command

launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plis

User uploaded file

and yup, everything seems to be really better. So I tried running the Notification Centre system again, and bam, excessive RAM usage again!


So, I have no choice except to disable the Notification Centre system, and that means I won't get any notifications.

Can anyone help me dealing with this? Thanks!

MacBook Pro, OS X Mountain Lion (10.8), MacBookPro5,5

Posted on Jun 17, 2015 6:40 AM

Reply
4 replies

Jun 17, 2015 7:09 AM in response to @srakrn

When you see that Notification Center is leaking memory, note the exact time: hour, minute, second.

These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.

Launch the Console application in any of the following ways:

☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)

☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

☞ Open LaunchPad and start typing the name.

The title of the Console window should be All Messages. If it isn't, select

SYSTEM LOG QUERIES All Messages

from the log list on the left. If you don't see that list, select

View Show Log List

from the menu bar at the top of the screen.

Each message in the log begins with the date and time when it was entered. Scroll back to the time you noted above.

Select the messages entered from then until the end of the episode, or until they start to repeat, whichever comes first.

Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.

The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.

Please don't indiscriminately dump thousands of lines from the log into this discussion.

Please don't post screenshots of log messages—post the text.

Some private information, such as your name, may appear in the log. Anonymize before posting.

When you post the log extract, you might see an error message on the web page: "You have included content in your post that is not permitted," or "The message contains invalid characters." That's a bug in the forum software. Please post the text on Pastebin, then post a link here to the page you created.

Jul 4, 2015 8:08 AM in response to Linc Davis

Thank you sir. The problem had gone without reasons for a while. Today it happened again, here are the logs I think it's weird.

Line typed with italic text, and have # indicated at the front is NOT generated by Console, but I decided to give some info about the logs.


This is not the entire log. I decided to filter only the log with "Notification" included in text.

7/4/15 9:56:31.119 PM com.apple.xpc.launchd[1]: (com.apple.notificationcenterui.agent[1266]) Service exited due to signal: Killed: 9

# I killed the Notification Centre.


7/4/15 9:56:53.720 PM NotificationCenter[1308]: Layout still needs update after calling -[NCScrollView layout]. NCScrollView or one of its superclasses may have overridden -layout without calling super. Or, something may have dirtied layout in the middle of updating it. Both are programming errors in Cocoa Autolayout. The former is pretty likely to arise if some pre-Cocoa Autolayout class had a method called layout, but it should be fixed.


7/4/15 9:57:03.723 PM NotificationCenter[1308]: Layout still needs update after calling -[NSView layout]. NSView or one of its superclasses may have overridden -layout without calling super. Or, something may have dirtied layout in the middle of updating it. Both are programming errors in Cocoa Autolayout. The former is pretty likely to arise if some pre-Cocoa Autolayout class had a method called layout, but it should be fixed.


7/4/15 9:57:11.540 PM NotificationCenter[1308]: !!! _NSLayoutTreeSetLocationForGlyphRange invalid glyph range {3, 42}

# After this log appeared, excessive RAM usage on Activity Monitor's graph observed.


7/4/15 9:57:37.741 PM NotificationCenter[1308]: Communications error: <OS_xpc_error: <error: 0x7fff7e748b60> { count = 1, contents =

"XPCErrorDescription" => <string: 0x7fff7e748fa8> { length = 22, contents = "Connection interrupted" }

}>


7/4/15 9:58:06.000 PM kernel[0]: process NotificationCent[1308] caught causing excessive wakeups. Observed wakeups rate (per sec): 473; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 45018

# Oh, 473 wakeups per second... I was totally stunned.

The line at 9:57:11.540, which refers to Glyphs, made me think about the "Death Unicode" bugs on iPhone, which happened on the Notification Centre too.


Thanks in advance!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Memory leak in OS X Notification Centre?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.