mirror of
https://github.com/1Remote/1Remote.git
synced 2026-04-25 13:36:03 +03:00
[PR #999] [CLOSED] Fix resource quota issues by adding explicit UTF8 encoding to File.ReadAllText calls #933
Labels
No labels
area-configuration
area-ct-app
area-ct-rdp
area-ct-remoteapp
area-ct-ssh
area-ct-vnc
area-launcher
area-list
area-tags
area-teamwork
bug
chore
dependencies
general-build/ci
general-performance
general-refactor
general-security
general-supportive
general-ux
meta-documentation
meta-enhancement
meta-enhancement
meta-feature
meta-help-wanted
meta-unknown-error
priority-hi
priority-low
pull-request
question
resolution-duplicate
resolution-invalid
resolution-wontfix
stale
task-put-off
task-still-considering
task-working-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/1Remote#933
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/1Remote/1Remote/pull/999
Author: @Copilot
Created: 10/11/2025
Status: ❌ Closed
Base:
main← Head:copilot/debug-issue-996📝 Commits (2)
9064cf4Initial plan5f15cadFix resource quota issues by adding explicit UTF8 encoding to File.ReadAllText calls📊 Changes
9 files changed (+11 additions, -9 deletions)
View changed files
📝
Ui/Service/ConfigurationService.cs(+1 -1)📝
Ui/Service/DataSource/DataSourceService.cs(+1 -1)📝
Ui/Service/Locality/LocalityConnectRecorder.cs(+1 -1)📝
Ui/Service/Locality/LocalityListViewService.cs(+1 -1)📝
Ui/Service/Locality/LocalityService.cs(+1 -1)📝
Ui/Service/Locality/LocalityTagService.cs(+1 -1)📝
Ui/Service/Locality/LocalityTreeViewService.cs(+1 -1)📝
Ui/Utils/PRemoteM/PRemoteMTransferHelper.cs(+2 -1)📝
Ui/Utils/WindowsSdk/PasswordVaultManager/PasswordVaultManagerFileSystem.cs(+2 -1)📄 Description
Summary
This PR addresses issue #996 where users encounter "Not enough quota is available to process this command" errors when opening a second RDP session, even with large pagefiles configured.
Problem
The application was experiencing Windows system resource quota exhaustion, particularly when:
The error message
Nicht genügend Quoten verfügbar, um diesen Befehl zu verarbeiten(German: "Not enough quota available to process this command") indicated the application was consuming more system resources than expected.Root Cause
Investigation revealed that 9 files throughout the codebase were calling
File.ReadAllText()without specifying an encoding parameter:When encoding is not specified, the .NET runtime performs automatic encoding detection which:
Under resource pressure (especially when opening multiple RDP sessions), this additional overhead can contribute to exhausting Windows system quotas for handles, GDI objects, or memory.
Changes
Added explicit
Encoding.UTF8parameter to allFile.ReadAllText()calls in the following files:Ui/Utils/PRemoteM/PRemoteMTransferHelper.csUi/Service/Locality/LocalityConnectRecorder.csUi/Service/Locality/LocalityListViewService.csUi/Service/Locality/LocalityService.csUi/Service/Locality/LocalityTagService.csUi/Service/Locality/LocalityTreeViewService.csUi/Service/ConfigurationService.csUi/Service/DataSource/DataSourceService.csUi/Utils/WindowsSdk/PasswordVaultManager/PasswordVaultManagerFileSystem.csBenefits
Testing
This change should be tested by:
Fixes #996
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.