Rambalac / ACDDokanNet

Dokan.NET based driver for Amazon Cloud Drive
MIT License
185 stars 13 forks source link

Object reference not set to an instance of an object. #40

Open andrei-cst opened 7 years ago

andrei-cst commented 7 years ago

Hello Rambalac,

First of all, congratulations on this initiative - it is a very useful project. I have been successfully using an older version of the ACDDokanNet software on a Windows 7 machine so far and it runs great.

However, I also wanted to use it on an Amazon EC2 instance running Windows Server 2012 R2, and after installing the latest Dokany 1.0.1.1000 and ACDDokanNet 1.6.2, and trying to mount the Amazon Drive, after the browser logon step I get the following error:

"Object reference not set to an instance of an object."

Here's a detailed description from the Event Viewer log:

MountButton_Click: System.NullReferenceException: Object reference not set to an instance of an object.
   at Azi.Cloud.DokanNet.Gui.CloudMount.<>c__DisplayClass54_0.<Mount>b__1()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azi.Cloud.DokanNet.Gui.CloudMount.<Mount>d__54.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azi.Cloud.DokanNet.Gui.CloudMount.<MountAsync>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azi.Cloud.DokanNet.Gui.CloudItemControl.<MountButton_Click>d__4.MoveNext()

H:\Projects\C#\ACDDokanNet\ACD.DokanNet.Gui\CloudItemControl.xaml.cs: 33

Also, the OneDrive mount button gives another error, referring to Microsoft.OneDrive.Sdk. You can see it in the attached screenshots.

11 22

DETAILED MACHINE INFO:

OS Name Microsoft Windows Server 2012 R2 Standard
Version 6.3.9600 Build 9600
Other OS Description    Not Available
OS Manufacturer Microsoft Corporation
System Name WIN-UUIUKNDLJ9T
System Manufacturer Xen
System Model    HVM domU
System Type x64-based PC
System SKU  
Processor   Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz, 2500 Mhz, 1 Core(s), 1 Logical Processor(s)
BIOS Version/Date   Xen 4.2.amazon, 11/11/2016
SMBIOS Version  2.4
Embedded Controller Version 255.255
BIOS Mode   Legacy
Platform Role   Desktop
Secure Boot State   Unsupported
PCR7 Configuration  Not Available
Windows Directory   C:\Windows
System Directory    C:\Windows\system32
Boot Device \Device\HarddiskVolume1
Locale  Japan
Hardware Abstraction Layer  Version = "6.3.9600.17196"
User Name   Not Available
Time Zone   GTB Standard Time
Installed Physical Memory (RAM) 1.00 GB
Total Physical Memory   1.00 GB
Available Physical Memory   119 MB
Total Virtual Memory    3.05 GB
Available Virtual Memory    1.56 GB
Page File Space 2.05 GB
Page File   C:\pagefile.sys
A hypervisor has been detected. Features required for Hyper-V will not be displayed.

I wish you all the best and please continue to improve the code :) Andrei

andrei-cst commented 7 years ago

Hello again,

I managed to fix the "Object reference not set to an instance of an object." error accidentally by installing the Dokan Library 0.8.0 aside the 1.0.1.1000, because in your instructions you said it's needed for ACDDokanNet versions before 1.6.0. I wanted to install version 1.5.5 so I uninstalled the 1.6.2 but then after downloading the 1.5.5 I decided to retry with the 1.6.2, and it worked :D

Still, the OneDrive error remains. Also, when trying to delete it, the Settings program crashes.

Have a good day, Andrei

Rambalac commented 7 years ago

I uploaded v1.6.3. Could you try it?

andrei-cst commented 7 years ago

Yes, will do. I'll return with new feedback soon.

Thanks, Andrei

andrei-cst commented 7 years ago

Oh, tried it and it's really improved the upload and download speeds! Wow! Now it almost really works like an actual drive. This is when copying a setup folder for Photoshop with lots of files of different sizes:

screenshot

After that it sped up around 3-4x so ~12-15 MB/s. Not bad!

The OneDrive mount still didn't work for me, now it just says Authentication failed (doesn't open a browser tab like the Amazon drive does). But the deletion crash does not happen, that one's gone :)

screenshot001

Have a good day, Andrei

byte4geek commented 7 years ago

Hi, i have this error too with rel 1.6.3 when i try to mount ACD or OneDrive is the same.

Rambalac commented 7 years ago

The only reason of Object reference not set to an instance of an object during mount I found is wrong or missing Dokan library. I will add version check and warning message.

Rambalac commented 7 years ago

I added check for Dokan so at least app should show warning message on startup. Try 1.6.4

byte4geek commented 7 years ago

Hi, i have installed ACDDokanNet 1.6.4 to solve "Object reference not set to an instance of an object", this version (1.6.4) ask to me "Please install Dokan 1.0.1 to use this application" but i already have this installed on my PC. i tried to uninstall and reinstall Dokan 1.0.1.100 without result. How can i solve this?