Bug 180520 - GUI freezes after mounting Media Device
Summary: GUI freezes after mounting Media Device
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/Media Devices (show other bugs)
Version: 2.3-GIT
Platform: Unlisted Binaries Linux
: HI major
Target Milestone: 2.3.1
Assignee: Amarok Developers
URL:
Keywords:
: 210844 212615 217380 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-13 04:01 UTC by Brian
Modified: 2009-12-29 12:46 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian 2009-01-13 04:01:22 UTC
Version:            (using KDE 4.1.3)
Compiler:          cmake version 2.6-patch 2, GCC 4.3.2 
OS:                Linux
Installed from:    Unspecified Linux

I plug my iPod into my computer, then run "pmount /dev/sdb1". The Amarok GUI and tray icon will freeze for ~5 seconds (music continues playing). The GUI will then unfreeze and function like normal.
Comment 1 Seb Ruiz 2009-01-13 04:04:16 UTC
Mounting the ipod should be threaded.
Comment 2 Brian 2009-01-13 04:21:16 UTC
Perhams if Amarok were to mount the iPod itself, it would be. However, do to some (unfortunate and unknown) flaw in my Arch Linux configuration, I have to manually mount my iPod. Could it be that Amarok is not prepared for manual mounts, and consequently doesn't start the a seperate collection scan thread (or some such task)?
Comment 3 Seb Ruiz 2009-01-13 04:25:28 UTC
What I meant to say is that reading the itunes db should be threaded.
Comment 4 Mikko C. 2009-06-06 11:38:46 UTC
The same freeze happens when plugging my MTP device.
Comment 5 Alejandro Wainzinger 2009-07-24 15:05:03 UTC
Yeah, iPod parsing should be threaded. Can't do anything about the mounting issue with Arch Linux though.

p.s., MTP connecting is threaded.  It shouldn't be freezing up the GUI when connecting, it doesn't do it for me.
Comment 6 Mikko C. 2009-07-24 15:19:24 UTC
> p.s., MTP connecting is threaded.  It shouldn't be freezing up the GUI when
> connecting, it doesn't do it for me.

It does for a little while with my ZVM which has 4500 tracks.

amarok:   BEGIN: void MediaDeviceCollection::slotAttemptConnectionDone(bool)                   
amarok:     [MediaDeviceCollection] starting full scan                                         
amarok:     BEGIN: virtual void MediaDeviceCollection::startFullScan()                         
amarok:       BEGIN: void Meta::MediaDeviceHandler::parseTracks()                              
amarok:          RC does not exist                                                             
amarok:          Has read capability interface                                                 
amarok:          Created rc 


FREEZE

