• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ghost PDF, and time anomaly
Odd situation and behavior:

Pulled up a song on tablet that I've played before, but now the PDF page is blank/black. All the song info is there, and the PDF link is correct, but still, no music displayed. Files page says it is showing 1 of 0. Seems like the database has the file info but the file is not found. So, I crank up Companion on my master library PC and connect to tablet. 

Well, Companion shows the PDF, proper file size, etc is on the tablet. Apparently not really, so I copy the same PDF from PC to tablet. I select Replace. But I end up with two of the same PDF on tablet, and two of the same song in the database. Is that what should have happened? 

Companion now shows two of same PDF -- EXACTLY the same name -- which should be impossible (I don't use Folders). Both files show the same size. Does Companion only read the database and not the actual files, so I'm only seeing a database ghost, not two physical files?

But in Companion the two files have different timestamps -- very different. The older/original PDF shows Modified as 7 hours IN THE FUTURE. Presumably the Modified stamp got updated when I explored the problem on the tablet, opening the song editor and the Files tab. But even if that updates Modified, the tablet has the correct time, and the Sync actions box shows correct times. So why is it 7 hours later? My hunch: I'm currently in Pacific Daylight Time which is -7 hours from GMT/Zulu/UTC. It seems that time offset was not respected on the tablet when updating the file's Modified stamp.

The new PDF that I synced to the tablet shows in Companion as the correct current time for Created and Modified.

So, several odd things, but the big one is still, how can two of the same-name PDFs seem to exist in the same location on the tablet. I have not yet deleted the "bad" one in case there's something more I should investigate. I can wait until tomorrow if that is helpful. Should I delete the ghost/bad song from the tablet, or via Companion?
-- John

Samsung Galaxy Tab Pro 12.2 (SM-T900) Android 5.1.1
That almost sounds like the other black page issues that have been reported here: http://zubersoft.com/mobilesheets/forum/...p?tid=3263

In those cases, I don't think the page said 1 of 0 though, and the rest of the PDF loaded correctly, so I'm not sure if it's really the same thing.

When it comes to the problem you ran into with the companion, it's a pretty common misunderstanding of how the file import works. If you drag the same file multiple times into the companion application, this is instructing the program that you want to create a new song each time. If the output path for where the file will be copied matches an existing file's path, then you will get a file conflict dialog asking what to do about the conflict. No matter what you pick, a new song WILL be created. File conflicts are usually not a problem if you a) check the Settings->Storage->Use Subdirectory per Song setting or b) check the Setttings->Storage->Add Unique Id to Filenames. If you had the first setting check and you provided a different title for the song or you had the setting second checked, that explains why no file conflict was generated.

If you were intending to replace an existing file, the correct way to do this is to right-click on a song in the companion and select "Swap File". This swaps a file in for an existing one and updates the database appropriately. One change I may consider making in the future is checking each file that is imported to see if the name matches an existing name in the database, and in that case, prompt the user if they want to swap the file in for one of the existing matching songs or create a new song. This will obviously slow down the creation process for people who happen to use files with the same name as existing files frequently, but it could reduce the confusion for most other users.

As for the timestamps, I think the times are all stored in UTC so that I don't have to worry about conversion between time zones. This is a huge pain otherwise, and for most practical uses, I don't think it matters what time zone the files are in as people just care about the sorting capabilities. If this is really an issue for people, I can write up an enhancement request to convert the times listed in the companion to local time instead of UTC time, which probably isn't a big deal (I'll still store UTC internally though). Likewise, I could do something like this on the tablet as well to respesct the local time zone on the tablet. You said the times show up correctly when they were imported by the companion app - this would actually indicate that I may not be storing UTC times correctly from the companion, so I'll have to look into this.

Feel free to delete the second song you created. You can delete it from either the tablet or companion - the end result should be the same.

I just researched this, and apparently the tablet code I wrote is already converting between UTC and local time before displaying the values. The problem lies solely with the companion application - there are a few spots where I didn't properly store time as UTC, and I didn't convert to local time before displaying values. I'll have this all fixed in the next release.

Thanks for the explanation. Still a mystery why the database link to the file displayed black when the file (according to Companion) was really there. Any thoughts on that?

I intentionally do not use folders. and do enable MSP to create unique file names. I do all my file management on my PC, with every file precisely named per a format that is very helpful (Song Tltle [Key] SourceID.pdf) so a duplicate file name MUST be a true duplicate file. So there must be another explanation for two identical files seeming to exist. Is Companion actually reading the tablet storage, or just believing what the database says?

I never noticed the Swap File right-click, didn't occur to me to look there when the typical action is to drag-and-drop. In that situation the Replace dialog is confusing, because I thought it behaved like dragging a file in Windows, where Replace really means it, and creates a duplicate (with appended number) only when instructed (somehow).

Local time vs. UTC, your choice, I know the overhead needed to convert on the fly. But even if it is not adjusted as Windows does, timestamp display should be consistent within MSP and Companion or it's more confusing than helpful.
-- John

Samsung Galaxy Tab Pro 12.2 (SM-T900) Android 5.1.1
I definitely can't explain the weird black page. If you can reproduce it at any point, please let me know.

The companion reads the tablet storage (indirectly as it asks the tablet whether a conflict occurs as it can report on the file system), so if no duplicate was reported, I'm not sure I can explain that (unless the file was truly missing on the tablet). If you imported the same file again, and you created a song out of it, it would have restored a missing file potentially that both songs would use.

I'll try to work on adding that extra layer of detection that asks the user whether they want to create a new song or swap the file for an existing.

All displays are local time now, all database entries are UTC.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2022 MyBB Group.