home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Quality Assurance
Bugtracker Feed
0003730: File existance cache issues
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="MediaPortal-Bot" data-source="post: 793030" data-attributes="member: 48617"><p>1. Incorrect lock when working with _fileLookupCache in RemoveFoldersFromCache(string dir) method in Utils.cs. We lock on this _fileLookupCache object and not on the _fileLookupCacheLock object like everywhere else so at the end, everything it's thread unsafe.</p><p></p><p>2. Next problem is more complicated to explain but it has to do with paths and their capitalization. Consider following scenario:</p><p></p><p>- Cache monitors c:\videos folder (monitored folders are always converted to lowercase)</p><p>- My Videos asks if c:\VIDEOS\Video1.jpg exists</p><p>- c:\VIDEOS\Video1.jpg gets added to cache with exists property set to false (note the capitalization)</p><p>- ...time passes</p><p>- c:\VIDEOS\Video1.jpg actually gets created (thumbnail is created for example)</p><p>- FSW (file system watcher) gets event that c:\videos\Video1.jpg was created (note the capitalization of the folder, monitored folders are always lowercase)</p><p>- now c:\videos\Video1.jpg is added to cache with exists property set to true (this is added as separate cache entry because dictionary key - file name - is case sensitive)</p><p>- ... more time passes</p><p>- My Videos asks if c:\VIDEOS\Video1.jpg exists (again)</p><p>- c:\VIDEOS\Video1.jpg is in cache with exists = false (but the file exists!)</p><p></p><p><a href="http://mantis.team-mediaportal.com/view.php?id=3730" target="_blank">http://mantis.team-mediaportal.com/view.php?id=3730</a></p><p></p><p><a href="http://mantis.team-mediaportal.com/view.php?id=3730" target="_blank">Open the issue in Mantis...</a></p></blockquote><p></p>
[QUOTE="MediaPortal-Bot, post: 793030, member: 48617"] 1. Incorrect lock when working with _fileLookupCache in RemoveFoldersFromCache(string dir) method in Utils.cs. We lock on this _fileLookupCache object and not on the _fileLookupCacheLock object like everywhere else so at the end, everything it's thread unsafe. 2. Next problem is more complicated to explain but it has to do with paths and their capitalization. Consider following scenario: - Cache monitors c:\videos folder (monitored folders are always converted to lowercase) - My Videos asks if c:\VIDEOS\Video1.jpg exists - c:\VIDEOS\Video1.jpg gets added to cache with exists property set to false (note the capitalization) - ...time passes - c:\VIDEOS\Video1.jpg actually gets created (thumbnail is created for example) - FSW (file system watcher) gets event that c:\videos\Video1.jpg was created (note the capitalization of the folder, monitored folders are always lowercase) - now c:\videos\Video1.jpg is added to cache with exists property set to true (this is added as separate cache entry because dictionary key - file name - is case sensitive) - ... more time passes - My Videos asks if c:\VIDEOS\Video1.jpg exists (again) - c:\VIDEOS\Video1.jpg is in cache with exists = false (but the file exists!) [url]http://mantis.team-mediaportal.com/view.php?id=3730[/url] [url=http://mantis.team-mediaportal.com/view.php?id=3730]Open the issue in Mantis...[/url] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Quality Assurance
Bugtracker Feed
0003730: File existance cache issues
Contact us
RSS
Top
Bottom