lukedirtwalker / cutespotify

A QT5 Spotify client, based on MeeSpot with support for Ubuntu Touch and SailfishOS.
30 stars 9 forks source link

CuteSpotify crashes after startup if network is available #6

Closed hetas closed 9 years ago

hetas commented 10 years ago

CuteSpotify keeps crashing at startup or few seconds after startup if network is available. I believe this is the same reported at openrepost (https://openrepos.net/comment/3847#comment-3847).

I recently re-installed the app and cleared all user data and the problem went away just to return the next day. I have 11 offline-playlists with about 6GB of content.

If starting CuteSpotify from the terminal I get this output

sh-3.2$ harbour-cutespotify 
[D] QWaylandEglIntegration::QWaylandEglIntegration:58 - Using Wayland-EGL 
16:21:34.178 I [ap:1752] Connecting to AP ap.spotify.com:4070

16:21:34.219 I [ap:1226] Connected to AP: 194.14.177.21:4070

16:21:38.089 I [offline-mgr:2082] Storage has been cleaned

DeclarativeCoverWindow: I have a default alpha buffer

Muistialueen ylitys

Muistialueen ylitys == segmention fault.

Is there any logs which could help?

EDIT: It seems that the app doesn't crash while the screen is off. If I start the CuteSpotify form the command line it doesn't crash if the screen is off. As soon as the screen is turned on with a doubletap theres a crash with the segmention fault

lukedirtwalker commented 10 years ago

Which version are you using?

you can run the app from terminal with: harbour-cutespotify --debug

and report this output

hetas commented 10 years ago

I'm using version 1.5.0-0.

The edit about the screen being off might have been a coincidence. While taking the debug output the screen was off the whole time and the app still crashed.

Here's the debug output.

[D] QWaylandEglIntegration::QWaylandEglIntegration:58 - Using Wayland-EGL 
[D] QSpotifyAudioThreadWorker::event:37 - QSpotifyAudioThreadWorker::event 22 
[D] callback_notify_main_thread:98 - Notify main thread 
[D] QSpotifySession::checkNetworkAccess:998 - QSpotifySession::checkNetworkAccess 
[D] QSpotifySession::checkNetworkAccess:1009 - Network connection type:  "WLAN" 
[D] QSpotifySession::setConnectionRules:1043 - QSpotifySession::setConnectionRules 
[D] QSpotifySession::setStreamingQuality:538 - QSpotifySession::setStreamingQuality 
[D] QSpotifySession::setSyncQuality:552 - QSpotifySession::setSyncQuality 1 
[D] QSpotifySession::setSyncOverMobile:1080 - QSpotifySession::setSyncOverMobile 
[D] QSpotifySession::getStoredLoginInformation:906 - QSpotifySession::getStoredLoginInformation 
[D] QSpotifySession::login:650 - QSpotifySession::login 
[D] QSpotifySession::login:659 - Relogin 
[D] QSpotifySession::setShuffle:696 - QSpotifySession::setShuffle 
[D] QSpotifySession::setRepeat:709 - QSpotifySession::setRepeat 
[D] QSpotifySession::setRepeatOne:722 - QSpotifySession::setRepeatOne 
16:41:20.839 I [ap:1752] Connecting to AP ap.spotify.com:4070

[D] QSpotifySession::setVolumeNormalize:734 - QSpotifySession::setVolumeNormalize true 
16:41:20.869 I [ap:1226] Connected to AP: 194.132.162.98:4070

[W] QQmlImportDatabase::importPlugin:1697 - Module 'Sailfish.Silica' does not contain a module identifier directive - it cannot be protected from external registrations.
[D] QSpotifySession::setRepeat:709 - QSpotifySession::setRepeat 
[D] QSpotifySession::isOnline:980 - QSpotifySession::isOnline 
[D] QSpotifySession::onOnlineChanged:986 - QSpotifySession::onOnlineChanged 
[D] QSpotifySession::checkNetworkAccess:998 - QSpotifySession::checkNetworkAccess 
[D] QSpotifySession::checkNetworkAccess:1009 - Network connection type:  "WLAN" 
[D] QSpotifySession::setConnectionRules:1043 - QSpotifySession::setConnectionRules 
[D] QSpotifySession::isOnline:980 - QSpotifySession::isOnline 
[D] QSpotifySession::event:396 - Process spotify event 
[D] QSpotifySession::processSpotifyEvents:521 - QSpotifySession::processSpotifyEvents 
[D] QSpotifySession::processSpotifyEvents:530 - Processing events... 
[D] callback_notify_main_thread:98 - Notify main thread 
[D] callback_logged_in:78 - Log in:  "No error" 
[D] callback_connectionstate_updated:182 - Connection state updated 
[D] callback_connectionstate_updated:182 - Connection state updated 
16:41:21.942 I [offline-mgr:2082] Storage has been cleaned

DeclarativeCoverWindow: I have a default alpha buffer
[D] QSpotifySession::event:396 - Process spotify event 
[D] QSpotifySession::processSpotifyEvents:521 - QSpotifySession::processSpotifyEvents 
[D] QSpotifySession::processSpotifyEvents:530 - Processing events... 
[D] callback_notify_main_thread:98 - Notify main thread 
[D] QSpotifySession::event:409 - Connection error 
[D] QSpotifySession::setConnectionError:623 - QSpotifySession::setConnectionError 0 "No error" 
[D] QSpotifySession::event:465 - Logged in 1 
[D] QSpotifySession::onLoggedIn:566 - Logged in 
[D] QSpotifySession::checkNetworkAccess:998 - QSpotifySession::checkNetworkAccess 
[D] QSpotifySession::checkNetworkAccess:1009 - Network connection type:  "WLAN" 
[D] QSpotifySession::setConnectionRules:1043 - QSpotifySession::setConnectionRules 
[D] QSpotifySession::onLoggedIn:584 - Done 
[D] QSpotifySession::event:489 - Connectionstate update event 
[D] QSpotifySession::setConnectionStatus:609 - QSpotifySession::setConnectionStatus 1 
[D] QSpotifySession::event:489 - Connectionstate update event 
[D] QSpotifySession::setConnectionStatus:609 - QSpotifySession::setConnectionStatus 1 
[D] QSpotifySession::event:396 - Process spotify event 
[D] QSpotifySession::processSpotifyEvents:521 - QSpotifySession::processSpotifyEvents 
[D] QSpotifySession::processSpotifyEvents:530 - Processing events... 
[D] callback_metadata_updated:104 - Metadata updated 
[D] callback_notify_main_thread:98 - Notify main thread 
[D] QSpotifySession::event:415 - Meta data 
[D] QSpotifySession::event:396 - Process spotify event 
[D] QSpotifySession::processSpotifyEvents:521 - QSpotifySession::processSpotifyEvents 
[D] QSpotifySession::processSpotifyEvents:530 - Processing events... 
[D] callback_userinfo_updated:110 - User info updated 
[D] callback_userinfo_updated:110 - User info updated 
[D] callback_metadata_updated:104 - Metadata updated 
[D] callback_notify_main_thread:98 - Notify main thread 
[D] QSpotifySession::event:415 - Meta data 
[D] QSpotifySession::event:415 - Meta data 
[D] QSpotifySession::event:415 - Meta data 
[D] QSpotifySession::event:396 - Process spotify event 
[D] QSpotifySession::processSpotifyEvents:521 - QSpotifySession::processSpotifyEvents 
[D] QSpotifySession::processSpotifyEvents:530 - Processing events... 
[D] callback_notify_main_thread:98 - Notify main thread 
[D] QSpotifySession::event:396 - Process spotify event 
[D] QSpotifySession::processSpotifyEvents:521 - QSpotifySession::processSpotifyEvents 
[D] QSpotifySession::processSpotifyEvents:530 - Processing events... 
[D] callback_notify_main_thread:98 - Notify main thread 
[D] QSpotifySession::event:396 - Process spotify event 
[D] QSpotifySession::processSpotifyEvents:521 - QSpotifySession::processSpotifyEvents 
[D] QSpotifySession::processSpotifyEvents:530 - Processing events... 
[D] callback_metadata_updated:104 - Metadata updated 
[D] QSpotifySession::event:415 - Meta data 
[D] callback_notify_main_thread:98 - Notify main thread 
[D] QSpotifySession::event:396 - Process spotify event 
[D] QSpotifySession::processSpotifyEvents:521 - QSpotifySession::processSpotifyEvents 
[D] QSpotifySession::processSpotifyEvents:530 - Processing events... 
[D] callback_notify_main_thread:98 - Notify main thread 
[D] QSpotifySession::event:396 - Process spotify event 
[D] QSpotifySession::processSpotifyEvents:521 - QSpotifySession::processSpotifyEvents 
[D] QSpotifySession::processSpotifyEvents:530 - Processing events... 
[D] callback_notify_main_thread:98 - Notify main thread 
[D] QSpotifySession::event:396 - Process spotify event 
[D] QSpotifySession::processSpotifyEvents:521 - QSpotifySession::processSpotifyEvents 
[D] QSpotifySession::processSpotifyEvents:530 - Processing events... 
[D] callback_metadata_updated:104 - Metadata updated 
[D] callback_notify_main_thread:98 - Notify main thread 
Muistialueen ylitys
lukedirtwalker commented 10 years ago

can you try installing 1.4.0-2 and check if it also crashes?

hetas commented 10 years ago

Installed 1.4.0-2 but didn't clear any user data. Still crashes.

lukedirtwalker commented 10 years ago

Hm okay, can you observe memory usage while you start it? For example with lighthouse. It could be that you run out of memory.

hetas commented 10 years ago

I installed lighthouse and according to it memory usage is about 60%. When starting CuteSpotify it takes the focus so I can't really see the figures any more. Top seems to show about 25000k free when the app crashes. I have no idea if these are accurate numbers.

While doing all this something got corrupted I think and no playlist worked offline anymore. I removed ~/.local/share/harbour-cutespotify/Users and no more crashes. And as reported at openrepos playlists aren't available offline anymore but after setting them as offline again CuteSpotify doesn't need to download anything and can use the old Storage-files.

I checked couple of playlists as offline ones and now Lighthouse is showing about 65% memory usage and no crashes.

lukedirtwalker commented 10 years ago

Thanks for the reports. I really need to do something about the high memory usage.

On the other hand I'm not entirely sure if the crash is related to this.

I didn't get this Bug anymore in newer versions and it is very hard to find it, if it doesn't happen.

hetas commented 10 years ago

Ok, thank you for your quick response. You could try making a few large offilne-playlists if you don't have ones. The longest one I got has 227 songs. Storage is symlinked to sdcard but I did try without the symlink and the crashes continued.

Now the app isn't crashing anymore but we'll see what happens when there's changes in the playlists.

hetas commented 10 years ago

The crashes continued so now I have only four offline-playlists and things are working. Three of these playlists are quite long, having 15, 12 and 10 hours of music. A few times CuteSpotify has crashed a couple of time at startup but has starting working without having to clean up any files.

lukedirtwalker commented 9 years ago

@hetas Thanks for the reports, are those playlists that are managed by someone else? I think it might be the old bug that happens when the playlists change while the device is not online.

(About memory usage, you likely didn't report the number I wanted as I didn't explain clearly what i want. The actual interesting number you find when you go to processes and then use the pull-down menu once. You'll see processes list after memory usage and from there you can find harbour-cutespotify and its CPU and memory usage)

hetas commented 9 years ago

Yes, there's several playlists managed by someone else. At the moment two of the offline ones are someone elses. There's also a collaboration-playlist offline.

Lighthouse shows a process called cutespo(h) with memory usage of 6%. While syncing and offline playlist memory usage varies between 15% and 25%.

lukedirtwalker commented 9 years ago

Thanks for the infos. The numbers seem more reasonable :), but I actually have an idea to reduce memory usage a bit still.

hetas commented 9 years ago

Hi, I've been using SailfishOS 1.1.1.27 for a while now and have had much less problems with CuteSpotify crashing. I have several offline playlist in use again. If there have been changes in the playlists CuteSpotify often crashes at startup but no data is corrupted. Second start usually works.

There has been no need to delete any user-files since installing 1.1.1.27. Before that almost every change in playlists required User-folder to be deleted.

lukedirtwalker commented 9 years ago

I also had no crashes since a long time, however the bug still is there.

lukedirtwalker commented 9 years ago

It should be fixed as of version 1.5.2

hetas commented 9 years ago

I don't think this completely fixed. At times CuteSpotify still crashes at startup if there has been changes in playlists. It takes a few restarts before the app starts.

But today I had to delete harbour-cutespotify/Users folder again because CuteSpotify kept crashing at startup. I have 1.5.2-1 installed.