miroslavpejic85/p2p

Index was outside the bounds of the array.

basemind opened this issue · 2 comments

Hi, first of all, thanks for making this beautiful project open source. Everything works fine but after a long desktop connection, i get this error:
Receive Streaming: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at QuickLZ.Decompress(Byte[] source) in C:\myworkspace\vs2022\p2p\p2pconn\StreamingDesktop\QuickLZ.cs:line 293
at p2pcopy.SenderReceiver.Run(Object conn) in C:\myworkspace\vs2022\p2p\p2pconn\SenderReceiver.cs:line 92

I used one pc, with two instance of the app. One in VS2017, one in VS2022.
Capture

Hello @basemind, thanks, Glad you like it. You can try to understand the problem ? I'm sure you can solve it.

I solved it i suppose, thanks for believing in me :) I put a zero to MemoryStream.
using (MemoryStream MotionStream = new MemoryStream(100000000)) // 10000000

In 1366x768 screen, connection cut after 6 min. After making MemoryStream ten times bigger, connection cut after 125 min.