[FIXED] Disconnection error API 1.0.5

Post here your questions about the Java client / Android API for SFS2X

Moderators: Lapo, Bax

User avatar
janheuninck
Posts: 68
Joined: 23 Nov 2011, 01:35
Location: Vancouver BC, Canada

[FIXED] Disconnection error API 1.0.5

Postby janheuninck » 05 Dec 2012, 18:23

Hi guys,

I updated my Java API from 1.0.3 to 1.0.5, but this causes problems when I disconnect a user. The disconnect() function on the SmartFox object throws a null pointer exception. You can find the exception below:

Code: Select all

106395 [AWT-EventQueue-0] ERROR sfs2x.client.core.EventDispatcher - Error dispatching event OnDisconnect :null
java.lang.NullPointerException
   at sfs2x.client.bitswarm.UDPManager.stopTimer(UDPManager.java:298)
   at sfs2x.client.bitswarm.UDPManager.reset(UDPManager.java:135)
   at sfs2x.client.bitswarm.BitSwarmClient.onSocketClose(BitSwarmClient.java:294)
   at sfs2x.client.bitswarm.BitSwarmClient.access$1(BitSwarmClient.java:275)
   at sfs2x.client.bitswarm.BitSwarmClient$2.dispatch(BitSwarmClient.java:99)
   at sfs2x.client.core.EventDispatcher.dispatchEvent(EventDispatcher.java:52)
   at sfs2x.client.core.sockets.TCPSocketLayer.callOnDisconnect(TCPSocketLayer.java:178)
   at sfs2x.client.core.sockets.TCPSocketLayer.handleDisconnection(TCPSocketLayer.java:143)
   at sfs2x.client.core.sockets.TCPSocketLayer.access$4(TCPSocketLayer.java:136)
   at sfs2x.client.core.sockets.TCPSocketLayer$NettyIOHandler.channelDisconnected(TCPSocketLayer.java:278)
   at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:132)
   at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
   at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:540)
   at org.jboss.netty.channel.Channels.fireChannelDisconnected(Channels.java:360)
   at org.jboss.netty.channel.socket.nio.NioWorker.close(NioWorker.java:599)
   at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:105)
   at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:742)
   at org.jboss.netty.channel.SimpleChannelHandler.disconnectRequested(SimpleChannelHandler.java:334)
   at org.jboss.netty.channel.SimpleChannelHandler.handleDownstream(SimpleChannelHandler.java:286)
   at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:568)
   at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:563)
   at org.jboss.netty.channel.Channels.disconnect(Channels.java:689)
   at org.jboss.netty.channel.AbstractChannel.disconnect(AbstractChannel.java:222)
   at sfs2x.client.core.sockets.TCPSocketLayer.disconnect(TCPSocketLayer.java:222)
   at sfs2x.client.bitswarm.BitSwarmClient.disconnect(BitSwarmClient.java:244)
   at sfs2x.client.SmartFox.disconnect(SmartFox.java:497)
   at londonfogtestclient.simulator.network.SKIServerProxy.disconnect(SKIServerProxy.java:313)
   at londonfogtestclient.simulator.controllers.SKIClient.disconnect(SKIClient.java:176)
   at londonfogtestclient.ui.panels.content.ClientPanel.actionPerformed(ClientPanel.java:153)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
   at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
   at java.awt.Component.processMouseEvent(Component.java:6505)
   at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
   at java.awt.Component.processEvent(Component.java:6270)
   at java.awt.Container.processEvent(Container.java:2229)
   at java.awt.Component.dispatchEventImpl(Component.java:4861)
   at java.awt.Container.dispatchEventImpl(Container.java:2287)
   at java.awt.Component.dispatchEvent(Component.java:4687)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
   at java.awt.Container.dispatchEventImpl(Container.java:2273)
   at java.awt.Window.dispatchEventImpl(Window.java:2719)
   at java.awt.Component.dispatchEvent(Component.java:4687)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
   at java.awt.EventQueue.access$200(EventQueue.java:103)
   at java.awt.EventQueue$3.run(EventQueue.java:682)
   at java.awt.EventQueue$3.run(EventQueue.java:680)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
   at java.awt.EventQueue$4.run(EventQueue.java:696)
   at java.awt.EventQueue$4.run(EventQueue.java:694)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
106717 [Timer-0] WARN sfs2x.client.SmartFox - You are not connected. Request cannot be sent: sfs2x.client.requests.ExtensionRequest@14d5a66a


Cheers
Jan
User avatar
Lapo
Site Admin
Posts: 21014
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Disconnection error API 1.0.5

Postby Lapo » 06 Dec 2012, 09:00

Thanks for reporting, we fixed the problem and updated the release
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Java / Android API”

Who is online

Users browsing this forum: No registered users and 4 guests