amarok:          adding provider 
amarok:         BEGIN: MediaDeviceUserPlaylistProvider::MediaDeviceUserPlaylistProvider() 
amarok:         END__: MediaDeviceUserPlaylistProvider::MediaDeviceUserPlaylistProvider() - Took 5.1e-05s
amarok:         BEGIN: void PlaylistManager::addProvider(PlaylistProvider*, int) 
amarok:         END__: void PlaylistManager::addProvider(PlaylistProvider*, int) - Took 0.00015s  
amarok:         BEGIN: void PlaylistManager::slotUpdated()                                        
amarok:           BEGIN: void PlaylistBrowserNS::UserModel::slotUpdate()                          
amarok:             BEGIN: void PlaylistBrowserNS::UserModel::loadPlaylists()                     
amarok:               BEGIN: Meta::PlaylistList PlaylistManager::playlistsOfCategory(int)         
amarok:                 BEGIN: virtual Meta::PlaylistList MediaDeviceUserPlaylistProvider::playlists() 
amarok:                 END__: virtual Meta::PlaylistList MediaDeviceUserPlaylistProvider::playlists() - Took 5e-05s 
amarok:                 BEGIN: virtual Meta::PlaylistList PlaylistFileProvider::playlists()                          
amarok:                 END__: virtual Meta::PlaylistList PlaylistFileProvider::playlists() - Took 5.1e-05s          
amarok:                 BEGIN: Meta::SqlPlaylistList Meta::SqlPlaylistGroup::childSqlPlaylists() const               
amarok:                 END__: Meta::SqlPlaylistList Meta::SqlPlaylistGroup::childSqlPlaylists() const - Took 5e-05s 
amarok:                 BEGIN: Meta::SqlPlaylistGroupList Meta::SqlPlaylistGroup::childSqlGroups() const             
amarok:                 END__: Meta::SqlPlaylistGroupList Meta::SqlPlaylistGroup::childSqlGroups() const - Took 5e-05s 
amarok:               END__: Meta::PlaylistList PlaylistManager::playlistsOfCategory(int) - Took 0.00043s              
amarok:             END__: void PlaylistBrowserNS::UserModel::loadPlaylists() - Took 0.00054s                          
amarok:             BEGIN: void PlaylistsInGroupsProxy::buildTree()                                                    
amarok:                "building tree with 21 leafs."                                                                  
amarok:                "index 0 belongs to groupName "                                                                 
amarok:                "index 1 belongs to groupName "                                                                 
amarok:                "index 2 belongs to groupName "                                                                 
amarok:                "index 3 belongs to groupName "                                                                 
amarok:                "index 4 belongs to groupName "                                                                 
amarok:                "index 5 belongs to groupName "                                                                 
amarok:                "index 6 belongs to groupName "                                                                 
amarok:                "index 7 belongs to groupName "                                                                 
amarok:                "index 8 belongs to groupName "                                                                 
amarok:                "index 9 belongs to groupName "                                                                 
amarok:                "index 10 belongs to groupName "                                                                
amarok:                "index 11 belongs to groupName "                                                                
amarok:                "index 12 belongs to groupName "                                                                
amarok:                "index 13 belongs to groupName "                                                                
amarok:                "index 14 belongs to groupName "
amarok:                "index 15 belongs to groupName "
amarok:                "index 16 belongs to groupName "
amarok:                "index 17 belongs to groupName "
amarok:                "index 18 belongs to groupName "
amarok:                "index 19 belongs to groupName "
amarok:                "index 20 belongs to groupName "
amarok:                m_groupHash:
amarok:                (20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
amarok:             END__: void PlaylistsInGroupsProxy::buildTree() - Took 0.00092s
amarok:           END__: void PlaylistBrowserNS::UserModel::slotUpdate() - Took 0.0016s
amarok:           BEGIN: Meta::PlaylistList PlaylistManager::playlistsOfCategory(int)
amarok:           END__: Meta::PlaylistList PlaylistManager::playlistsOfCategory(int) - Took 5.3e-05s
amarok:         END__: void PlaylistManager::slotUpdated() - Took 0.0018s
amarok:          Setting memcoll stuff
amarok:       END__: void Meta::MediaDeviceHandler::parseTracks() - Took 11s
amarok:     END__: virtual void MediaDeviceCollection::startFullScan() - Took 11s
amarok:   END__: void MediaDeviceCollection::slotAttemptConnectionDone(bool) - Took 11s
amarok: END__: void Meta::MtpHandler::slotDeviceMatchSucceeded(ThreadWeaver::Job*) - Took 11s
amarok: BEGIN: virtual void CollectionTreeItemModel::collectionAdded(Amarok::Collection*)
amarok:    [WARNING!] failed: an unexpected comparison was made
amarok:   BEGIN: virtual float Meta::MtpHandler::usedCapacity() const
amarok:     BEGIN: virtual float Meta::MtpHandler::totalCapacity() const
amarok:     END__: virtual float Meta::MtpHandler::totalCapacity() const - Took 0.0001s
amarok:   END__: virtual float Meta::MtpHandler::usedCapacity() const - Took 0.0014s
amarok:   BEGIN: virtual float Meta::MtpHandler::totalCapacity() const
amarok:   END__: virtual float Meta::MtpHandler::totalCapacity() const - Took 9.1e-05s
amarok: END__: virtual void CollectionTreeItemModel::collectionAdded(Amarok::Collection*) - Took 0.005s


Maybe it's because it needs to parse many tracks.
amarok:       END__: void Meta::MediaDeviceHandler::parseTracks() - Took 11s
amarok:     END__: virtual void MediaDeviceCollection::startFullScan() - Took 11s
Comment 7 Alejandro Wainzinger 2009-09-05 15:24:17 UTC
Threading of connection requires a decent amount of reworking, targetting for 2.3.
Comment 8 Myriam Schweingruber 2009-11-04 00:29:40 UTC
Changing version.
Comment 9 Mark Kretschmann 2009-12-04 11:58:40 UTC
This one is really nasty. Just got this, with a MTP device (4 gigs flash):


amarok:         END__: int Meta::MtpHandler::getTrackToFile(uint32_t, const QString&) - DELAY Took (quite long) 26s
Comment 10 Mikko C. 2009-12-04 12:01:28 UTC
*** Bug 212615 has been marked as a duplicate of this bug. ***
Comment 11 Mikko C. 2009-12-04 23:44:56 UTC
*** Bug 217380 has been marked as a duplicate of this bug. ***
Comment 12 Mikko C. 2009-12-05 13:33:56 UTC
*** Bug 210844 has been marked as a duplicate of this bug. ***
Comment 13 Myriam Schweingruber 2009-12-07 01:21:40 UTC
Adding keyword
Comment 14 Mark Kretschmann 2009-12-07 08:48:17 UTC
Making this a release_blocker is somewhat dangerous, as it could delay the release for a good while.

It's currently unclear if the problem can be fixed quickly (or rather: worked around), or if we need a complete redesign of the subsystem (which would take months).


I have some ideas I want to try for a workaround, but I can't promise anything.
Comment 15 Mark Kretschmann 2009-12-26 11:34:18 UTC
We won't be able to fix this before 2.2.2 final (it's far too complex), so I'm removing the release_blocker keyword.
Comment 16 Mikko C. 2009-12-29 12:41:02 UTC
Thanks to xevix this is fixed in commit 602801f67eeb506d17b2294f8ae22ff233c1e134.
Fix will be in Amarok 2.2.2.
Comment 17 Alejandro Wainzinger 2009-12-29 12:45:48 UTC
commit 14a1b0f93203f137e45ba56f88d2e1045dcf36f0
Author: Alejandro Wainzinger <aikawarazuni@gmail.com>
Date:   Tue Dec 29 03:45:14 2009 -0800

    Fixed GUI freezing after mounting and during parse of media devices.
    BUG:180520

