[Desire Q&A, Help & Troubleshooting] avion23:
Hi,

i'm constantly getting this error in my logcat. I've no idea what i can do to fix it. I'm using v.0.35 of Elk759's http://xdaforums.com/showthread.php?t=1827934 CM10 Rom for htc desire. This error occurs since version 0.33.

Can you tell me to which app this notification service belongs? pid 456 belongs to "system_server", pid 539 belongs to "com.android.systemui" so i just can't delete the corresponding data.

D/SizeAdaptiveLayout( 539): com.android.internal.widget.SizeAdaptiveLayout@4235b218child view android.widget.FrameLayout@4235cb38 measured out of bounds at 95px clamped to 96px
E/NotificationService( 456): An error occurred profiling the notification.
E/NotificationService( 456): java.lang.NullPointerException
E/NotificationService( 456): at com.android.server.NotificationManagerService.enqueueNotificationInternal(NotificationManagerService.java:1147)
E/NotificationService( 456): at com.android.server.NotificationManagerService.enqueueNotificationWithTag(NotificationManagerService.java:983)
E/NotificationService( 456): at android.app.INotificationManager$Stub.onTransact(INotificationManager.java:129)
E/NotificationService( 456): at android.os.Binder.execTransact(Binder.java:367)
E/NotificationService( 456): at dalvik.system.NativeStart.run(Native Method)
D/SizeAdaptiveLayout( 539): com.android.internal.widget.SizeAdaptiveLayout@4235b218child view android.widget.FrameLayout@4235cb38 measured out of bounds at 95px clamped to 96px
E/NotificationService( 456): An error occurred profiling the notification.
E/NotificationService( 456): java.lang.NullPointerException
E/NotificationService( 456): at com.android.server.NotificationManagerService.enqueueNotificationInternal(NotificationManagerService.java:1147)
E/NotificationService( 456): at com.android.server.NotificationManagerService.enqueueNotificationWithTag(NotificationManagerService.java:983)
E/NotificationService( 456): at android.app.INotificationManager$Stub.onTransact(INotificationManager.java:129)
E/NotificationService( 456): at android.os.Binder.execTransact(Binder.java:367)
E/NotificationService( 456): at dalvik.system.NativeStart.run(Native Method)
D/SizeAdaptiveLayout( 539): com.android.internal.widget.SizeAdaptiveLayout@420051f8child view android.widget.FrameLayout@41e50fb0 measured out of bounds at 95px clamped to 96px

I found the matching code in http://code.metager.de/source/xref/CyanogenMod/AndroidFrameworksBase/services/java/com/android/server/NotificationManagerService.java. It says:

synchronized (mNotificationList) {
final boolean inQuietHours = inQuietHours();

NotificationRecord r = new NotificationRecord(pkg, tag, id,
callingUid, callingPid,
priority,
notification);
NotificationRecord old = null;

int index = indexOfNotificationLocked(pkg, tag, id);
if (index < 0) {
mNotificationList.add(r);
} else {
old = mNotificationList.remove(index);
mNotificationList.add(index, r);
// Make sure we don't lose the foreground service state.
if (old != null) {
notification.flags |=
old.notification.flags&Notification.FLAG_FOREGROUND_SERVICE;
}
}

// Ensure if this is a foreground service that the proper additional
// flags are set.
if ((notification.flags&Notification.FLAG_FOREGROUND_SERVICE) != 0) {
notification.flags |= Notification.FLAG_ONGOING_EVENT
| Notification.FLAG_NO_CLEAR;
}

if (notification.icon != 0) {
StatusBarNotification n = new StatusBarNotification(pkg, id, tag,
r.uid, r.initialPid, notification);
n.priority = r.priority;

if (old != null && old.statusBarKey != null) {
r.statusBarKey = old.statusBarKey;
long identity = Binder.clearCallingIdentity();
try {
mStatusBar.updateNotification(r.statusBarKey, n);
}
finally {
Binder.restoreCallingIdentity(identity);
}
} else {
long identity = Binder.clearCallingIdentity();
try {
r.statusBarKey = mStatusBar.addNotification(n);
if ((n.notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0) {
mAttentionLight.pulse();
}
}
finally {
Binder.restoreCallingIdentity(identity);
}
}
sendAccessibilityEvent(notification, pkg);
} else {
Slog.e(TAG, "Ignoring notification with icon==0: " + notification);
if (old != null && old.statusBarKey != null) {
long identity = Binder.clearCallingIdentity();
try {
mStatusBar.removeNotification(old.statusBarKey);
}
finally {
Binder.restoreCallingIdentity(identity);
}
}
}

try {
final ProfileManager profileManager =
(ProfileManager) mContext.getSystemService(Context.PROFILE_SERVICE);

ProfileGroup group = profileManager.getActiveProfileGroup(pkg);
notification = group.processNotification(notification);
} catch(Throwable th) {
Log.e(TAG, "An error occurred profiling the notification.", th);
}

// If we're not supposed to beep, vibrate, etc. then don't.
if (((mDisabledNotifications & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) == 0)
&& (!(old != null
&& (notification.flags & Notification.FLAG_ONLY_ALERT_ONCE) != 0 ))
&& mSystemReady) {

final AudioManager audioManager = (AudioManager) mContext
.getSystemService(Context.AUDIO_SERVICE);
// sound
final boolean useDefaultSound =
(notification.defaults & Notification.DEFAULT_SOUND) != 0;
if (!(inQuietHours && mQuietHoursMute)
&& (useDefaultSound || notification.sound != null)) {
Uri uri;
if (useDefaultSound) {
uri = Settings.System.DEFAULT_NOTIFICATION_URI;
} else {
uri = notification.sound;
}
boolean looping = (notification.flags & Notification.FLAG_INSISTENT) != 0;
int audioStreamType;
if (notification.audioStreamType >= 0) {
audioStreamType = notification.audioStreamType;
} else {
audioStreamType = DEFAULT_STREAM_TYPE;
}
mSoundNotification = r;
// do not play notifications if stream volume is 0
// (typically because ringer mode is silent).
if (audioManager.getStreamVolume(audioStreamType) != 0) {
long identity = Binder.clearCallingIdentity();
try {
mSound.play(mContext, uri, looping, audioStreamType);
}
finally {
Binder.restoreCallingIdentity(identity);
}
}
}

// vibrate
final boolean useDefaultVibrate =
(notification.defaults & Notification.DEFAULT_VIBRATE) != 0;
if (!(inQuietHours && mQuietHoursStill)
&& (useDefaultVibrate || notification.vibrate != null)
&& audioManager.shouldVibrate(AudioManager.VIBRATE_TYPE_NOTIFICATION)) {
mVibrateNotification = r;

mVibrator.vibrate(useDefaultVibrate ? DEFAULT_VIBRATE_PATTERN
: notification.vibrate,
((notification.flags & Notification.FLAG_INSISTENT) != 0) ? 0: -1);
}
}