question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception: copy extends past end of input

See original GitHub issue

Reported by @quanglam68 in the Gitter channel:


hi, I still learning the unity client. testing the code given for exchanging information with 2 clients and the server works fine. ex: trace in one client : OnUpdateHandler: { "players" : { "SkkPLJeag" : { "x" : 520, "y" : 0 }, "HJrDLkxpx" : { "x" : 255, "y" : 0 } } } but when i make the data bigger in the server, this.state.players[client.id] = { a:0, b: 0, d:0, x: 0, y: 0 }; I have an error in the client when it tries to apply the patch

Exception: copy extends past end of input
Fossil.Delta.Apply (System.Byte[] origin, System.Byte[] delta) (at Assets/Colyseus/FossilDelta/Delta.cs:187)
Colyseus.Room.ApplyPatch (System.Byte[] delta) (at Assets/Colyseus/Room.cs:129)
Colyseus.Client.ParseMessage (System.Byte[] recv) (at Assets/Colyseus/Client.cs:179)
Colyseus.Client.Recv () (at Assets/Colyseus/Client.cs:90)
ColyseusClient.FixedUpdate () (at Assets/Source/colyseus/ColyseusClient.cs:39)

My analysis is the pb appear at the call : this._previousState = Fossil.Delta.Apply (this._previousState, delta, out error); seems that _previousState array size is too small. How can we set its size to it is bigger to match with the data set in the server

I Lost a day to understand and to change various things but I cannot find a solution / or even an quickfix

Any help is appreciated . Tks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
endelcommented, Apr 24, 2017

Hi @niklaswolf, thanks for sending the sources. I hope to find some time during this week to check it out. Sorry.

0reactions
endelcommented, Apr 25, 2017

It’s finally fixed! Thanks @niklaswolf for your pull-request! 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Retrofit2 error java.io.EOFException: End of input at line 1 ...
To solve this kind of(Retrofit2 error java.io.EOFException: End of input at line 1 column 1) exception which is an empty body exception. Yo...
Read more >
30. Errors and Exception Handling | Python Tutorial
After having printed the text of the print statement, the execution does another loop. It starts with a new input(). We could turn...
Read more >
Exception Handling in Java with Examples | 2023
Exception handling in java is one of the powerful mechanisms to handle runtime errors. It plays an important role in Software Development.
Read more >
Built-in Exceptions — Python 3.11.4 documentation
In Python, all exceptions must be instances of a class that derives from BaseException. In a try statement with an except clause that...
Read more >
Exceptions - JSON for Modern C++
Its value must be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors. Example message. [json.exception.parse_error.105] parse ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found