diff --git a/ChangeLog b/ChangeLog
index 2e8a56e..4919160 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,8 @@ VERSION 2.2.2
       fallback. Patch by Andreas Hartmetz <ahartmetz@gmail.com>.
 
   BUGFIXES:
+    * Fixed GUI freezing after mounting and during parse of media devices
+      (BR 180520)
     * Fixed missing icons in the drag overlay menu.
     * More reliable MimeType detection for music formats. Patch by RafaÅ
       Rzepecki <divided.mind@gmail.com>. (BR 219792)
Comment 18 Alejandro Wainzinger 2009-12-29 12:46:33 UTC
commit 14a1b0f93203f137e45ba56f88d2e1045dcf36f0
Author: Alejandro Wainzinger <aikawarazuni@gmail.com>
Date:   Tue Dec 29 03:45:14 2009 -0800

    Fixed GUI freezing after mounting and during parse of media devices.
    BUG:180520

diff --git a/ChangeLog b/ChangeLog
index 2e8a56e..4919160 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,8 @@ VERSION 2.2.2
       fallback. Patch by Andreas Hartmetz <ahartmetz@gmail.com>.
 
   BUGFIXES:
+    * Fixed GUI freezing after mounting and during parse of media devices
+      (BR 180520)
     * Fixed missing icons in the drag overlay menu.
     * More reliable MimeType detection for music formats. Patch by RafaÅ
       Rzepecki <divided.mind@gmail.com>. (BR 219792)