Author Topic: [Bug] Library - Last Play Field Registers Incorrect Time **RESOLVED**  (Read 1511 times)

Joseph Collins

  • Posts: 11
I'm back again.  And I have yet another inexplicable bug.

The long and short of this bug is that when a file in my Library is played, the "Last Played" field in the Library window will frequently show the incorrect time.  For example, XMPlay has a habit of registering a handful of files at-a-time as "Last Played: 7-8 hours ago" (even placing them randomly in that time range) when they're actually being played anywhere from 0-15 minutes ago.  Playback -- including play frequency (or how often a song is played) -- seems otherwise unaffected.

I'm not sure what could be causing this, but I do know it's been a bug in the program since at least 3.8.1.x.  It's a really odd one, at that...  I hope there's a simple fix for this -- even better if it's something the user (ie. myself) can do.

Cheers!

Edit: Resolved as of the test build, as far as I can tell.  Awesome job, Ian!  Thank you!
« Last Edit: 28 Mar '16 - 02:25 by Joseph Collins »

Jace

  • Posts: 825
Doesn't seem to do it on my end. Does it do it with every file? Or just files in a certain folder? Certain file type? Are the files all in the same zip file?

Ian @ un4seen

  • Administrator
  • Posts: 20427
That's very strange. The only thing that comes to mind is that there might be multiple copies of the same file in different locations, and one copy was played 0-15 mins ago while another copy was played 7-8 hours ago. Does that sound possible? If you sort the library by the "last play" column, can you see both 0-15 mins and 7-8 hours entries?

Joseph Collins

  • Posts: 11
Doesn't seem to do it on my end. Does it do it with every file? Or just files in a certain folder? Certain file type? Are the files all in the same zip file?
It seems to do it completely at-random and absolutely none of the files are in any sort of compressed folder.  They're all individual files.
That's very strange. The only thing that comes to mind is that there might be multiple copies of the same file in different locations, and one copy was played 0-15 mins ago while another copy was played 7-8 hours ago. Does that sound possible? If you sort the library by the "last play" column, can you see both 0-15 mins and 7-8 hours entries?
I don't have any duplicate files anywhere in my Library, unfortunately, but even that wouldn't account for tens of files being marked as played X amount of hours ago when they're being played right away.  But I always keep my Library sorted by Last Played, which is how I became aware of the problem in the first place.

The absolute most frustrating part of this is that there's no way to consistently trigger it.  When I started playing music for the first time today, for example, they were being marked as being played 22 hours ago -- which doesn't even make sense because I was playing music not even twelve hours ago.  But after switching to Library view from Playlist view, it seems to have corrected itself again and every time a file is played, it goes to the top of the Library, like it's supposed to when sorting by Last Played.

Hm...  Now that I'm looking at the files in the XMPlay folder, I notice that "xmplay.library~" was updated about 14 minutes ago (from this post's date) -- which was when the Library started registering Last Played times correctly again -- and that "xmplay.library" (no tilde) was updated 6 minutes ago.  That doesn't have much relevance to my thought, but it does make me really curious as to what either of those files do, aside from the obvious.

Ian @ un4seen

  • Administrator
  • Posts: 20427
"xmplay.library" is where the library is stored, and "xmplay.library~" is the backup; whenever XMPlay writes the library to disk, the existing "xmplay.library" file will be renamed to "xmplay.library~" first. If XMPlay happens to crash while writing the library, it can be recovered by restoring the "xmplay.library~" file.

Regarding the problem, when you next see it happen, please upload both the "xmplay.library" and "xmplay.library~" files to have a look at here:

   ftp.un4seen.com/incoming

Also state which entry(s) in the library is affected by the problem.

Joseph Collins

  • Posts: 11
I literally just watched XMPlay change a bunch of files' "Last Play" times to "Sat Mar 12 16:02:45 2016".  As soon as I hit Stop, it did that and updated the Library files.  And so, I grabbed the files, made a playlist of the afflicted music files, and have uploaded everything in a ZIP file (named "XMPlay JDC Library (160312).zip") to the FTP.

Hopefully, this will help unravel this mystery...  Heh.

Ian @ un4seen

  • Administrator
  • Posts: 20427
Thanks, the uploaded library confirms that all of the affected files have the exact same "last play" value. Looking at the XMPlay code, I can't see any way for multiple files to have their "last play" values updated simultaneously, but I may see another way that they could end up with the same value. Did you play all of the affected files recently, and is their "last play" value the time that you started playing the first of them? And did you happen to have the main XMPlay window minimized throughout that time?

Joseph Collins

  • Posts: 11
- Yes.
- I'm not sure, but possibly.
- Yes, it was minimized to the System Tray.  And if it's any help, the Playlist window was open before I minimized it, but not the Library window.
And this all applies to every time I've noticed all my recently-played files had the exact same Last Play time.

I should also mention, I leave XMPlay minimized (again, to the System Tray) when I turn in for the night/day/whenever, leaving it idle for several hours.  Not sure if that inactivity has anything to do with anything though...

Ian @ un4seen

  • Administrator
  • Posts: 20427
I think that could explain it then. Here's an update for you to try:

   www.un4seen.com/stuff/xmplay.exe

Let me know if you still see the problem happening.

Joseph Collins

  • Posts: 11
I've been using this version off-and-on for a couple days now (and haven't closed it or rebooted the computer since opening this version) and as far as I can tell... the Library is working perfectly again!  I'll keep an eye on things for a few more days though, but if you don't see another post from me by next Sunday, I'd consider this issue resolved!

Thank you very much, Ian!  You're the best!