Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1562

Handle MemoryError in get_open_files()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0.4
    • Fix Version/s: 4.1.0
    • Component/s: Lock / Autolock
    • Environment:
      Windows

      Description

      get_open_files() is used by the AutoLocker to find files currently opended on the OS. We use it to lock/unlock documents on the server while DirectEditing.

      But if the user does not have enough access rights to some file, the whole function will throw such error:

      MemoryError: null
        File "nxdrive\autolocker.py", line 57, in _poll
        File "nxdrive\autolocker.py", line 70, in _process
        File "nxdrive\autolocker.py", line 124, in get_open_files
        File "__init__.py", line 1137, in open_files
        File "lib\site-packages\psutil\_pswindows.py", line 635, in wrapper
        File "lib\site-packages\psutil\_pswindows.py", line 905, in open_files
      

      For information, the process in error is psutil.Process(pid=404, name='chrome.exe', started='18:45:29').

      The fix is quite simple: suppress those errors.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes
                15m