bravoserver / bravo

UNMAINTAINED: Reverse-engineered Minecraft stuff. Worked with 1.4.x protocol
http://bravoserver.org/
Other
206 stars 45 forks source link

End of stream error after closing inventory #320

Closed computermatt closed 13 years ago

computermatt commented 13 years ago

After I close my inventory I get this in the console:

File "mypath/bravo/bravo/protocols/beta.py", line 952, in wclose top = self.windows.pop() exceptions.IndexError: pop from empty list

This causes an end of stream error in the game.

This happens EVERY time I close my inventory. The map I'm using is one that was NOT generated by bravo because apparently it can't generate worlds because it can't create the directory and files required to make a world even when the permissions are correct -_-

MostAwesomeDude commented 13 years ago

Curious. I will investigate immediately, allthough I think I know the cause. Sounds like the client now tells the server when it opens the inventory, all the time.

Sending from a mobile, pardon my terseness. ~ C. On Aug 24, 2011 9:51 AM, "computermatt" < reply@reply.github.com> wrote:

After I close my inventory I get this in the console:

File "mypath/bravo/bravo/protocols/beta.py", line 952, in wclose top = self.windows.pop() exceptions.IndexError: pop from empty list

This causes an end of stream error in the game.

This happens EVERY time I close my inventory. The map I'm using is one that was NOT generated by bravo because apparently it can't generate worlds because it can't create the directory and files required to make a world even when the permissions are correct -_-

Reply to this email directly or view it on GitHub: https://github.com/MostAwesomeDude/bravo/issues/320

computermatt commented 13 years ago

did you ever figure it out?

justinnoah commented 13 years ago

@computermatt still an issue.

justinnoah commented 13 years ago

@MostAwesomeDude Closing a workbench window without doing anything, empty window open then ESC is pressed, results in this:

File "C:\Python27\lib\site-packages\bravo-1.7.2-py2.7.egg\bravo\protocols\beta.py", line 285, in dataReceived self.handlersheader File "C:\Python27\lib\site-packages\bravo-1.7.2-py2.7.egg\bravo\protocols\beta.py", line 970, in wclose sync_inventories(i, self.player.inventory) File "C:\Python27\lib\site-packages\bravo-1.7.2-py2.7.egg\bravo\inventory.py", line 580, in sync_inventories dst.holdables = src.holdables exceptions.AttributeError: 'int' object has no attribute 'holdables'

I am thinking these two are possibly related.

justinnoah commented 13 years ago

I would also like to note that I have had computermatt's traceback (and subsequent client freeze) when clicking any inventory slot, including the inventory slots on a workbench window.

mcsakoff commented 13 years ago

According to http://mc.kev009.com/Protocol#Close_window_.280x65.29 notchian clients send a close window message with window id 0 to close their inventory even though there is never an Open Window message for inventory.

I've checked and in this case it really sends wid == 0.

computermatt commented 13 years ago

Well that should be an easy enough fix then.

mcsakoff commented 13 years ago

About the exceptions.AttributeError: 'int' object has no attribute 'holdables': @MostAwesomeDude, bravo/protocols/beta.py:970: - sync_inventories(i, self.player.inventory) + sync_inventories(top, self.player.inventory) isn't it?