lastfm / lastfm-desktop

The official Last.fm desktop application suite
http://www.last.fm
GNU General Public License v3.0
461 stars 94 forks source link

Scrobbler crashes on OS X: "uncaught exception 'NSInvalidArgumentException'" #57

Closed RobFog closed 7 years ago

RobFog commented 9 years ago

This crash occurred at least 12 times between 15 November and 12 December, I have 12 almost identical crash reports. From the full crash log (https://gist.github.com/RobFog/3fca603a1d64551b6900):

*\ Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[QNSListener notificationHandler:]: unrecognized selector sent to instance 0x608000052690' terminating with uncaught exception of type NSException abort() called

[…]

Thread 10 Crashed:: Dispatch queue: com.apple.root.default-priority 0 libsystem_kernel.dylib 0x00007fff895bb866 __pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fff9512735c pthread_kill + 92 2 libsystem_c.dylib 0x00007fff8aaa2b1a abort + 125 3 libc++abi.dylib 0x00007fff95ad1f31 abort_message + 257 4 libc++abi.dylib 0x00007fff95af7952 default_terminate_handler() + 264 5 libobjc.A.dylib 0x00007fff9315b30d _objc_terminate() + 103 6 libc++abi.dylib 0x00007fff95af51d1 std::__terminate(void (*)()) + 8 7 libc++abi.dylib 0x00007fff95af5246 std::terminate() + 54 8 libobjc.A.dylib 0x00007fff9315b0b0 objc_terminate + 9 9 libdispatch.dylib 0x00007fff8b22c2a1 _dispatch_client_callout + 28 10 libdispatch.dylib 0x00007fff8b22e082 _dispatch_root_queue_drain + 326 11 libdispatch.dylib 0x00007fff8b22f177 _dispatch_worker_thread2 + 40 12 libsystem_pthread.dylib 0x00007fff95127ef8 _pthread_wqthread + 314 13 libsystem_pthread.dylib 0x00007fff9512afb9 start_wqthread + 13

bharadwaj6 commented 9 years ago

This happens a LOT for me.

Almost every time my MacBook wakes up from sleep, or reconnects to Wi-Fi. This is probably the No. 1 priority issue on OS X. Here's my traceback: https://gist.github.com/bharadwaj6/41a98ede5d800f64606b

I face this issue about 5 times per day on average these days... :cry:

RobFog commented 9 years ago

@bharadwaj6, I would recommend a third-party scrobbler called "Melo". It's been reliable for me and it uses considerably less CPU time.

bharadwaj6 commented 9 years ago

@RobFog: So we have to resort to third-party paid apps now? :astonished: I would consider paying for it only if it works with Apple Music on OS X. I have tried Scrobomatic and it didn't scrobble any Apple Music stuff either (although it didn't crash which is a positive).

I would love it if folks at lastfm fix this bug... it's been there forever!

RobFog commented 9 years ago

@bharadwaj6: Looks like it… I haven't seen any activity here for a few a very, very long time.

To be honest, I haven't tried Melo with newer versions of iTunes / Apple Music yet, I'm still running version 11. I certainly hope Melo can handle Apple Music once I update iTunes and start my Apple Music trial.

bharadwaj6 commented 9 years ago

@RobFog: After digging deeper for a while, I found out that this issue has nothing to do with lastfm desktop app itself (in other words, the source in this repo), but rather stems from a bug affecting Qt 4.8.4 which is the version used to compile the official app currently under distribution, 2.1.36.

More details on this bug can be seen here and here. As we can see this bug was later fixed in 4.8.6 - which also means that this bug wouldn't affect those who compile the app from source since they would get latest qt from brew.

I have compiled a custom app using a newer version of Qt (4.8.7), and packaged the app file here.

This one is not crashing like the one before (hurray!) - but it's still hugely experimental (it's my first build and seems kinda sloppy/buggy tbh) and I myself would stop using it as soon as an official update comes up. :stuck_out_tongue_closed_eyes:

emilssolmanis commented 9 years ago

Hey @bharadwaj6

Thanks for actually diagnosing this. As you may or may not know, the team is currently busy building the new site, so unfortunately we haven't had the time to pay all the attention we'd wish to the desktop scrobbler.

We do, however, occasionally go through the pull requests and merge the ones that are obvious. What you mention above seems like a simple enough fix, so if you could open a PR for it, we should be able to get this fixed.

RobFog commented 9 years ago

@bharadwaj6, good job and thanks for uploading! I think I'll stick with Melo for now because of the aforementioned CPU use and also unreliable scrobbling on the mainline scrobbler's part.

Thanks, @emilssolmanis, that's very heartening to read. (I have found http://beta.last.fm/ but there doesn't seem to be a mention of it on the blog… How would interested users find out about it?)

I've been a user of the site for a very long time and I still appreciate it despite a multitude of frustrations with the scrobbler. In fact, my impression from threads I've read on the support forum is that many, many users are very unhappy with the scrobbler. I feel like you'd be well-advised to address the issues the scrobbler is plagued with in a timely fashion. A fresh-looking website is certainly welcome but it's useless if the scrobbler doesn't work properly.

bharadwaj6 commented 9 years ago

@emilssolmanis: For someone building from source with given instructions, it should install the latest qt by default (as brew install qt does this).

I don't see the old qt dependency linked to/ mentioned anywhere in the source (please correct me if I am wrong here).

It seems like it's just the scrobbler under distribution that needs to compiled again with latest qt to get rid of this bug. So it would be nice if you guys can release the next version of OS X scrobbler (compiled with updated qt dependency) as a fix for this issue.

joenot443 commented 8 years ago

Just commenting to give my appreciation for the fix @bharadwaj6 posted, and to again remind @emilssolmanis and the rest of the team that this very common crash could be fixed by recompiling with the latest qt.

ben-xo commented 7 years ago

Just a note that we released an official build of 2.1.37 on https://www.last.fm/download a while ago, and I'd welcome any tests to check that this bug was fixed in it. (I believe it was).

bharadwaj6 commented 7 years ago

I have been using the official build since quite sometime and I haven't faced this issue on that build. Looks like it is fixed.

RobFog commented 7 years ago

To be honest, I've been using a different alternative to the official client for some time now as I've been quite disappointed with the bugginess, lack of support, and lack of updates I experienced with the official client (on the Mac). I think Last.fm will have to do more to win back the confidence of its users, at least with regard to the clients.

ben-xo commented 7 years ago

There are many media players on OSX with native scrobbling that do an excellent job (such as Clementine)- the official client is really only useful on OSX for scrobbling from iTunes.