[Rejected] Prevent removable drives (card readers) from hanging MediaPortal (1 Viewer)

DigitalDJ

Portal Member
January 2, 2008
12
0
This is a patch that I created to prevent MediaPortal for waiting for the I/O timeout on Removable Drives.

In my case, I found that the card reader I have, when nothing was in it, would take more than 20 seconds to time out. Multiply this by the number of card slots (4 in my case) and this would completely hang MediaPortal for up to 2 minutes....while being unkillable in Task Manager.

If you have a card reader (that takes ages to timeout) this can be reproduced by visiting any library...Pictures for example. Then browsing to the top most directory (that lists all your drives and folders).

The problem occurs when trying to find thumbnail images to show for the folder. When MediaPortal tries to query for volume information, or if the file exists, there is blocking I/O as Windows attempts to read from the drive.

This is a quick and dirty patch FOR MY OWN PERSONAL USE. You will see the the patch actually ignores hardcoded drives. This is obviously NOT the way to do it however I want to create awareness for this highly annoying bug. I personally, don't have the experience with Win32 API calls...I don't know how you would go about setting a timeout. I seemed to get no response from the Bugfix forum, but I have successfully reproduced this on two PCs with fresh MediaPortal 1.1.0 RC1 releases (and svn 25xxx).

Also note, this is not because of thumbnail generation, but rather checking for a thumbnail to use. There are no pictures in any of the folders I have tested.

Obviously, this patch will likely be rejected. It's a proof of bug, at best....but please, take a look into this. I'm not sure how this one slipped by.

Grant

PS. Commenting out these sections does not seem to affect thumbnail generation....well, I haven't found any noticeable problems.
 

Attachments

  • Util.patch
    30.6 KB
  • VirtualDirectory.patch
    30.7 KB

chemelli

Retired Team Member
  • Premium Supporter
  • September 28, 2006
    6,159
    2,264
    49
    Milano, Italy
    Home Country
    Italy Italy
    This is a quick and dirty patch FOR MY OWN PERSONAL USE. You will see the the patch actually ignores hardcoded drives. This is obviously NOT the way to do it however I want to create awareness for this highly annoying bug.

    Says it all.

    *rejected*

    Simone
     

    Users who are viewing this thread

    Top Bottom