guiters / win-sshfs

Automatically exported from code.google.com/p/win-sshfs
0 stars 0 forks source link

Microsoft .NET Framework throwing "Unhandled exception ... Unexpected end of file" #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Launch Win-SSHFS

What is the expected output? What do you see instead?
Win-SSHFS should quietly start running in the notification area.  Instead, a 
windows titled "Microsoft .NET Framework" pops up with an error message:

"Unhandled exception has occurred in your application. If you click Continue, 
the application will ignore this error and attempt to continue. If you click 
Quit, the application will close immediately.

Unexpected end of file."

I you click on Details, it reads:

"See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Xml.XmlException: Unexpected end of file.
   at System.Xml.EncodingStreamWrapper.ReadBOMEncoding(Boolean notOutOfBand)
   at System.Xml.EncodingStreamWrapper..ctor(Stream stream, Encoding encoding)
   at System.Xml.XmlUTF8TextReader.SetInput(Stream stream, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose)
   at System.Runtime.Serialization.XmlObjectSerializer.ReadObject(Stream stream)
   at Sshfs.Utilities.Load[T](List`1 list, String file)
   at Sshfs.MainForm.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.239 (RTMGDR.030319-2300)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Sshfs
    Assembly Version: 0.0.1.4
    Win32 Version: 0.0.1.4
    CodeBase: file:///C:/Program%20Files%20(x86)/win-sshfs/Sshfs.exe
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.258 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.235 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.276 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Serialization
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
SMDiagnostics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/SMDiagnostics/v4.0_4.0.0.0__b77a5c561934e089/SMDiagnostics.dll
----------------------------------------
System.Runtime.DurableInstancing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.DurableInstancing/v4.0_4.0.0.0__31bf3856ad364e35/System.Runtime.DurableInstancing.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."

If you click Continue, Win-SSHFS seems to still be running fine, until you try 
"Show Manager".  If you do, nothing happens.  The mount manager doesn't show up.

What version of the product are you using?

win-sshfs: 0.0.1.4
Client OS: Windows 7 Enterprise 64-bit
Server OS: n/a
Ssh server: n/a

Please provide any additional information below.

This version of Win-SSHFS was working great for me until today.  I'm not sure 
if some Windows 7 patch broke it.

Original issue reported on code.google.com by david.du...@gmail.com on 3 May 2012 at 9:19

GoogleCodeExporter commented 8 years ago
From what I see it seems that settings file that is used to store drive to be 
broken.
It's named config.xml and it's stored in some cryptic named folder in 
http://msdn.microsoft.com/en-us/library/3ak841sy.aspx#isolated_storage_locations
.
You can delete it or send it to me then see if app starts running fine.

Original comment by mladenov...@gmail.com on 4 May 2012 at 7:42

GoogleCodeExporter commented 8 years ago
Interestingly enough, it was a zero-byte file.  After a couple of reboots, 
Win-SSHFS launched without the error.  Show Manager worked, although it had no 
configuration information.  I rebuilt the configuration, and now it seems to be 
working fine.

Original comment by david.du...@gmail.com on 4 May 2012 at 2:47

GoogleCodeExporter commented 8 years ago
This keeps happening on my machine after I reboot, even when I don't use 
Win-SSHFS. The config.xml file ends up being zero bytes.

Original comment by david.du...@gmail.com on 11 May 2012 at 3:02

GoogleCodeExporter commented 8 years ago
Can you config the drives, exit the win-sshfs and start it again to see if they 
are there.

Original comment by mladenov...@gmail.com on 11 May 2012 at 6:14

GoogleCodeExporter commented 8 years ago
I exited Win-SSHFS, started it up again, and opened the manager.  The 
configured drives are still there.

Original comment by david.du...@gmail.com on 11 May 2012 at 6:18

GoogleCodeExporter commented 8 years ago
Try to exit win-sshfs manually and then restart the computer.

Original comment by mladenov...@gmail.com on 11 May 2012 at 7:41

GoogleCodeExporter commented 8 years ago
That seems to have done the trick.

Still, that's a bug, since most users expect that they can close Windows 
without explicitly closing their programs.

Original comment by david.du...@gmail.com on 14 May 2012 at 2:19

GoogleCodeExporter commented 8 years ago
Because I'm doing serialization(saving ) of drives at app exit it seems that 
Windows closes the app before it does it. Do you shutdown normally or force 
power off.

Original comment by mladenov...@gmail.com on 14 May 2012 at 4:38

GoogleCodeExporter commented 8 years ago
I do Start - Shutdown.

Original comment by david.du...@gmail.com on 14 May 2012 at 5:15

GoogleCodeExporter commented 8 years ago
I couldn't reproduce the problem ,but I did some changes. Can you test it for 
me. If the problem persists send me the log file that is located in same folder.

Original comment by mladenov...@gmail.com on 15 May 2012 at 5:07

Attachments:

GoogleCodeExporter commented 8 years ago
Do all those files go in c:\Program Files (x86)\win-sshfs?

Original comment by david.du...@gmail.com on 15 May 2012 at 5:35

GoogleCodeExporter commented 8 years ago
Any folder would be sufficient.

Original comment by mladenov...@gmail.com on 15 May 2012 at 5:37

GoogleCodeExporter commented 8 years ago
That seems to have worked.

Original comment by david.du...@gmail.com on 15 May 2012 at 6:18

GoogleCodeExporter commented 8 years ago
Thanks for all your work, by the way.  After being spoiled with FUSE on Linux 
and Mac, I'd been waiting for a good SSHFS implementatiuon on Windows.

Original comment by david.du...@gmail.com on 15 May 2012 at 6:19

GoogleCodeExporter commented 8 years ago

Original comment by mladenov...@gmail.com on 28 May 2012 at 5:39

GoogleCodeExporter commented 8 years ago
I had this ssame problem, downloaded s_test.rar and now looking everything 
fine, thanks

Original comment by habrsto on 5 Jun 2012 at 9:19

GoogleCodeExporter commented 8 years ago
Same issue here but with version 0.0.1.5:
After unzipping the s_test.rar to a different folder than the install folder it 
works fine; unzipping it into the install folder did not work. 

Original comment by mburk...@gmail.com on 26 Oct 2012 at 3:41

GoogleCodeExporter commented 8 years ago
I'm having this problem and can't find config.xml 
...anywhere in the storage locations indicated by the web link...or anywhere on 
my computer (64 bit Win7 pro).

exiting/restarting/reinstalling does no good. version 0.0.1.5 according to the 
installer.  I can't get the manager to run enough to pull a version from it.

Original comment by rfoxke...@gmail.com on 7 Mar 2013 at 1:16

GoogleCodeExporter commented 8 years ago
Experienced the same problem over the last few days after months of 
uninterrupted functioning. I was unable to locate an appropriate config.xml 
file. Uninstall/reinstall did not work, even ran a repair on .Net to no avail.

I then installed it in a new directory and it worked. I'm not sure what the 
cause is, because a full uninstall removes the directory as well.

Windows 7 Enterprise (32-bit).

Original comment by oculus.h...@gmail.com on 7 Mar 2013 at 3:47

GoogleCodeExporter commented 8 years ago
I just had this problem as well, same as above: config.xml isn't where it's 
supposed to be according to this thread, reinstallation didn't help. Thanks to 
this tip here, I reinstalled in a different location, which got it fixed... 
Still, this needs to be fixed imho.

Reading settings from a file should always be considered unsafe and exceptions 
properly catched. Even if a small popup told me that my settings were corrupted 
and couldn't be read (with the program just starting "blank") it'd have been a 
lot better than just being unable to start the program until I finally found 
this issue.

Original comment by jannis.u...@stoppe.de on 2 Apr 2013 at 8:33

GoogleCodeExporter commented 8 years ago
For those hoping to get on with their lives, here are the steps I took to stop 
the failure on Windoze 7:

1. Download latest win-sshfs from 
http://code.google.com/p/win-sshfs/downloads/list.
2. Run the installer and De-install win-sshfs.
3. Delete folder C:\Program Files\win-sshfs if it still exists.
4. Make sure C:\Users\MyUser\AppData\Local\IsolatedStorage contains only one 
folder with 
   some random-crap name, then delete C:\Users\MyUser\AppData\Local\IsolatedStorage.
5. Restart, just because.
6. Run the installer again.  It shouldn't give you the option to Re/Un-install, 
   it should just install.
7. Restart, just because.
8. Reconfigure all the disks because the will all be GONE!

If the steps are different for your version of 'doze then please share them.

Hopefully this bug can be actually fixed before the Issue is closed next time.  
Otherwise, I have found this program to be a wonderful alternative to the 
problem of our companies poorly managed Samba services.

Original comment by bpo...@gmail.com on 25 Apr 2013 at 6:57

GoogleCodeExporter commented 8 years ago
I had this same problem consistently on reboot.  Killing the application and 
deleting IsolatedStorage always worked but I had to re-add mappings.

I was able to fix this problem for myself by updating the code to dispose 
isolated storage on each use rather than holding it in a static.  Patch and 
updated binaries attached.

Original comment by jay.mil...@gmail.com on 28 May 2013 at 10:19

GoogleCodeExporter commented 8 years ago
Hmm...attachment failed.  Trying again.

Original comment by jay.mil...@gmail.com on 28 May 2013 at 10:20

Attachments:

GoogleCodeExporter commented 8 years ago
I'm having the same problem... any way to help you to fix it?

Original comment by pippo1...@gmail.com on 10 Jun 2013 at 11:22

GoogleCodeExporter commented 8 years ago
Had same problem after at least a year of no problem. Followed above advise - 
install it in a diff directory than default - re-do config - works just fine. 
Thank you all for helping!

Original comment by parthiv....@gmail.com on 19 Aug 2013 at 6:27

GoogleCodeExporter commented 8 years ago
renaming config.xml from isolatedstorage helped.

Original comment by kari.ras...@gmail.com on 3 Oct 2013 at 9:43

GoogleCodeExporter commented 8 years ago
Simply deleting config.xml will get win-sshfs working again.  You will have to 
setup each of your mapped "drives" again as that information is kept in 
comfig.xml.  

Using windows explorer navigate to c:\Users\[your user name]\AppData
Then using the search box in the upper right corner of explorer search for 
config.xml.  Likely several will pop up in the results as this is a common file 
name.  The one you are looking for will be 0 bytes in size.  Right click on 
that file and delete it.  Now win-sshfs should start normally.  Reconfigure the 
drives and your good to go.

The corruption issue seems to be related to windows sleep mode.  For the sake 
of stability, I tell my people to just assume that win-sshfs has lost it's 
connection and shut it down.  Then reopen it and remount the drive.  If you try 
to access a previously mounted drive after windows has resumed from sleep, 
win-sshfs can crash and if that happens then the config.xml can be corrupted.  

Also, sleep mode can cause a BSOD in Dokan.  

Original comment by BroknDo...@gmail.com on 30 Oct 2013 at 3:47

GoogleCodeExporter commented 8 years ago
I was also hit by the 'System.Xml.XmlException: Unexpected end of file' issue, 
but could not find any zero-byte config.xml file. Reinstalling to a different 
directory, plus an extra reboot, worked, though.

I think it was running "windows update" that triggered the issue for me. It was 
the only thing I did between the success and the failure. My suggestion is to 
run "windows update" after having installed the dot net framework and just 
before installing win-sshfs.

Original comment by trond.me...@gmail.com on 6 Apr 2014 at 10:42

GoogleCodeExporter commented 8 years ago
The config.xml is located at:

%appdata%\..\Local\IsolatedStorage\<random>\<random>\<random>\AssemFiles\config.
xml

Original comment by ckuetb...@gmail.com on 12 May 2014 at 11:21

GoogleCodeExporter commented 8 years ago
Old one I know, but the issue here is that config.xml is only saved on exit of 
win-sshfs. So adding all configurations then exiting once cleanly will ensure 
the file is present.

Original comment by jlbon...@gmail.com on 13 Oct 2014 at 9:59

GoogleCodeExporter commented 8 years ago
guys, I had the same problem
follow tips #19
I installed it in a new directory and it worked

Original comment by joyce07...@gmail.com on 18 Apr 2015 at 7:12

GoogleCodeExporter commented 8 years ago
The fix for this would be to actually save the file to disk when the save 
button is clicked, instead of on program exit.

Original comment by detjames...@gmail.com on 14 May 2015 at 11:55