Crash on scan

bossanova808

11-03-2010 21:12:27

Upgraded from a7 and now I get a crash whenever I hit scan:

Description:
Stopped working

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: tvrename.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 4b9777cd
Problem Signature 04: mscorlib
Problem Signature 05: 2.0.0.0
Problem Signature 06: 4a275af7
Problem Signature 07: 3604
Problem Signature 08: 17
Problem Signature 09: System.IO.PathTooLongException
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 3081

I am not sure where this is occurring, is there a log file I can provide you with?

This is an example of the pathnames in question:
Y:\TV\2 Watched TV\Dexter\Season 04\Dexter - S04E12 - The Getaway.mkv

sstteevvee

11-03-2010 23:25:31

The problem is that the path/filename somewhere in all the directories it is scanning (either media library, or "search folders") is too long, e.g.: "c:\blah\blah\blah\blah\filename.avi", where "too long" is 247 characters for the pathname (the c:\blah\blah\blah bit), or 256 characters for the whole lot.

I put a few checks into TVRename so that it would warn you when it hit one of these, though obviously it is having a problem somewhere else.

When it is doing the scan, the progress dialog that comes up has four lots of progress bars. Can you see which one it is on just before it fails?

If it is "Media Library Check", then the problem is probably in your media library. If it is "Search Locally", then it is in your "search folders".

One thing to try is go to the base media library or search folder in windows explorer, open the folder tree if it isn't already (View > Explorer Bar > Folders) click on the folder, then press "*" on the number pad (not shift-8). This will expand every folder from there down. Once it is done, scroll down the folder tree, and look for anything super-deep.

Another thing TVRename is supposed to do is give more helpful information when it crashes.. That might have been broken with the big changes I made to the code for this version.

One thing to try is a right click on individual shows and choose "scan" to check them one-by-one. See if it is a particular show that has the problem (check that show's folder for crazy filenames/paths), or all of them (check the "search folders").

If you have lots of shows, do the above for a couple (check it isn't the "scan folders" at fault), then you can remove half of them from the "My Shows" list, and then try a scan. If it fails, the problem is in what is left. Restart, remove the original half and another half of what is left, and repeat. If it passes ok, the problem must be in that first half removed, so restart, keep the original half this time, and remove half of those, and repeat.

You could also try temporarily removing some/all of your scan folders, so TVRename is only doing the media library check. i.e., the idea is to narrow the cause of the problem down to one specific folder or thing.

I'll see if I can find anywhere else in TVRename's code that'll benefit from path name length checking, and why the error catching isn't working right. I probably won't have a chance for the next couple of weeks, though.

That's enough of a ramble for now.. Let me know how you go.

bossanova808

12-03-2010 11:19:53

It's the Media Library Check.

I do definitely have some long names (multi episode files) but the previous version worked fine for these (inded it was the thing that renamed them to the very long names by putting all the episode titles in).

Is the 256 char limit necessary? That is, it's pretty common for paths to exceed this, especially with network shares and the like (I run TVRename on a laptop, my library is on a DroboPro connected to our home server).

The previous version was fine, I might just revert until you fix this.

sstteevvee

12-03-2010 14:07:08

The name length limit is imposed by the Windows operating system, though I think there is a way around it.. Maybe. :P

I'll go over the media library scan code soon, and see where it might be happening, and put some further checks in to at least warn where/why it is happening.

neo_x

30-05-2010 01:35:34

HI There

I am having the exact same bug ( crash on media library check). Since a possible solution was indicated above, i did a patch length check on my files as follows:
open cmd
change to drive/folder where my series is located
dir /b /s /a-d > j:\series.txt

this produced a text file with a list of all my series
I then opened the text file in excel. i then added a column/formula ( len(A1) ) which allowed me to check the length of each of the strings.
unfortunately, the largest path is 215 characters
(J:\series2\S\Sherlock Holmes 1984 The Adventures of Sherlock Holmes\Sherlock Holmes 1984 The Adventures of Sherlock Holmes season 2\Sherlock Holmes 1984 The Adventures of Sherlock Holmes 1x01.dvdrip.xvid-nodlabs.avi)
Is there anything else i can assist to generate/locate the issue?
strange part is - i am busy reinstalling/relinking my tv-rename database. A scan was successful this morning when i didn't have any rules in my show list. The scan then revealed files with double episodes (which means i had to add merge rules to match). After adding these merge rules, the scan resulted in the error below. This means one of the merge rules probably cause the issue - but which one i dunno.

Awaiting your assistance

Neo

Description:
Stopped working

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: tvrename.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 4bdd21be
Problem Signature 04: mscorlib
Problem Signature 05: 2.0.0.0
Problem Signature 06: 4a27471d
Problem Signature 07: 3657
Problem Signature 08: 17
Problem Signature 09: System.IO.PathTooLongException
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 1033




*********************

Hmmm mebe it helps to post/write down your problem, and then to analyze it... :)
a merge rule ( 4 episodes) was the cause.
resulting name - ie the target file name that it will be renamed to would have been:
J:\series2\A\Avatar The last airbender\Avatar The last airbender season 3\Avatar- The Last Airbender - 3x18-3x21 - The Phoenix King (Sozin's Comet - 1/4) + The Old Masters (Sozin's Comet - 2/4) + Into the Inferno (Sozin's Comet - 3/4) + Avatar Aang (Sozin's Comet - 4/4)
that is 272 characters. Added to the ignore list for now.. :D

DedTV

31-05-2010 18:28:54

Yeah. I get the same problem a lot with DVD ISOs which can have numerous episodes which, when merged almost always cause a crash because of too long a name.

I've gotten into the habit of defining the name of anything more than 2 episodes, or shows with really long names manually using the "New Name" box. For example if it's a DVD ISO or Animaniacs episode with 6 episodes I put DVD or Multiple Episodes in the box to override the automatic naming to avoid having to ignore episodes or drop using names on all my single episode files. Keeps things working for now and should a way of handling them better be implemented in the future, it'll be easy to use search and replace in the Settings file to remove the custom names.

whiztler

03-06-2010 18:14:34

Have you tried doing a "Force Refresh"? > from the MyShows tab, right-click on the show that crashes the scan and select "Force Refresh". Do this before or during the background scan/update.

Works most of the time with an incorrect TVDB download.

Hope this helps.