Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArgumentOutOfRangeException with terrain/movements #114

Closed
Awpocalypse opened this issue Feb 21, 2016 · 11 comments
Closed

ArgumentOutOfRangeException with terrain/movements #114

Awpocalypse opened this issue Feb 21, 2016 · 11 comments

Comments

@Awpocalypse
Copy link

When i ran console client with terrain movements on this happend...

https://gyazo.com/39cc4aff1594fec21663f478bcb88c3d

@initsuj
Copy link
Contributor

initsuj commented Feb 23, 2016

was /server jurassic the last command in the script file?

@ORelio
Copy link
Member

ORelio commented Feb 23, 2016

Oops, forgot to respond to your issue... Seems like the issue is in the 1.8.X packet parser, but unfortunately the error stack trace does not tells the exact line. Does your issue appears every time you go to that server? If so it may be possible to try again with a debug build with exact line numbers in error messages.

@Awpocalypse
Copy link
Author

Initsuj it was the only command and i also tried it without a script

@Awpocalypse
Copy link
Author

Orelio yes it does but ill attempt it other ways when i get the time if you wanna test the ip is play.opticcraft.tv

@initsuj
Copy link
Contributor

initsuj commented Feb 23, 2016

I can't reproduce with the latest version - I have terrainandmovements=true and use /server jurassic. Test with the latest version? https://ci.appveyor.com/project/ORelio/minecraft-console-client/build/artifacts

@Pokechu22
Copy link
Contributor

By chance, is this a 1.7.10 server? I think I know what's causing this, and it doesn't relate to terrain here.

Instead, it seems to be a result of the change in cb00c28 - since List<byte> is being used instead of byte[], an ArgumentOutOfRangeException is thrown instead of an IndexOutOfRangeException. And since only IndexOutOfRangeException is caught when checking the message type for a chat message (packet 0x02), that exception now makes it through instead of getting caught.

Pokechu22 added a commit to Pokechu22/Minecraft-Console-Client that referenced this issue Feb 27, 2016
The first bug is that the list isn't cleared in some cases, meaning new packets get data from the previous packet if it isn't read fully.  Most commonly, this happens with a plugin channel message.  The second bug happens because lists don't throw IndexOutOfRangeExceptions, but instead throw ArgumentOutOfRangeExceptions.  This caused the catch for ignoring message types to not occur, instead causing the client to crash.  This only happens in 1.7.10, where the message type is not included.

Most likely, these changes will fix the bugs seen in MCCTeam#114 and MCCTeam#117, although they may be caused by other bugs.
@Awpocalypse
Copy link
Author

1.7 n 1.8

@Awpocalypse
Copy link
Author

Sorry i havent had the time to investigate buzy with school

@ORelio
Copy link
Member

ORelio commented Feb 27, 2016

Please retry with the latest development build :)

@ORelio ORelio changed the title Some kind or error ArgumentOutOfRangeException with terrain and movements Feb 27, 2016
@ORelio ORelio changed the title ArgumentOutOfRangeException with terrain and movements ArgumentOutOfRangeException with terrain/movements Feb 27, 2016
@Awpocalypse
Copy link
Author

It has been fixed :)

@ORelio
Copy link
Member

ORelio commented Mar 1, 2016

Great! :)

@ORelio ORelio closed this as completed Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants