Recently I downloaded "Java MSN Messenger Library", and I used to create a bot.
But I have a PROBLEM, because my program can't run for too long: after 10-20 minutes, I get this message:
Exception in thread "AutoCloseEventGenerator0" java.lang.OutOfMemoryError: Java heap space
at net.sf.jml.message.p2p.MsnP2PDataMessage.parseP2PBody(MsnP2PDataMessage.java:39)
at net.sf.jml.message.p2p.MsnP2PMessage.parseMessage(MsnP2PMessage.java:81)
at net.sf.jml.message.p2p.MsnP2PMessageFactory.parseMessage(MsnP2PMessageFactory.java:36)
at net.sf.jml.message.MsnMimeMessageFactory.parseSpecialMessage(MsnMimeMessageFactory.java:83)
at net.sf.jml.message.MsnMimeMessageFactory.parseMessage(MsnMimeMessageFactory.java:61)
at net.sf.jml.message.IncomingMimeMessage.messageReceived(IncomingMimeMessage.java:43)
at net.sf.jml.protocol.MsnSession$1.messageReceived(MsnSession.java:105)
at net.sf.cindy.impl.AbstractSession$6.doRun(AbstractSession.java:341)
at net.sf.cindy.impl.AbstractSession$DispatchObject.run(AbstractSession.java:395)
at net.sf.cindy.impl.SimpleDispatcher.dispatch(SimpleDispatcher.java:35)
at net.sf.cindy.impl.AbstractSession.dispatch(AbstractSession.java:249)
at net.sf.cindy.impl.AbstractSession.dispatchMessageReceived(AbstractSession.java:335)
at net.sf.cindy.impl.StreamChannelSession.recognizeMessageAndDispatch(StreamChannelSession.java:77)
at net.sf.cindy.impl.StreamChannelSession.readFromChannel(StreamChannelSession.java:53)
at net.sf.cindy.impl.ChannelSession.onReadable(ChannelSession.java:212)
at net.sf.cindy.impl.ChannelSession.onEvent(ChannelSession.java:134)
at net.sf.cindy.impl.SocketSession.onEvent(SocketSession.java:119)
at net.sf.cindy.impl.SimpleEventGenerator.processKey(SimpleEventGenerator.java:212)
at net.sf.cindy.impl.SimpleEventGenerator.run(SimpleEventGenerator.java:192)
at net.sf.cindy.impl.SimpleEventGenerator.access$000(SimpleEventGenerator.java:54)
at net.sf.cindy.impl.SimpleEventGenerator$1.run(SimpleEventGenerator.java:115)
I have no memory leak in my code, because I used it for almost two years (with "Incesoft iBot Platform") without this problem!
Can someone help me? It could be a memory leak of the "Java MSN Messenger library"?
My bot is heavily used, and sometimes users tried to make it crash typing very long messages... this could be the cause?
How can I resolve it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi! I'm J.J. Alan, and I'm new to this forum!
Recently I downloaded "Java MSN Messenger Library", and I used to create a bot.
But I have a PROBLEM, because my program can't run for too long: after 10-20 minutes, I get this message:
Exception in thread "AutoCloseEventGenerator0" java.lang.OutOfMemoryError: Java heap space
at net.sf.jml.message.p2p.MsnP2PDataMessage.parseP2PBody(MsnP2PDataMessage.java:39)
at net.sf.jml.message.p2p.MsnP2PMessage.parseMessage(MsnP2PMessage.java:81)
at net.sf.jml.message.p2p.MsnP2PMessageFactory.parseMessage(MsnP2PMessageFactory.java:36)
at net.sf.jml.message.MsnMimeMessageFactory.parseSpecialMessage(MsnMimeMessageFactory.java:83)
at net.sf.jml.message.MsnMimeMessageFactory.parseMessage(MsnMimeMessageFactory.java:61)
at net.sf.jml.message.IncomingMimeMessage.messageReceived(IncomingMimeMessage.java:43)
at net.sf.jml.protocol.MsnSession$1.messageReceived(MsnSession.java:105)
at net.sf.cindy.impl.AbstractSession$6.doRun(AbstractSession.java:341)
at net.sf.cindy.impl.AbstractSession$DispatchObject.run(AbstractSession.java:395)
at net.sf.cindy.impl.SimpleDispatcher.dispatch(SimpleDispatcher.java:35)
at net.sf.cindy.impl.AbstractSession.dispatch(AbstractSession.java:249)
at net.sf.cindy.impl.AbstractSession.dispatchMessageReceived(AbstractSession.java:335)
at net.sf.cindy.impl.StreamChannelSession.recognizeMessageAndDispatch(StreamChannelSession.java:77)
at net.sf.cindy.impl.StreamChannelSession.readFromChannel(StreamChannelSession.java:53)
at net.sf.cindy.impl.ChannelSession.onReadable(ChannelSession.java:212)
at net.sf.cindy.impl.ChannelSession.onEvent(ChannelSession.java:134)
at net.sf.cindy.impl.SocketSession.onEvent(SocketSession.java:119)
at net.sf.cindy.impl.SimpleEventGenerator.processKey(SimpleEventGenerator.java:212)
at net.sf.cindy.impl.SimpleEventGenerator.run(SimpleEventGenerator.java:192)
at net.sf.cindy.impl.SimpleEventGenerator.access$000(SimpleEventGenerator.java:54)
at net.sf.cindy.impl.SimpleEventGenerator$1.run(SimpleEventGenerator.java:115)
I have no memory leak in my code, because I used it for almost two years (with "Incesoft iBot Platform") without this problem!
Can someone help me? It could be a memory leak of the "Java MSN Messenger library"?
My bot is heavily used, and sometimes users tried to make it crash typing very long messages... this could be the cause?
How can I resolve it?