nullpointer on server with room variable

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

Moderators: Lapo, Bax

pantinor
Posts: 17
Joined: 19 Jan 2012, 02:10

nullpointer on server with room variable

Postby pantinor » 26 Jan 2012, 00:55

I am trying to debug an issue that seems to be causing problems for me. the stack trace is below. Thanks for help again.

25 Jan 2012 19:56:50,723 WARN [com.smartfoxserver.v2.controllers.SystemController-1] v2.controllers.SystemController -
java.lang.NullPointerException
com.smartfoxserver.v2.entities.variables.SFSUserVariable.toSFSArray(SFSUserVariable.java:318)
com.smartfoxserver.v2.entities.variables.SFSRoomVariable.toSFSArray(SFSRoomVariable.java:184)
com.smartfoxserver.v2.entities.SFSRoom.getRoomVariablesData(SFSRoom.java:1142)
com.smartfoxserver.v2.entities.SFSRoom.toSFSArray(SFSRoom.java:1200)
com.smartfoxserver.v2.api.response.SFSResponseApi.notifyJoinRoomSuccess(SFSResponseApi.java:164)
com.smartfoxserver.v2.api.SFSApi.joinRoom(SFSApi.java:778)
com.smartfoxserver.v2.api.SFSApi.joinRoom(SFSApi.java:691)
com.smartfoxserver.v2.controllers.system.JoinRoom.execute(JoinRoom.java:83)
com.smartfoxserver.v2.controllers.SystemController.processRequest(SystemController.java:129)
com.smartfoxserver.bitswarm.controllers.AbstractController.run(AbstractController.java:96)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
pantinor
Posts: 17
Joined: 19 Jan 2012, 02:10

Postby pantinor » 26 Jan 2012, 02:54

i removed some room variable and used a user variable instead and its no longer happening all set.
pantinor
Posts: 17
Joined: 19 Jan 2012, 02:10

Postby pantinor » 27 Jan 2012, 01:44

actually I was putting an object into the room variable which did not extend SFSObject. After extending SFSObject I could put it into the room variable.
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 30 Jan 2012, 13:18

Super that its solved
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund

Return to “SFS2X Java / Android API”

Who is online

Users browsing this forum: No registered users and 16 guests