rurza / NepTunes-Issues

This repository is only for issue tracking.
5 stars 0 forks source link

Crash when albumless tracks begin playing #64

Closed Wevah closed 3 years ago

Wevah commented 4 years ago

When albumless tracks start playing, NepTunes can crash trying to add nil to a dictionary.

On macOS 10.15.1.

NepTunes_2019-11-16-180845_Vergil.crash.zip

derekwolpert commented 4 years ago

I've been experiencing intermittent crashes with NepTunes as well. I just attempted to play multiple songs without an album title in Catalina's Music App, and NepTunes crashes reliably each time.

I'm on a 2016 15" MBP running macOS 10.15.2, Music v1.0.2.37, NepTunes 1.70. Let me know if any other info would be helpful in addressing this issue.

Screen Shot 2019-12-21 at 3 31 15 PM
chriswil commented 3 years ago

Same issue with albumless song. 2020 16" MBP macOS 10.15.7, NepTunes 1.70

mp3: https://phoebebridgers.bandcamp.com/track/iris

Wevah commented 3 years ago

I think I've tracked it down to this area in the iTunesSearch CocoaPod starting at line 313:

    NSDictionary *filters = @{
        @"wrapperType": @"collection",
        @"collectionType": @"album",
        @"collectionName": albumName
    };

If albumName is nil, it'll crash.

A simple fix might be to change the line to

        @"collectionName": [self forceString:albumName]

(in keeping with the use of forceString: elsewhere).

I haven't actually built NepTunes myself to test, yet, as I can't remember how to build the pods. 😬

Edit: Right, gotta use the xcworkspace and not the xcproject.

Edit 2: Can't seem to make it crash currently. Will report back if I can repro.

rurza commented 3 years ago

I'm alive! :) Thanks, it'll be fixed with 1.71 release :)

derekwolpert commented 3 years ago

@rurza Thanks a bunch!