#184 ✓fixed
Virgil Dupras

Crash on invalid recent files in prefs

Reported by Virgil Dupras | November 29th, 2011 @ 04:16 PM

I received a report of a crash on dupeGuru loading where the traceback shows that it crashed on HSRecentFiles initialization:

Application Specific Information:
objc[553]: garbage collection is OFF
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary length]: unrecognized selector sent to instance 0x100224bb0'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff8bfbe286 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x00007fff915c8d5e objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff8c04a4ce -[NSObject doesNotRecognizeSelector:] + 190
    3   CoreFoundation                      0x00007fff8bfab133 ___forwarding___ + 371
    4   CoreFoundation                      0x00007fff8bfaaf48 _CF_forwarding_prep_0 + 232
    5   Foundation                          0x00007fff8d71e1c8 -[NSFileManager fileExistsAtPath:] + 40
    6   dupeGuru                            0x000000010000b277 -[HSRecentFiles initWithName:menu:] + 347
    7   dupeGuru                            0x0000000100004657 -[DirectoryPanel initWithParentApp:] + 300
    8   dupeGuru                            0x0000000100003017 -[AppDelegateBase createDirectoryPanel] + 52
    9   dupeGuru                            0x0000000100002f7a -[AppDelegateBase awakeFromNib] + 263
    10  CoreFoundation                      0x00007fff8bfb52e1 -[NSObject performSelector:] + 49
    11  CoreFoundation                      0x00007fff8bfb5262 -[NSSet makeObjectsPerformSelector:] + 274
    12  AppKit                              0x00007fff8a5f4f9b -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1245
    13  AppKit                              0x00007fff8a5eb52f loadNib + 322
    14  AppKit                              0x00007fff8a5eaa28 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 217
    15  AppKit                              0x00007fff8a5ea943 +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 141
    16  AppKit                              0x00007fff8a5ea886 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 364
    17  AppKit                              0x00007fff8a85e637 NSApplicationMain + 398
    18  dupeGuru                            0x0000000100000dfc start + 52
)

I could reproduce the crash by manually opening the preferences plist and adding non-string data to the "recentResults" item.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket

Tags

Pages