Page 1 of 1

Private message issue

Posted: 29 Oct 2010, 16:59
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.

Posted: 30 Oct 2010, 06:27
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

Posted: 09 Nov 2010, 12:05
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.

Posted: 09 Nov 2010, 15:34
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

Posted: 09 Nov 2010, 15:41
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.

Posted: 16 Dec 2010, 16:21
by 0turner0
Indeed, I had the same problem and setting the zone filter to BLACKLIST seems to have solved it!

Posted: 16 Dec 2010, 18:05
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