Author Topic: UpdateMedia possibly getting stuck - dev's, definitive list of no-no chars?  (Read 1352 times)

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Hi all

I am still having problems with UpdateMedia - in another thread I described it as running continuously and creating very large log files. I had one of Thom's .ogg screencasts that the log file suggested it was borking on. Dunno why, but I moved it to a different location so that UpdateMedia couldn't see it, and now I have what I consider to be more normal behaviour were it does sleep for a couple of mins at the end of a run...

But, I am still seeing strange stuff that I think is not correct. Even though I am not changing/adding/deleting any media, I still get lines that are coloured (yellow or green, not sure which as I'm colourblind!). The messages seem to suggest that it is the same files each time, and it says that it needs to sync because they are not in the database, which makes me think it isn't inserting them correctly. I am guessing this is one of those issues where UpdateMedia or MySQL doesn't like a particular character in the file name.... several of them have ' in them but not all, some others have : in them....

Is there a definitive list of the all the characters that are not allowed in file names? Also, dave/rodecot suggests that spaces/whitespace is not allowed either... is this true as most of mine have spaces in them and generally this doesn't seem to cause any problems finding them and playing them...

I'd like to troubleshoot this one to prune out all the messages that shouldn't be there and will be happy to write a wiki afterwards with the findings...

Can post my UpdateMedia.log file if this post provokes interest... :)

Thanks

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Zaerc

Here is one instance - this one comes up every run of UpdateMedia and seems to be saying that it has seen some modification to the date/time so it needs to update the db... but the old and new dates are the same each time (albeit recent ones)

http://pastebin.com/m5dd2c111

Will go and find another example where I think it is a character....

Here's one that continually states it isn't in the database at all and tries to add it - and I note this one does have an "'" in it...

http://pastebin.com/m6ec88b62
« Last Edit: October 30, 2008, 01:45:04 am by colinjones »

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
So all forms of apostrophe, single quote, inverted comma, etc are not good!


'
`

And I also found this masquarading as a apostrophe - ґ  dunno what it is, but presumably some kind of unicode mismapping of ' so I'm inferring that most of the unicode set outside basic ASCII is bad!

Also, have discovered that when you apply attributes to a directory/folder, rather than a media file, and UpdateMedia creates the associated .id3 tag file, this causes UpdateMedia to rescan that tag file in every scan it does.

I also think that this may end up corrupting/duplicating attributes in that file. I have extracted an extreme example from my UpdateMedia.log file here http://pastebin.com/m72aafd46

As you can see, it seems to be repeating the same attributes over and over again.

And also this one http://pastebin.com/m2553f31
« Last Edit: October 31, 2008, 12:31:43 am by colinjones »

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Just realised that they aren't really duplicated attributes, there are 20 tracks in that folder, there are 20 performer and title attributes to match these in the folder id3 tag file. And therefore it has created 20 identical album and composer/writer attributes as these are common to all the tracks on that album... but.... not really sure that this is needed... surely only one album attribute is needed as it is an id3 tag file for the whole folder not the individual tracks. Each of those tracks also have their own album attribute anyway (actually, they are 2 identical ones for each track!)

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Seems that & is not an issue for UpdateMedia from what I can tell, doesn't trigger rescanning and appears in the web admin OK.

BTW, all these are for filename, I haven't been checking if there are any issues with other attributes using these characters...

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
segfaults for me on some special characters:
Code: [Select]
Core was generated by `/usr/pluto/bin/UpdateMedia -h localhost -U /mnt/upnp -d /home/public/data||/hom'.
Program terminated with signal 11, Segmentation fault.
#0  0x08089c61 in TagFileHandler::GetTagInfo (this=0x80f3bf0, sFilename=@0xb52debfc, mapAttributes=@0xb52debc0, listPictures=@0xb52ded44) at TagFileHandler.cpp:143
143 TagFileHandler.cpp: No such file or directory.
in TagFileHandler.cpp
(gdb) bt
#0  0x08089c61 in TagFileHandler::GetTagInfo (this=0x80f3bf0, sFilename=@0xb52debfc, mapAttributes=@0xb52debc0, listPictures=@0xb52ded44) at TagFileHandler.cpp:143
#1  0x0808a8d5 in TagFileHandler::LoadAttributes (this=0x80f3bf0, pPlutoMediaAttributes=0x80f3d60, listPicturesForTags=@0xb52ded44) at TagFileHandler.cpp:38
#2  0x0806e34e in PlutoMediaFile::LoadPlutoAttributes (this=0xb52ded3c) at PlutoMediaFile.cpp:1099
#3  0x08075146 in PlutoMediaFile (this=0xb52ded3c, pDatabase_pluto_media=0x80c5918, PK_Installation=78100, sDirectory=@0xb52dedc4, sFile=@0xb52dedc0, pFileHandler=0x80f3bf0) at PlutoMediaFile.cpp:105
#4  0x08063215 in UpdateMedia::ScanFiles (this=0xb52df368, sDirectory=@0xb52dee60) at UpdateMedia.cpp:519
#5  0x08063d07 in UpdateMedia::ReadDirectory (this=0xb52df368, sDirectory=@0xb52defe8) at UpdateMedia.cpp:260
#6  0x08064dae in UpdateMedia::ScanSubfolders (this=0xb52df368, sDirectory=@0xb52df054, folder_type=@0xb52df038) at UpdateMedia.cpp:680
#7  0x08063d7a in UpdateMedia::ReadDirectory (this=0xb52df368, sDirectory=@0xb52df1d8) at UpdateMedia.cpp:264
#8  0x08064dae in UpdateMedia::ScanSubfolders (this=0xb52df368, sDirectory=@0xb52df244, folder_type=@0xb52df228) at UpdateMedia.cpp:680
#9  0x08063d7a in UpdateMedia::ReadDirectory (this=0xb52df368, sDirectory=@0xb52df27c) at UpdateMedia.cpp:264
#10 0x0806767c in UpdateMedia::DoIt (this=0xb52df368) at UpdateMedia.cpp:234
#11 0x0805c0c5 in UpdateMediaThread () at Main.cpp:240
#12 0xb6e4046b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#13 0xb6c1473e in clone () from /lib/tls/i686/cmov/libc.so.6

will look at that if I find some spare time...

br Hari
rock your home - http://www.agocontrol.com home automation

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Thx Hari - let me know if I can provide any more info. Will continue experimenting in the meantime, just wanted to document what I had found so far.