NullReferenceException when uploading large xml file
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 4.4k
- Fork
- 993
- Merge medio
- 9g 21h
- PR unite (30g)
- 1
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da Renci.SshNet.SftpClient.InternalUploadFile, usando lo stack trace fornito come punto di ingresso. Riproduci un caricamento XML di grandi dimensioni tramite task sul server e confrontalo con file piccoli ed esecuzioni locali; il lavoro è concluso quando la causa del caricamento incompleto e della NullReferenceException è stata identificata ed è disponibile una correzione verificata o una copertura di regressione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- networking
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100