Page 1 of 1
BuddyList problem
Posted: 24 Apr 2011, 21:12
by alarstyle
Some time ago buddy list stoped loading on loadBuddyList() for some users on my server.
There are a lot of warnings in the log like this:
Code: Select all
(AdvancedBuddyListPersister.loadList): Error loading buddy list for user: 1200412620. Reason: null
To figure out what is wrong I'm trying to get offline variables of buddies in server side extension.
So I choosed user that loads buddylist normaly, it loads all buddy data fine on client side. But on server side the "variables" field of StorableBuddyItem is null, how can I get it?
Can you help me with that, please.
Posted: 26 Apr 2011, 08:09
by alarstyle
Founded getOfflineBuddyVariables() method in docs.
And it throws an error on trying to get variables of some buddies:
Code: Select all
INFO | jvm 1 | 2011/04/24 15:16:41 | org.mozilla.javascript.WrappedException: Wrapped java.lang.ArrayIndexOutOfBoundsException (buncoExt.as#1901)
INFO | jvm 1 | 2011/04/24 15:16:41 | at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1757)
INFO | jvm 1 | 2011/04/24 15:16:41 | at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:170)
INFO | jvm 1 | 2011/04/24 15:16:41 | at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)
INFO | jvm 1 | 2011/04/24 15:16:41 | at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)
INFO | jvm 1 | 2011/04/24 15:16:41 | at org.mozilla.javascript.gen.c11._c88(buncoExt.as:1901)
INFO | jvm 1 | 2011/04/24 15:16:41 | at org.mozilla.javascript.gen.c11._c84(buncoExt.as:1670)
INFO | jvm 1 | 2011/04/24 15:16:41 | at org.mozilla.javascript.gen.c11.call(buncoExt.as)
INFO | jvm 1 | 2011/04/24 15:16:41 | at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
INFO | jvm 1 | 2011/04/24 15:16:41 | at org.mozilla.javascript.gen.c11._c60(buncoExt.as:991)
INFO | jvm 1 | 2011/04/24 15:16:41 | at org.mozilla.javascript.gen.c11.call(buncoExt.as)
INFO | jvm 1 | 2011/04/24 15:16:41 | at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
INFO | jvm 1 | 2011/04/24 15:16:41 | at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
INFO | jvm 1 | 2011/04/24 15:16:41 | at org.mozilla.javascript.gen.c11.call(buncoExt.as)
INFO | jvm 1 | 2011/04/24 15:16:41 | at it.gotoandplay.smartfoxserver.extensions.JavascriptExtension.callJavaScriptFunction(JavascriptExtension.java:548)
INFO | jvm 1 | 2011/04/24 15:16:41 | at it.gotoandplay.smartfoxserver.extensions.JavascriptExtension.handleRequest(JavascriptExtension.java:237)
INFO | jvm 1 | 2011/04/24 15:16:41 | at it.gotoandplay.smartfoxserver.controllers.ExtensionHandler.processEvent(ExtensionHandler.java:535)
INFO | jvm 1 | 2011/04/24 15:16:41 | at it.gotoandplay.smartfoxserver.controllers.ExtensionHandler.run(ExtensionHandler.java:344)
INFO | jvm 1 | 2011/04/24 15:16:41 | at java.lang.Thread.run(Unknown Source)
INFO | jvm 1 | 2011/04/24 15:16:41 | Caused by: java.lang.ArrayIndexOutOfBoundsException
Posted: 27 Apr 2011, 06:26
by BigFIsh
So, if this is happening only to some users - and you know their names, you could manually look into the buddy list database for that zone to see if there was any corrupted data.
Simply do the following steps:
1. If your server is on your desktop machine, skip to step 3:
2. Under {your sfs installation path}\Server\datastore, copy __sfscore__.data.db and __sfscore__.index.db and paste it in the same folder by on your local machine, under a different name - i.e. temp.data.db and temp.index.db
3. Launch SFS on your local machine
4. Launch {your sfs installation path}\Server\adminDb.bat. If that doesn't work, you may have to install javaRE
5. For JDBC URL, use: jdbc:h2:tcp://localhost:9009/temp
6. Find the buddy list for that zone
7. Perform this query: SELECT * FROM BLIST_?? WHERE OWNER = 'name of player' where ?? is the id of the buddy list, i.e. BLIST_5472756174686C6F6E. This will dump the raw information of that user's buddy list.
Posted: 27 Apr 2011, 08:40
by alarstyle
That's exactly what I did yesterday
And users that inoke errors has this:
VAR_KEYS = roomId$level$name
VAR_VALUES = 10
So some of variables was not saved.
Also a lot of users have no variables at all, but they had it before.
Posted: 02 May 2011, 01:22
by BigFIsh
So it's sorted out now?
Posted: 10 May 2011, 06:48
by alarstyle
BigFIsh wrote:So it's sorted out now?
Well, I don't know what was a reaseon for this error.
I manually cleared VAR_KEYS and VAR_VALUES in database, and it's working fine for now.