gui-dos / Guigna

Prototype of a universal GUI supporting Homebrew, MacPorts, Fink, pkgsrc.
0 stars 0 forks source link

Cannot parse a NULL or zero-length data #2

Open muescha opened 8 years ago

muescha commented 8 years ago

i guess its from GuignaAppDelegate.swift:404:self.reloadAllPackages()

Error message:

2016-10-10 21:06:01.296 Guigna[40239:6275196] Bartender: Loaded BartenderHelperNinetySix
2016-10-10 21:06:56.094 Guigna[40239:6275218] An uncaught exception was raised
2016-10-10 21:06:56.094 Guigna[40239:6275218] Error Domain=NSCocoaErrorDomain Code=3840 "Cannot parse a NULL or zero-length data" UserInfo={NSDebugDescription=Cannot parse a NULL or zero-length data}
2016-10-10 21:06:56.095 Guigna[40239:6275218] (
    0   CoreFoundation                      0x00007fff8f9054f2 __exceptionPreprocess + 178
    1   libobjc.A.dylib                     0x00007fff9bce473c objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff8f96c4bd +[NSException raise:format:] + 205
    3   Foundation                          0x00007fff9361df9c -[NSString(NSExtendedStringPropertyListParsing) propertyList] + 235
    4   libswiftFoundation.dylib            0x00000001007e3b4d _TFE10FoundationSS12propertyListfT_P_ + 45
    5   Guigna                              0x0000000100114953 _TFC6Guigna6ITunes9installedfT_GSaCS_8GPackage_ + 2819
    6   Guigna                              0x0000000100113d9c _TFC6Guigna6ITunes4listfT_GSaCS_8GPackage_ + 396
    7   Guigna                              0x00000001000408e4 _TFC6Guigna17GuignaAppDelegate17reloadAllPackagesfT_T_ + 1124
    8   Guigna                              0x000000010003a1c3 _TFFC6Guigna17GuignaAppDelegate29applicationDidFinishLaunchingFV10Foundation12NotificationT_U_FT_T_ + 35
    9   Guigna                              0x000000010003a287 _TTRXFo___XFdCb___ + 39
    10  libdispatch.dylib                   0x0000000100a9d070 _dispatch_call_block_and_release + 12
    11  libdispatch.dylib                   0x0000000100a8fcc5 _dispatch_client_callout + 8
    12  libdispatch.dylib                   0x0000000100aa5f8a _dispatch_async_redirect_invoke + 2837
    13  libdispatch.dylib                   0x0000000100a8fcc5 _dispatch_client_callout + 8
    14  libdispatch.dylib                   0x0000000100a94457 _dispatch_root_queue_drain + 2934
    15  libdispatch.dylib                   0x0000000100a938a5 _dispatch_worker_thread3 + 106
    16  libsystem_pthread.dylib             0x0000000100af2336 _pthread_wqthread + 1129
    17  libsystem_pthread.dylib             0x0000000100aeff91 start_wqthread + 13
)
2016-10-10 21:06:56.095 Guigna[40239:6275218] *** Terminating app due to uncaught exception 'NSParseErrorException', reason: 'Error Domain=NSCocoaErrorDomain Code=3840 "Cannot parse a NULL or zero-length data" UserInfo={NSDebugDescription=Cannot parse a NULL or zero-length data}'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff8f9054f2 __exceptionPreprocess + 178
    1   libobjc.A.dylib                     0x00007fff9bce473c objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff8f96c4bd +[NSException raise:format:] + 205
    3   Foundation                          0x00007fff9361df9c -[NSString(NSExtendedStringPropertyListParsing) propertyList] + 235
    4   libswiftFoundation.dylib            0x00000001007e3b4d _TFE10FoundationSS12propertyListfT_P_ + 45
    5   Guigna                              0x0000000100114953 _TFC6Guigna6ITunes9installedfT_GSaCS_8GPackage_ + 2819
    6   Guigna                              0x0000000100113d9c _TFC6Guigna6ITunes4listfT_GSaCS_8GPackage_ + 396
    7   Guigna                              0x00000001000408e4 _TFC6Guigna17GuignaAppDelegate17reloadAllPackagesfT_T_ + 1124
    8   Guigna                              0x000000010003a1c3 _TFFC6Guigna17GuignaAppDelegate29applicationDidFinishLaunchingFV10Foundation12NotificationT_U_FT_T_ + 35
    9   Guigna                              0x000000010003a287 _TTRXFo___XFdCb___ + 39
    10  libdispatch.dylib                   0x0000000100a9d070 _dispatch_call_block_and_release + 12
    11  libdispatch.dylib                   0x0000000100a8fcc5 _dispatch_client_callout + 8
    12  libdispatch.dylib                   0x0000000100aa5f8a _dispatch_async_redirect_invoke + 2837
    13  libdispatch.dylib                   0x0000000100a8fcc5 _dispatch_client_callout + 8
    14  libdispatch.dylib                   0x0000000100a94457 _dispatch_root_queue_drain + 2934
    15  libdispatch.dylib                   0x0000000100a938a5 _dispatch_worker_thread3 + 106
    16  libsystem_pthread.dylib             0x0000000100af2336 _pthread_wqthread + 1129
    17  libsystem_pthread.dylib             0x0000000100aeff91 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(Recorded Frame) 

Settings: Homebew [x] Main Taps [x] iTunes [x]

OSX: 10.11.6 (15G1004) MacBook Pro (Retina, Mid 2012)

workaround: when i disable iTunes after the next restart i dont get the error

only this in logfile - that means it has nothing to do with the BartenderHelper:

2016-10-10 21:14:27.881 Guigna[45237:6312726] Bartender: Loaded BartenderHelperNinetySix
muescha commented 8 years ago

i have an ipa with this name "Cuisine d'ARTE 1.1.0.ipa" if i hoover over debug info then i see a backslash included "Cuisine d\'ARTE 1.1.0.ipa"

a playground with this works:

let filename = "Cuisine d\'ARTE 1.1.0.ipa"
let ipa = ("~/Music/iTunes/iTunes Media/Mobile Applications/\(filename)" as NSString)
print(ipa)
let ipa_path = ipa.expandingTildeInPath
print(ipa_path)

let filename1 = "Cuisine d'ARTE 1.1.0.ipa"
let ipa1 = ("~/Music/iTunes/iTunes Media/Mobile Applications/\(filename1)" as NSString)
print(ipa1)
let ipa_path1 = ipa.expandingTildeInPath
print(ipa_path1)

also if i create an expresssion it prints out the interpolated string:

print("~/Music/iTunes/iTunes Media/Mobile Applications/\(filename)" as NSString)

bildschirmfoto 2016-10-10 um 22 16 32

but if i step over the line (which i devided in 2 parts) it crashes:

// crash at next line
let ipa_string = ("~/Music/iTunes/iTunes Media/Mobile Applications/\(filename)" as NSString) 
// not reach this line
let ipa = ipa_string.expandingTildeInPath
gui-dos commented 8 years ago

The crash happens while unarchiving iTunesMetadata.plist: I think it is a internal error of the Foundation Kit while executing

let metadata = plist.propertyList() as! NSDictionary.

I installed Cuisine d'ARTE on my machine and unfortunately I can't reproduce the crash:

ipa_apostrophe

muescha commented 8 years ago

Or make a workaround if there is a exception then handle it so that the app is not crashing at this place