Skip to content

After exiting NVDA, some DLLs under lib64 are still being used by other processes #15884

@hwf1324

Description

@hwf1324

This problem seems to have been around for a long time. For users who use portable versions on USB drives, it is very frustrating to be told that files are in use whenever they want to safely eject the USB drive

Steps to reproduce:

  1. scons dist
  2. Do something to make SCons trigger a rebuild of dist, for example scons -c.
  3. scons dist

Or

Create a portable version, then run it and exit, then delete the directory where the portable version is located

Actual behavior:

py2exe cannot replace files when rebuilding the dist target

Add resource PYTHONSCRIPT/1(11153 bytes) to ../dist\nvda_slave.exe
Traceback (most recent call last):
  File "D:\NVDA\nvda\source\setup.py", line 151, in <module>
    freeze(
  File "D:\NVDA\nvda\.venv\Lib\site-packages\py2exe\__init__.py", line 197, in freeze
    builder.build()
  File "D:\NVDA\nvda\.venv\Lib\site-packages\py2exe\runtime.py", line 250, in build
    self.build_exe(target, exe_path, options.libname)
  File "D:\NVDA\nvda\.venv\Lib\site-packages\py2exe\runtime.py", line 380, in build_exe
    with UpdateResources(exe_path, delete_existing=False) as res_writer:
  File "C:\Program Files (x86)\Python311-32\Lib\contextlib.py", line 144, in __exit__
    next(self.gen)
  File "D:\NVDA\nvda\.venv\Lib\site-packages\py2exe\resources.py", line 23, in UpdateResources
    _wapi.EndUpdateResourceW(hrscr, False)
  File "D:\NVDA\nvda\.venv\Lib\site-packages\py2exe\_wapi.py", line 10, in BOOL_errcheck
    raise WinError()
OSError: [WinError 110] 系统无法打开指定的设备或文件。

Unable to delete the directory where the portable version is located. Possible use case is unable to safely eject the USB drive.

Expected behavior:

Can complete the operation on the NVDA directory in a timely manner

NVDA logs, crash dumps and other attachments:

System configuration

NVDA installed/portable/running from source:

NVDA version:

Windows version:

Name and version of other software in use when reproducing the issue:

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Yes, but it is meaningless for this issue

Have you tried any other versions of NVDA? If so, please report their behaviors.

If NVDA add-ons are disabled, is your problem still occurring?

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-technical-investigationA technical investigation is required to progress the issue.p4https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#prioritytriagedHas been triaged, issue is waiting for implementation.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions