Hi all, I have created a custom Menulet which i have made it as a launchAgent . The problem i am facing is when i try to install it. I want my Menulet to be launched for all the Users who have logged in on the machine. I works fine for all the Users, but if i install my Menulet as root .. my application crashes with the below crash log.
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1002) creating CGSWindow' Thread 0 Crashed: 0 com.apple.CoreFoundation 0x90865ff4 ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ + 4 1 libobjc.A.dylib 0x941eee3b objc_exception_throw + 40 2 com.apple.CoreFoundation 0x90865f2b +[NSException raise:format:arguments:] + 155 3 com.apple.CoreFoundation 0x90865f6a +[NSException raise:format:] + 58 4 com.apple.AppKit 0x96953d17 _NXCreateWindow + 310 5 com.apple.AppKit 0x96a7eae3 _NSCreateWindow + 58 6 com.apple.AppKit 0x969b27e3 -[NSWindow _commonAwake] + 1953 7 com.apple.AppKit 0x968ce291 -[NSWindow _commonInitFrame:styleMask:backing:defer:] + 1370 8 com.apple.AppKit 0x968cd74b -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1596 9 com.apple.AppKit 0x968cd106 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 71 10 com.apple.AppKit 0x96ad3f14 -[NSStatusBarWindow initWithContentRect:] + 102 11 com.apple.AppKit 0x96ad3ddd -[NSStatusBar(NSStatusBar_Appearance) _createStatusItemWindow] + 128 12 com.apple.AppKit 0x96ad3d0d -[NSStatusItem _initInStatusBar:withLength:withPriority:hidden:] + 389 13 com.apple.AppKit 0x96ad3b82 -[NSStatusItem _initInStatusBar:withLength:withPriority:] + 63 14 com.apple.AppKit 0x96ad3b28 +[NSStatusItem _itemInStatusBar:withLength:withPriority:] + 105 15 com.apple.AppKit 0x96ad3ab9 -[NSStatusBar(NSStatusBar_Private) _statusItemWithLength:withPriority:] + 58 16 com.apple.AppKit 0x96e5cc5a -[NSStatusBar statusItemWithLength:] + 49 17 com.yourcompany.Menulet 0x0000930f -[MenuletController awakeFromNib] + 59 18 com.apple.CoreFoundation 0x90874955 -[NSSet makeObjectsPerformSelector:] + 181 19 com.apple.AppKit 0x968c9aca -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1533 20 com.apple.AppKit 0x968bfcf6 loadNib + 264 21 com.apple.AppKit 0x968bf658 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 946 22 com.apple.AppKit 0x968bf29b +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 171 23 com.apple.AppKit 0x968bf1d9 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 391 24 com.apple.AppKit 0x968bee88 NSApplicationMain + 434 25 com.yourcompany.Menulet 0x00002582 _start + 216 26 com.yourcompany.Menulet 0x000024a9 start + 41 I did try googling on this crash but in vain. In Some links i found that i have to use [NSApplication sharedApplication] in main(). Also wet through the documentation of NSApplication but din't understand much. Please help Thanks ~Arjun _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com