moving files from network computer

farfromrefuge

09-08-2009 02:38:33

Hi,

I just installed 2.2.0alpha2. First it doesnt hang up anymore when downloading infos
Now i have problems when moving files.

I have a problems on a network computer:
I have a computer holding the hard drives. It s only aim is to run utorrent and the tv shows files.
If i use tvrename on that computer everything work fine.
Now i tried to launch tvrename on my htpc because it s easier. But when i try to move files
the file progress window opens and i get an Unhandled exception:
Object must be a root directory ("C:\") or a drive letter ("C").

ONe thing i should mention is that the tvrenametemp file is created and if i keep on clicking on continue the file keep on being moved. But at the end the error window wont stop coming back and the file wont lose its temp extension until i click quit. Then Tvrename will be closed and the file will get renamed correctly.

Now i would like it to work for a network computer as it is easier to manage. Also i would like to see how much my network computer processor is used when moving to see if i can do it from the network, or if i should stick to vnc to do it locally.

Thanks a lot

Martin

pzam

09-08-2009 10:09:22

Here are 2 things i found googleing that error it may be a space check on a drive problem in the code that needs fixed. I use this on lan and use mapped drives for the shares and it seems to work ok.


----------------------------------------------
The following returns an error "Object must be a root directory("C:\")
or a drive letter ("C"):

Dim di As System.IO.DriveInfo = New System.IO.DriveInfo("\\SERVER01\C
$")
Dim totalspace As Long = di.TotalSize

--------------------------------------------------

The Remarks section for the DriveInfo constructor says:

The drive name must be either an uppercase or lowercase letter from 'a' to 'z'. You cannot use this method to obtain information on drive names that are nullNothingnullptra null reference (Nothing in Visual Basic) or use UNC (\server\share) paths.

I was able to make it work by mapping a network drive in Windows Explorer. That is, I mapped "\server\share" to drive Z, and then DriveInfo("Z:\\"); gave me what I expected.

Unfortunately, there's no simple way to map a network drive from C#. You'll either have to execute an external command (i.e. "net use z: \server\share"), or call the Windows WNetAddConnection2 API function to do it. Either way you go, you'll need to remove the drive mapping when you're done.

sstteevvee

13-08-2009 19:48:38

That's strange, as I'm already doing checks to make sure it doesn't try and do the free-space check on network shared (rather than drive letters). I'll put some extra checks into the next version, and hopefully that'll stop it happening.

When you get the unhandled exception report, is there any extra information about what line/function in the program has caused it?

farfromrefuge

15-08-2009 07:23:06

No i dont have anymore info.

farfromrefuge

16-08-2009 23:52:24

I saw you made modification in the moving process.
I just wanted to let you know that it still doesnt work i have the same error.
here is the message
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: Object must be a root directory ("C:\") or a drive letter ("C").
at System.IO.DriveInfo..ctor(String driveName)
at TVRename.CopyMoveProgress.copyTimer_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
TVRename
Assembly Version: 1.0.0.0
Win32 Version:
CodeBase: file:///C:/Program%20Files%20(x86)/TVRename/TVRename.exe
----------------------------------------
msvcm90
Assembly Version: 9.0.30729.4918
Win32 Version: 9.00.30729.4918
CodeBase: file:///C:/Windows/WinSxS/x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4918_none_508da958bcbd2845/msvcm90.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Deployment
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.mshtml
Assembly Version: 7.0.3300.0
Win32 Version: 7.0.3300.0
CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
Ionic.Utils.Zip
Assembly Version: 1.5.2.1
Win32 Version: 1.5.2.1
CodeBase: file:///C:/Program%20Files%20(x86)/TVRename/Ionic.Utils.Zip.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


farfromrefuge

16-08-2009 23:57:21

Wanted to add that even though i see that error windows, it keeps copying in the background.

sstteevvee

22-08-2009 10:26:52

Can you please do a "Help->Bug Report", turn on just the "Settings files" checkbox at the bottom, hit "Create" then copy+paste the result in a PM to me here, or email to tvrename[at]tvrename.com. Hopefully that'll give me some clues to figure out what's going on.

ScoopD

22-08-2009 17:15:01

I can confirm that I am getting this too. I tested all the different parts of the "Do Checked" and it only happens on "Downloads" and "Copy/Move".

Source is Local and Internet (for pics) & destination is UNC path using an IP address.

As stated, the process continues to work in the background, but only for "Copy/Move" - the "Downloads" just hangs and you have to repeatedly click the Continue button for the program to eventually come back.

I am assuming that Copy/Move is a separate process that is kicked off? It's much quicker now, by the way. :)

Sending you a PM with my settings

*Edit* e-mail instead - PM can't deal with that many characters.

sstteevvee

04-09-2009 11:57:55

Thanks for the email. I'm still baffled as to why it is happening, as I'm checking to make sure it isn't a UNC path before I do the free space stuff. Anyway, give this version a go to see if it stops it: 2.2.0a5.

All I've done for now is catch the error so it doesn't pop up a dialog, rather than "fix" it, but it should now at least get the job done without nagging.

ScoopD

04-09-2009 16:46:42

All I've done for now is catch the error so it doesn't pop up a dialog, rather than "fix" it, but it should now at least get the job done without nagging.

The old "Try ... Catch" saves us again. Just put that into some code I was writing this morning as the users were complaining about errors that I could not reproduce.

Seems to have "Fixed" the problem. Thanks again for all your work mate.