Ticket #303 (new defect)

Opened 4 months ago

Last modified 4 months ago

StaffBot crashing daily

Reported by: milosh Assigned to: nobody
Priority: normal Component: Bots - Other
Version: Latest version from repository Severity: minor
Keywords: Cc:

Description

Exception in thread "StaffBot-Session" java.lang.OutOfMemoryError: Java heap space
	at java.lang.StringCoding$CharsetSD.decode(StringCoding.java:183)
	at java.lang.StringCoding.decode(StringCoding.java:228)
	at java.lang.StringCoding.decode(StringCoding.java:234)
	at java.lang.String.<init>(String.java:458)
	at twcore.core.util.ByteArray.readString(Unknown Source)
	at twcore.core.net.GamePacketInterpreter.handleFileArrived(Unknown Source)
	at twcore.core.net.GamePacketInterpreter.translateNormalPacket(Unknown Source)
	at twcore.core.net.GamePacketInterpreter.translateGamePacket(Unknown Source)
	at twcore.core.net.GamePacketInterpreter.handleMassiveChunkMessage(Unknown Source)
	at twcore.core.net.GamePacketInterpreter.translateSpecialPacket(Unknown Source)
	at twcore.core.net.GamePacketInterpreter.translateGamePacket(Unknown Source)
	at twcore.core.net.ReliablePacketHandler.handleReliableMessage(Unknown Source)
	at twcore.core.net.GamePacketInterpreter.translateSpecialPacket(Unknown Source)
	at twcore.core.net.GamePacketInterpreter.translateGamePacket(Unknown Source)
	at twcore.core.Session.run(Unknown Source)

Attachments

Change History

09/12/08 09:26:21 changed by Maverick

Yes, I've also noticed it. The Staffbot doesn't crash (right?) but only the active task that is downloading the server log each day.

Solution would be to store (decoded) pieces of the massive packet on disk instead of trying to load everything into memory (maybe have it append to the file that's being downloaded). I don't know if Java already has support for this though.

Note: Way back in time this wasn't an issue because Staffbot uploaded an empty server log each time it archived it. This may be a good workaround but I don't think that's really needed. It may be the last solution if this problem is really hard to solve though.

09/12/08 09:52:35 changed by milosh

The bot doesn't "crash" as in logging off, but it does freeze entirely.

09/12/08 21:27:25 changed by Ayano

RandomAccessFile

The only issue then is figuring out where it should seek to, assuming you seek from the bottom.

09/16/08 10:57:44 changed by Maverick

I've turned off the automatic server log archiving functionality of staffbot to temporarily resolve this problem.

RandomAccessFile is a good solution for the problem, Ayano. Coding it in is another story though.


Add/Change #303 (StaffBot crashing daily)




Change Properties
Action