Private message issue

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
tpenn
Posts: 95
Joined: 03 Aug 2010, 18:48

Private message issue

Post by tpenn »

I am encountering problems sending private messages. I have attempted sending a PrivateMessageRequest in my Unity project, and also sending the message on the server (via SFSApi.sendPrivateMessage). This is code which was functional prior to updating to RC1, so I suspect a problem was introduced.

In both cases, the server complains of a null pointer exception at SFSApi.java:971.
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Post by ThomasLund »

Thanks for reporting. If it worked on b14 and not now in rc1, then it definitely sounds like a potential bug.

There was a fix to the b14 Unity API related to private messaging. So maybe, maybe not I didnt do my job well enough.

Will test later today myself and see

/Thomas
sHTiF
Posts: 102
Joined: 30 Sep 2010, 20:14

Post by sHTiF »

Was this resolved? I am getting the same bug when trying to sendPrivateMessage through the server API from my multihandler.

Working with AS3 client, Windows 7 64Bit.

Here is the server console trace:

Code: Select all

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.lang.NullPointerException
Message: *** Null ***
Description: Error while handling client request in extension: { Ext: customv3, Type: JAVA, Lev: ZONE, { Zone: CustomV3 }, {} }
Extension Cmd: chat.send
+--- --- ---+
Stack Trace:
+--- --- ---+
com.smartfoxserver.v2.api.SFSApi.sendPrivateMessage(SFSApi.java:971)
com.viral.customv3.ChatMultiHandler.handleClientRequest(ChatMultiHandler.java:41)
com.smartfoxserver.v2.extensions.SFSExtension.handleClientRequest(SFSExtension.java:187)
com.smartfoxserver.v2.controllers.ExtensionController.processRequest(ExtensionController.java:137)
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)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
All the parameters send to the getApi.sendPrivateMessage are valid so no reason for it to complain. This is a major issue for me since i need to send private messages through server extension since it checks chat sessions between users and add valid handshake and info data where needed.
Pushing the limits of flash platform at http://blog.flash-core.com
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

UPDATE: Yes there is a fix we need to introduce but this issue is only caused when the Zone's WordFilter is set to filterMode == WHITE_LIST

You can either set it to BLACK_LIST or disable the WordFilter.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
sHTiF
Posts: 102
Joined: 30 Sep 2010, 20:14

Post by sHTiF »

Lapo thanks enabling the words filter and setting it to BLACK_LIST helped.

However your assumption is incorrect since i didn't have the filter enabled in the first place. So i rechecked, once the filter is disabled or set to WHITE_LIST the error happens. The only time it doesn't happen is once the filter is enabled and set to BLACK_LIST.
Pushing the limits of flash platform at http://blog.flash-core.com
0turner0
Posts: 3
Joined: 16 Dec 2010, 16:20

Post by 0turner0 »

Indeed, I had the same problem and setting the zone filter to BLACKLIST seems to have solved it!
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Take into account that this is fixed in RC1a, which probably you didn't install.
http://forums.smartfoxserver.com/viewtopic.php?t=9117
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply