Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dokan unmount failed on windows7 #274

Open
Pagliacii opened this issue Sep 15, 2017 · 11 comments
Open

dokan unmount failed on windows7 #274

Pagliacii opened this issue Sep 15, 2017 · 11 comments

Comments

@Pagliacii
Copy link

Pagliacii commented Sep 15, 2017

OS: windows7 x64
Python: 2.7(32bit)
Pyfilesystem: 0.5.5a1
Dokan: 1.0.3 x64

>>> from fs.expose import dokan
>>> from fs.memoryfs import MemoryFS
>>> memfs = MemoryFS()
>>> dokan.mount(memfs, 'Q:\\')
<fs.expose.dokan.MountProcess object at 0x02784350>
>>> dokan.unmount('Q:\\')
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "C:\Python27\lib\site-packages\fs\expose\dokan\__init__.py", line 1107, in _do_mount
    mount(fs, path, **opts)
  File "C:\Python27\lib\site-packages\fs\expose\dokan\__init__.py", line 1009, in mount
    res = libdokan.DokanMain(ctypes.byref(opts), ctypes.byref(opstruct))
WindowsError: exception: access violation reading 0x0000004A
>>>

Anything wrong?

@Rondom
Copy link

Rondom commented Sep 15, 2017

@Liryna Do you have a clue?

@Liryna
Copy link
Contributor

Liryna commented Sep 15, 2017

@Pagliacii @Rondom need to see if the correct dokan1.dll x86 is used since python 32bit is used here.
I used the same code and never faced this 😢
otherwise would need more log to see what is happening.

@Pagliacii
Copy link
Author

The dokan x86 could not be installed on x64 PC.
When I use dokan.unmount in python 64 bit, it worked correctly.

@Liryna
Copy link
Contributor

Liryna commented Sep 15, 2017

@Pagliacii Good to know it worked !
In case of, the x86 dokan1.dll is in the x64 package under the folder C:\Program Files\Dokan\ x86

@Pagliacii
Copy link
Author

@Liryna Okay, I will try it next Monday! Thanks for your help!

@Rondom
Copy link

Rondom commented Sep 16, 2017

But then things should either work when it finds the DLL or not work when it does not find the DLL. If it crashes, it is a bug, isn't it?

@Liryna
Copy link
Contributor

Liryna commented Sep 16, 2017

DLL has to be a side to side to the python project.

If it does not find it, there is an error at the start.
If a dll is found x86 / x64, it will run. But if a different arch (python / dll) is used, you will get a crash at a moment.

I do not know if there is a way for python to tell if the dll is x86 or x64 before to load it.

@Pagliacii
Copy link
Author

Pagliacii commented Sep 18, 2017

@Liryna
How could I tell the python 32bit to find the x86 dokan1.dll? By the environment variable DokanLibrary1?

In my computer, I try to set the DokanLibrary1 as 'C:\Program Files\Dokan\x86', but it raised the windows error again.

And it could work correctly in python 64 bit.

>>> os.environ['DokanLibrary1']
'C:\\Program Files\\Dokan\\x86'

@Pagliacii
Copy link
Author

@Liryna
The access violation reading error happened when I try to unmount the virtual disk on python 32 bit with the x86 dokan1.dll in win7 x86.

I don't have another x86 pc to test the unmount, so I not sure that something wrong in x86 dokan1.dll.

@Liryna
Copy link
Contributor

Liryna commented Sep 22, 2017

😢 would be interesting to know what is happening.

@Pagliacii
Copy link
Author

I'm not familiar with the ctypes module, so I don't have any idea.

@Pagliacii Pagliacii reopened this Sep 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants