Skip to content

dokan unmount failed on windows7 #274

Description

@Pagliacii

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?

Activity

  1. Rondom commented on Sep 15, 2017

    @Rondom

    @Liryna Do you have a clue?

  2. Liryna commented on Sep 15, 2017

    @Liryna
    Contributor

    @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.

  3. Pagliacii commented on Sep 15, 2017

    @Pagliacii
    Author

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

  4. Liryna commented on Sep 15, 2017

    @Liryna
    Contributor

    @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

  5. Pagliacii commented on Sep 16, 2017

    @Pagliacii
    Author

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

  6. Rondom commented on Sep 16, 2017

    @Rondom

    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?

  7. Liryna commented on Sep 16, 2017

    @Liryna
    Contributor

    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.

  8. Pagliacii commented on Sep 18, 2017

    @Pagliacii
    Author

    @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'
  9. Pagliacii commented on Sep 22, 2017

    @Pagliacii
    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.

  10. Liryna commented on Sep 22, 2017

    @Liryna
    Contributor

    😢 would be interesting to know what is happening.

  11. Pagliacii commented on Sep 22, 2017

    @Pagliacii
    Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions