Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

NullReferenceException when uploading large xml file

オープン
#1,759 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
csharp
領域
networking

調査の方向性

Renci.SshNet.SftpClient.InternalUploadFile から開始し、提供されたスタックトレースを入口として使用します。サーバー上のタスクを通じた大きな XML アップロードを再現し、小さなファイルおよびローカル実行の場合と比較します。不完全なアップロードと NullReferenceException の原因が特定され、検証済みの修正またはリグレッションカバレッジが利用可能になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Renci.SshNet.SftpClient.InternalUploadFile(Stream input, String path, Flags flags, SftpUploadAsyncResult asyncResult, Action`1 uploadCallback)
--below is our internal stack
at ....UploadFile(Stream input, String path)
at ......Common.Ftp.SftpClient.Upload(Byte[] buffer, String fileName, String remoteFolder, Boolean useDefaultRemoteFolder, Boolean usePassive)
at ......Common.Ftp.FtpService.UploadFileToSftp(Byte[] file, String remotePath, String fileName)
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait(TimeSpan timeout)
at

Hi

When we try to upload large xml file through tasks in our server, NullReferenceException pops up and made the uploaded file incomplete. The file indeed was uploaded, but it was broken and missed half of the file content.

This issue can not be reproduced in our dev local and only occurred in server, also it won't happen for small xml files(with same encoding and path)

SSH version we used in our company here is 2020.0.2

Could you pls advise what's the possible root cause for it since we could get further callstack details for it

主要言語
C#
スター
4.4k
フォーク
990
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sshnet/SSH.NET のほかの issue

sshnet/SSH.NET の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。