Serialization, OnExtensionResponse Not firing

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

Moderators: Lapo, Bax

Sanity1993
Posts: 26
Joined: 30 Jan 2018, 21:14

Serialization, OnExtensionResponse Not firing

Postby Sanity1993 » 31 Jan 2018, 09:00

Hello All,
I am a hobbyist and i enjoy playing and making games. I usually send these via SFSObjects, so really first time looking at serialization. I've triple and quadrouple checked the Documentation. http://docs2x.smartfoxserver.com/Advanc ... ialization

So to test and play around with class serialization i moved the RPG example extensions to MMORPG example. I rewritten the Action script Unity games files to C# and only created a set of the classes within Unity to get a base going before completely creating something new. All Server side scripts are standard from the RPG Example. (running locally).

So in the basics of trouble shooting. The client isn't 99% of the time receiving the data back from the server. I've done a server dump for what is sent and to who. So in order of server start>Connecting client>Exchanges.

Code: Select all

Connected
UnityEngine.Debug:Log(Object)
ConnectionUI:Start() (at Assets/Scripts/ConnectionUI.cs:76)

Login Request Sent
UnityEngine.Debug:Log(Object)
ConnectionUI:OnLoginButtonClick() (at Assets/Scripts/ConnectionUI.cs:90)
UnityEngine.EventSystems.EventSystem:Update()

Room Exisits Attempting to Join: testroom1
UnityEngine.Debug:Log(Object)
ConnectionUI:OnLogin(BaseEvent) (at Assets/Scripts/ConnectionUI.cs:151)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
ConnectionUI:Update() (at Assets/Scripts/ConnectionUI.cs:81)

 Spawned local player
UnityEngine.Debug:Log(Object)
GameManager:SpawnLocalPlayer(Int32, Int32) (at Assets/Scripts/GameManager.cs:288)
GameManager:Start() (at Assets/Scripts/GameManager.cs:123)

BuddyListInitCalled
UnityEngine.Debug:Log(Object)
GameManager:OnBuddyListInit(BaseEvent) (at Assets/Scripts/GameManager.cs:658)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
GameManager:FixedUpdate() (at Assets/Scripts/GameManager.cs:150)

getModel - Request Sent.
UnityEngine.Debug:Log(Object)
GameManager:FixedUpdate() (at Assets/Scripts/GameManager.cs:171)

SERVER RESPONSE.

Code: Select all

9:01:22,222 INFO  [SFSWorker:Ext:4] Extensions     - {altExt}: getModel Sent back to: ( User Name: Unity, Id: 0, Priv: 0, Sess: 127.0.0.1:51368 )
09:01:22,222 INFO  [SFSWorker:Ext:4] Extensions     - {altExt}: Model: [SFSObject, size: 5]
09:01:22,224 INFO  [SFSWorker:Ext:4] Extensions     - {altExt}: Model:
        (sfs_array) knights:
                 (class) altarianonline.model.RpgCharacter

        (class) spell: altarianonline.model.DeathRaySpell
        (class) knife: altarianonline.model.ShieldItem
        (bool) isRpg: true
        (int_array) randomValues: [100, 45, 62, 51, 7, 13, 161]


So in the c# Script i have this for extension response.

Code: Select all

void OnExtensionResponse(BaseEvent e)
    {
        Debug.Log("OnExtensionResponse called");
        ISFSObject objIn = (SFSObject)e.Params["params"];
        string cmd = (string)e.Params["cmd"];
        Debug.Log(e.Params);
        //Change to Switch statement for efficency
        if (cmd == "setModel")
        {
}
}

The Debug Log is never firing. So using a new MMORPG Example and dumping once the OnExtension response is called.

Code: Select all

getModel Sent.
UnityEngine.Debug:Log(Object)
GameManager:SpawnLocalPlayer(Int32, Int32) (at Assets/Scripts/GameManager.cs:240)
GameManager:Start() (at Assets/Scripts/GameManager.cs:57)
OnExtensionResponse called

UnityEngine.Debug:Log(Object)
GameManager:OnExtensionResponse(BaseEvent) (at Assets/Scripts/GameManager.cs:273)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
GameManager:FixedUpdate() (at Assets/Scripts/GameManager.cs:67)
System.Collections.Hashtable

UnityEngine.Debug:Log(Object)
GameManager:OnExtensionResponse(BaseEvent) (at Assets/Scripts/GameManager.cs:276)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
GameManager:FixedUpdate() (at Assets/Scripts/GameManager.cs:67)

Which i understand is fine? as I've not moved any classes into the new testing MMORPG Example.

That doesn't explain why the MMORPG example original doesn't have the extension firing.

So does anyone have an ideas on how i can debug these ?

Thanks!
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Serialization, OnExtensionResponse Not firing

Postby Lapo » 01 Feb 2018, 11:21

Hi,
if you're finding that a certain request doesn't get to the other end (server or client) I'd suggest to check the logs to see if there are any errors.

Some of the logs you've posted are your custom ones. I'd rather isolate the problem to a single request which fails to be received and test that one out, then check the logs immediately after to see what's going on.

Post here the code of the request and what else you've found in the logs and we'll investigate further.
Also please specify which API version and SFS2X version you're running.

thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
Sanity1993
Posts: 26
Joined: 30 Jan 2018, 21:14

Re: Serialization, OnExtensionResponse Not firing

Postby Sanity1993 » 01 Feb 2018, 15:01

Hey Lapo,
Here is the threat dump from the SFS2X instance(2.13). The API is the latest 1.7.5.
SFS2x Debug.rar
Rar of the JFR recording as mentioned on the Stickied Threads
(83.52 KiB) Downloaded 417 times


(Doesnt mean much to me?)

Code: Select all

2018-02-01 14:41:00
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.102-b14 mixed mode):

"VM JFR Buffer Thread" #130 daemon prio=5 os_prio=0 tid=0x0000000048b06800 nid=0x11e4 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"RMI TCP Connection(idle)" #128 daemon prio=5 os_prio=0 tid=0x0000000048b01000 nid=0x1160 waiting on condition [0x00000000501af000]
   java.lang.Thread.State: TIMED_WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c1bc2150> (a java.util.concurrent.SynchronousQueue$TransferStack)
   at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
   at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(Unknown Source)
   at java.util.concurrent.SynchronousQueue$TransferStack.transfer(Unknown Source)
   at java.util.concurrent.SynchronousQueue.poll(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"JFR request timer" #127 daemon prio=5 os_prio=0 tid=0x00000000[attachment=0]SFS2x Debug.rar[/attachment]48b05800 nid=0x26e0 in Object.wait() [0x00000000500af000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   at java.util.TimerThread.mainLoop(Unknown Source)
   - locked <0x000000066b71f2c0> (a java.util.TaskQueue)
   at java.util.TimerThread.run(Unknown Source)

"qtp552937500-126" #126 prio=5 os_prio=0 tid=0x0000000048b02800 nid=0x312c waiting on condition [0x000000004ffae000]
   java.lang.Thread.State: TIMED_WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c1c1e1b0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
   at org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:392)
   at org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll(QueuedThreadPool.java:563)
   at org.eclipse.jetty.util.thread.QueuedThreadPool.access$800(QueuedThreadPool.java:48)
   at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
   at java.lang.Thread.run(Unknown Source)

"RMI TCP Connection(5)-169.254.55.202" #123 daemon prio=5 os_prio=0 tid=0x0000000048b05000 nid=0x1e8c in Object.wait() [0x000000004fcac000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   - waiting on <0x00000003c1bc3580> (a com.sun.jmx.remote.internal.ArrayNotificationBuffer)
   at com.sun.jmx.remote.internal.ArrayNotificationBuffer.fetchNotifications(Unknown Source)
   - locked <0x00000003c1bc3580> (a com.sun.jmx.remote.internal.ArrayNotificationBuffer)
   at com.sun.jmx.remote.internal.ArrayNotificationBuffer$ShareBuffer.fetchNotifications(Unknown Source)
   at com.sun.jmx.remote.internal.ServerNotifForwarder.fetchNotifs(Unknown Source)
   at javax.management.remote.rmi.RMIConnectionImpl$4.run(Unknown Source)
   at javax.management.remote.rmi.RMIConnectionImpl$4.run(Unknown Source)
   at javax.management.remote.rmi.RMIConnectionImpl.fetchNotifications(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
   at sun.rmi.transport.Transport$1.run(Unknown Source)
   at sun.rmi.transport.Transport$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.rmi.transport.Transport.serviceCall(Unknown Source)
   at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source)
   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$11/102130083.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"RMI TCP Connection(4)-169.254.55.202" #122 daemon prio=5 os_prio=0 tid=0x0000000048b07000 nid=0x28d0 waiting on condition [0x000000004fbac000]
   java.lang.Thread.State: RUNNABLE
   at oracle.jrockit.jfr.VMJFR.rotate(Native Method)
   at oracle.jrockit.jfr.JFRImpl.started(JFRImpl.java:467)
   - locked <0x000000066b71f790> (a java.lang.Object)
   at oracle.jrockit.jfr.Recording.start(Recording.java:334)
   at oracle.jrockit.jfr.JFRImpl.cloneRecording(JFRImpl.java:646)
   at oracle.jrockit.jfr.FlightRecorder.cloneRecording(FlightRecorder.java:236)
   at oracle.jrockit.jfr.FlightRecorder.cloneRecording(FlightRecorder.java:243)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at sun.reflect.misc.Trampoline.invoke(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
   at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(Unknown Source)
   at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(Unknown Source)
   at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(Unknown Source)
   at com.sun.jmx.mbeanserver.PerInterface.invoke(Unknown Source)
   at com.sun.jmx.mbeanserver.MBeanSupport.invoke(Unknown Source)
   at javax.management.StandardMBean.invoke(Unknown Source)
   at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
   at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
   at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
   at javax.management.remote.rmi.RMIConnectionImpl.access$300(Unknown Source)
   at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
   at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
   at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
   at sun.rmi.transport.Transport$1.run(Unknown Source)
   at sun.rmi.transport.Transport$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.rmi.transport.Transport.serviceCall(Unknown Source)
   at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source)
   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$11/102130083.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"JMX server connection timeout 121" #121 daemon prio=5 os_prio=0 tid=0x0000000048b04000 nid=0x1cc4 in Object.wait() [0x000000004faaf000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   - waiting on <0x00000003c1bc31f8> (a [I)
   at com.sun.jmx.remote.internal.ServerCommunicatorAdmin$Timeout.run(Unknown Source)
   - locked <0x00000003c1bc31f8> (a [I)
   at java.lang.Thread.run(Unknown Source)

"RMI Scheduler(0)" #113 daemon prio=5 os_prio=0 tid=0x0000000048b02000 nid=0x2f98 waiting on condition [0x000000004eeaf000]
   java.lang.Thread.State: TIMED_WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c1c3b758> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
   at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
   at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"RMI TCP Accept-0" #111 daemon prio=5 os_prio=0 tid=0x0000000048b03800 nid=0x10dc runnable [0x000000004ecae000]
   java.lang.Thread.State: RUNNABLE
   at java.net.DualStackPlainSocketImpl.accept0(Native Method)
   at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source)
   at java.net.AbstractPlainSocketImpl.accept(Unknown Source)
   at java.net.PlainSocketImpl.accept(Unknown Source)
   - locked <0x00000003c1bc2960> (a java.net.SocksSocketImpl)
   at java.net.ServerSocket.implAccept(Unknown Source)
   at java.net.ServerSocket.accept(Unknown Source)
   at sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(Unknown Source)
   at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(Unknown Source)
   at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"SFSWorker:Ext:4" #55 prio=5 os_prio=0 tid=0x000000003ef61000 nid=0x11cc waiting on condition [0x000000004acae000]
   java.lang.Thread.State: WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c1613c20> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.park(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
   at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"SFSWorker:Sys:4" #54 prio=5 os_prio=0 tid=0x000000003ef60800 nid=0x38c waiting on condition [0x000000004abae000]
   java.lang.Thread.State: WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c1623448> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.park(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
   at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"SFSWorker:Sys:3" #53 prio=5 os_prio=0 tid=0x000000003ef5e000 nid=0xdd0 waiting on condition [0x000000004aaaf000]
   java.lang.Thread.State: WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c1623448> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.park(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
   at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"SFSWorker:Sys:2" #52 prio=5 os_prio=0 tid=0x000000003ef5f000 nid=0x3384 waiting on condition [0x000000004a9af000]
   java.lang.Thread.State: WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c1623448> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.park(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
   at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"Scanner-0" #49 daemon prio=5 os_prio=0 tid=0x000000003ef56800 nid=0x4378 in Object.wait() [0x000000004736e000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   at java.util.TimerThread.mainLoop(Unknown Source)
   - locked <0x00000003c1d83430> (a java.util.TaskQueue)
   at java.util.TimerThread.run(Unknown Source)

"Scheduler-1777443462" #47 prio=5 os_prio=0 tid=0x000000003ef55800 nid=0x2540 waiting on condition [0x0000000043fde000]
   java.lang.Thread.State: TIMED_WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c1d591b0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
   at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
   at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"SFSWorker:Ext:3" #46 prio=5 os_prio=0 tid=0x000000003ef5c800 nid=0x3974 waiting on condition [0x0000000043cde000]
   java.lang.Thread.State: WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c1613c20> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.park(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
   at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"org.eclipse.jetty.util.RolloverFileOutputStream" #45 daemon prio=5 os_prio=0 tid=0x000000003ef5c000 nid=0x36a4 in Object.wait() [0x0000000043bdf000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   - waiting on <0x00000003c1d02638> (a java.util.TaskQueue)
   at java.util.TimerThread.mainLoop(Unknown Source)
   - locked <0x00000003c1d02638> (a java.util.TaskQueue)
   at java.util.TimerThread.run(Unknown Source)

"qtp552937500-44" #44 prio=5 os_prio=0 tid=0x000000003ef5b000 nid=0xf9c runnable [0x0000000043ade000]
   java.lang.Thread.State: RUNNABLE
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
   at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
   - locked <0x00000003c1dd2d68> (a sun.nio.ch.Util$3)
   - locked <0x00000003c1dd2d78> (a java.util.Collections$UnmodifiableSet)
   - locked <0x00000003c1dd2ce8> (a sun.nio.ch.WindowsSelectorImpl)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.select(ManagedSelector.java:243)
   at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:191)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:249)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.execute(ExecuteProduceConsume.java:100)
   at org.eclipse.jetty.io.ManagedSelector.run(ManagedSelector.java:147)
   at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
   at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
   at java.lang.Thread.run(Unknown Source)

"qtp552937500-43" #43 prio=5 os_prio=0 tid=0x000000003ef58000 nid=0x3e68 runnable [0x00000000439de000]
   java.lang.Thread.State: RUNNABLE
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
   at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
   - locked <0x00000003c1dc5790> (a sun.nio.ch.Util$3)
   - locked <0x00000003c1dc57a0> (a java.util.Collections$UnmodifiableSet)
   - locked <0x00000003c1dc5710> (a sun.nio.ch.WindowsSelectorImpl)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.select(ManagedSelector.java:243)
   at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:191)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:249)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.execute(ExecuteProduceConsume.java:100)
   at org.eclipse.jetty.io.ManagedSelector.run(ManagedSelector.java:147)
   at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
   at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
   at java.lang.Thread.run(Unknown Source)

"qtp552937500-42" #42 prio=5 os_prio=0 tid=0x000000003ef5a800 nid=0x8ec runnable [0x00000000438de000]
   java.lang.Thread.State: RUNNABLE
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
   at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
   - locked <0x00000003c1c30a48> (a sun.nio.ch.Util$3)
   - locked <0x00000003c1c30a58> (a java.util.Collections$UnmodifiableSet)
   - locked <0x00000003c1c309c8> (a sun.nio.ch.WindowsSelectorImpl)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.select(ManagedSelector.java:243)
   at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:191)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:249)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.execute(ExecuteProduceConsume.java:100)
   at org.eclipse.jetty.io.ManagedSelector.run(ManagedSelector.java:147)
   at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
   at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
   at java.lang.Thread.run(Unknown Source)

"qtp552937500-41" #41 prio=5 os_prio=0 tid=0x000000003ef52800 nid=0x2468 runnable [0x00000000437de000]
   java.lang.Thread.State: RUNNABLE
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
   at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
   - locked <0x00000003c1c31128> (a sun.nio.ch.Util$3)
   - locked <0x00000003c1c31118> (a java.util.Collections$UnmodifiableSet)
   - locked <0x00000003c1c30fb8> (a sun.nio.ch.WindowsSelectorImpl)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.select(ManagedSelector.java:243)
   at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:191)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:249)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.execute(ExecuteProduceConsume.java:100)
   at org.eclipse.jetty.io.ManagedSelector.run(ManagedSelector.java:147)
   at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
   at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
   at java.lang.Thread.run(Unknown Source)

"qtp552937500-40-acceptor-0@2575c29c-ServerConnector@7c2d9ce6{SSL,[ssl, http/1.1]}{0.0.0.0:8443}" #40 prio=5 os_prio=0 tid=0x000000003ef57000 nid=0x2504 runnable [0x00000000436de000]
   java.lang.Thread.State: RUNNABLE
   at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
   at sun.nio.ch.ServerSocketChannelImpl.accept(Unknown Source)
   at sun.nio.ch.ServerSocketChannelImpl.accept(Unknown Source)
   - locked <0x00000003c1d87d18> (a java.lang.Object)
   at org.eclipse.jetty.server.ServerConnector.accept(ServerConnector.java:373)
   at org.eclipse.jetty.server.AbstractConnector$Acceptor.run(AbstractConnector.java:593)
   at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
   at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
   at java.lang.Thread.run(Unknown Source)

"qtp552937500-39" #39 prio=5 os_prio=0 tid=0x000000003ef59800 nid=0x2ee8 runnable [0x00000000435de000]
   java.lang.Thread.State: RUNNABLE
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
   at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
   - locked <0x00000003c1dc5e58> (a sun.nio.ch.Util$3)
   - locked <0x00000003c1dc5e48> (a java.util.Collections$UnmodifiableSet)
   - locked <0x00000003c1dc5ce8> (a sun.nio.ch.WindowsSelectorImpl)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.select(ManagedSelector.java:243)
   at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:191)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:249)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.execute(ExecuteProduceConsume.java:100)
   at org.eclipse.jetty.io.ManagedSelector.run(ManagedSelector.java:147)
   at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
   at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
   at java.lang.Thread.run(Unknown Source)

"qtp552937500-38" #38 prio=5 os_prio=0 tid=0x000000003ef53800 nid=0x3f74 runnable [0x00000000434de000]
   java.lang.Thread.State: RUNNABLE
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
   at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
   - locked <0x00000003c1dc9860> (a sun.nio.ch.Util$3)
   - locked <0x00000003c1dc9850> (a java.util.Collections$UnmodifiableSet)
   - locked <0x00000003c1dc96f0> (a sun.nio.ch.WindowsSelectorImpl)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.select(ManagedSelector.java:243)
   at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:191)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:249)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.execute(ExecuteProduceConsume.java:100)
   at org.eclipse.jetty.io.ManagedSelector.run(ManagedSelector.java:147)
   at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
   at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
   at java.lang.Thread.run(Unknown Source)

"qtp552937500-37" #37 prio=5 os_prio=0 tid=0x000000003ef52000 nid=0x3248 runnable [0x00000000433de000]
   java.lang.Thread.State: RUNNABLE
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
   at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
   - locked <0x00000003c1dfca98> (a sun.nio.ch.Util$3)
   - locked <0x00000003c1dfca88> (a java.util.Collections$UnmodifiableSet)
   - locked <0x00000003c1dfc928> (a sun.nio.ch.WindowsSelectorImpl)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.select(ManagedSelector.java:243)
   at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:191)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:249)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.execute(ExecuteProduceConsume.java:100)
   at org.eclipse.jetty.io.ManagedSelector.run(ManagedSelector.java:147)
   at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
   at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
   at java.lang.Thread.run(Unknown Source)

"qtp552937500-36-acceptor-0@846465d-ServerConnector@41453a43{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}" #36 prio=5 os_prio=0 tid=0x000000003ef55000 nid=0x2f40 runnable [0x00000000432de000]
   java.lang.Thread.State: RUNNABLE
   at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
   at sun.nio.ch.ServerSocketChannelImpl.accept(Unknown Source)
   at sun.nio.ch.ServerSocketChannelImpl.accept(Unknown Source)
   - locked <0x00000003c1df4f78> (a java.lang.Object)
   at org.eclipse.jetty.server.ServerConnector.accept(ServerConnector.java:373)
   at org.eclipse.jetty.server.AbstractConnector$Acceptor.run(AbstractConnector.java:593)
   at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
   at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
   at java.lang.Thread.run(Unknown Source)

"qtp552937500-35" #35 prio=5 os_prio=0 tid=0x000000003ef58800 nid=0xc40 runnable [0x00000000431de000]
   java.lang.Thread.State: RUNNABLE
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
   at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
   - locked <0x00000003c1c34b00> (a sun.nio.ch.Util$3)
   - locked <0x00000003c1c34af0> (a java.util.Collections$UnmodifiableSet)
   - locked <0x00000003c1c34990> (a sun.nio.ch.WindowsSelectorImpl)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.select(ManagedSelector.java:243)
   at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:191)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:249)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
   at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.execute(ExecuteProduceConsume.java:100)
   at org.eclipse.jetty.io.ManagedSelector.run(ManagedSelector.java:147)
   at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
   at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
   at java.lang.Thread.run(Unknown Source)

"SFSWorker:Ext:2" #33 prio=5 os_prio=0 tid=0x000000003ef54000 nid=0x1970 waiting on condition [0x0000000041d0e000]
   java.lang.Thread.State: WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c1613c20> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.park(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
   at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"SFSWorker:Ext:1" #32 prio=5 os_prio=0 tid=0x000000003ef3e800 nid=0x748 waiting on condition [0x0000000041c0e000]
   java.lang.Thread.State: WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c1613c20> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.park(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
   at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"SFSWorker:Sys:1" #31 prio=5 os_prio=0 tid=0x000000003ef3e000 nid=0x3c28 waiting on condition [0x0000000041b0f000]
   java.lang.Thread.State: WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c1623448> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.park(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
   at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"SocketAcceptor-1" #30 prio=5 os_prio=0 tid=0x000000003ef38800 nid=0x1cfc runnable [0x0000000041a0f000]
   java.lang.Thread.State: RUNNABLE
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
   at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
   - locked <0x00000003c162e430> (a sun.nio.ch.Util$3)
   - locked <0x00000003c162e440> (a java.util.Collections$UnmodifiableSet)
   - locked <0x00000003c162e3b0> (a sun.nio.ch.WindowsSelectorImpl)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at com.smartfoxserver.bitswarm.core.SocketAcceptor.acceptLoop(SocketAcceptor.java:181)
   at com.smartfoxserver.bitswarm.core.SocketAcceptor.run(SocketAcceptor.java:160)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"SocketReader" #29 prio=5 os_prio=0 tid=0x000000003ef3c800 nid=0x2cd0 waiting on condition [0x000000004190f000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
   at java.lang.Thread.sleep(Native Method)
   at com.smartfoxserver.bitswarm.core.SocketReader.run(SocketReader.java:173)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"DatagramReader" #24 prio=5 os_prio=0 tid=0x000000003ef3a000 nid=0x2988 runnable [0x000000004180e000]
   java.lang.Thread.State: RUNNABLE
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)
   at sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)
   at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
   - locked <0x00000003c163e3e0> (a sun.nio.ch.Util$3)
   - locked <0x00000003c163e3f0> (a java.util.Collections$UnmodifiableSet)
   - locked <0x00000003c163e360> (a sun.nio.ch.WindowsSelectorImpl)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at sun.nio.ch.SelectorImpl.select(Unknown Source)
   at com.smartfoxserver.bitswarm.core.DatagramReader.readIncomingDatagrams(DatagramReader.java:123)
   at com.smartfoxserver.bitswarm.core.DatagramReader.run(DatagramReader.java:100)
   at java.lang.Thread.run(Unknown Source)

"SocketWriter-3" #28 prio=5 os_prio=0 tid=0x000000003ef3d000 nid=0x40e8 waiting on condition [0x000000004170e000]
   java.lang.Thread.State: WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c164b1d0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.park(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
   at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
   at com.smartfoxserver.bitswarm.core.SocketWriter.run(SocketWriter.java:190)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"SocketWriter-2" #27 prio=5 os_prio=0 tid=0x000000003ef3b800 nid=0x32d4 waiting on condition [0x000000004160e000]
   java.lang.Thread.State: WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c164b1d0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.park(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
   at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
   at com.smartfoxserver.bitswarm.core.SocketWriter.run(SocketWriter.java:190)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"SocketWriter-1" #26 prio=5 os_prio=0 tid=0x000000003ef38000 nid=0x24bc waiting on condition [0x000000004150f000]
   java.lang.Thread.State: WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c164b1d0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.park(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
   at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
   at com.smartfoxserver.bitswarm.core.SocketWriter.run(SocketWriter.java:190)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"Scheduler1-thread-1" #25 prio=5 os_prio=0 tid=0x000000003ef39800 nid=0x31e0 waiting on condition [0x000000004140f000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
   at java.lang.Thread.sleep(Native Method)
   at com.smartfoxserver.bitswarm.util.scheduling.Scheduler.run(Scheduler.java:153)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"Abandoned connection cleanup thread" #23 daemon prio=5 os_prio=0 tid=0x000000003ef3b000 nid=0x41a0 in Object.wait() [0x0000000040a8e000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   at java.lang.ref.ReferenceQueue.remove(Unknown Source)
   - locked <0x00000003c1613ec8> (a java.lang.ref.ReferenceQueue$Lock)
   at com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:64)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"pool-1-thread-4" #22 prio=5 os_prio=0 tid=0x000000003ee9e800 nid=0x11b0 waiting on condition [0x000000004098e000]
   java.lang.Thread.State: TIMED_WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c1614220> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
   at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
   at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"Thread-4" #21 daemon prio=1 os_prio=-2 tid=0x000000003ee8a800 nid=0x3c1c waiting on condition [0x000000004078f000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
   at java.lang.Thread.sleep(Native Method)
   at org.apache.commons.vfs.impl.DefaultFileMonitor.run(DefaultFileMonitor.java:404)
   at java.lang.Thread.run(Unknown Source)

"pool-1-thread-3" #20 prio=5 os_prio=0 tid=0x000000003ee84000 nid=0x1cf8 waiting on condition [0x000000004068f000]
   java.lang.Thread.State: WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c1614220> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.park(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
   at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
   at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"pool-1-thread-2" #19 prio=5 os_prio=0 tid=0x000000003ed3d800 nid=0x3724 waiting on condition [0x000000004058e000]
   java.lang.Thread.State: WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c1614220> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.park(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
   at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
   at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"pool-1-thread-1" #18 prio=5 os_prio=0 tid=0x000000003ed3c800 nid=0x301c waiting on condition [0x000000004048f000]
   java.lang.Thread.State: WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c1614220> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.park(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
   at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
   at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"pool-2-thread-1" #17 prio=5 os_prio=0 tid=0x000000003ec81000 nid=0x295c waiting on condition [0x000000004038e000]
   java.lang.Thread.State: TIMED_WAITING (parking)
   at sun.misc.Unsafe.park(Native Method)
   - parking to wait for  <0x00000003c16236f0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
   at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
   at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
   at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
   at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

"org.apache.commons.vfs.cache.SoftRefFilesCache$SoftRefReleaseThread" #16 daemon prio=5 os_prio=0 tid=0x000000003ec80000 nid=0x26f0 in Object.wait() [0x000000004028e000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   at java.lang.ref.ReferenceQueue.remove(Unknown Source)
   - locked <0x00000003c162e698> (a java.lang.ref.ReferenceQueue$Lock)
   at org.apache.commons.vfs.cache.SoftRefFilesCache$SoftRefReleaseThread.run(SoftRefFilesCache.java:79)

"Exe4JStartupThread" #12 daemon prio=5 os_prio=0 tid=0x000000003e673000 nid=0x208 waiting on condition [0x000000003ebbf000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
   at java.lang.Thread.sleep(Native Method)
   at com.exe4j.Controller$StartupThread.run(Unknown Source)

"Service Thread" #10 daemon prio=9 os_prio=0 tid=0x000000003c70b000 nid=0x3c74 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread3" #9 daemon prio=9 os_prio=2 tid=0x000000003c685000 nid=0x237c runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread2" #8 daemon prio=9 os_prio=2 tid=0x000000003c684000 nid=0x2ff4 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #7 daemon prio=9 os_prio=2 tid=0x000000003c67d800 nid=0x234c waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x000000003c67a000 nid=0x17e8 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x000000003c678800 nid=0x484 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x000000003c675800 nid=0x3c7c runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=1 tid=0x000000003c663800 nid=0x3d74 in Object.wait() [0x000000003d9cf000]
   java.lang.Thread.State: WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   at java.lang.ref.ReferenceQueue.remove(Unknown Source)
   - locked <0x00000003c164b788> (a java.lang.ref.ReferenceQueue$Lock)
   at java.lang.ref.ReferenceQueue.remove(Unknown Source)
   at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

"Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x000000003afa2000 nid=0x604 in Object.wait() [0x000000003d8cf000]
   java.lang.Thread.State: WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   at java.lang.Object.wait(Unknown Source)
   at java.lang.ref.Reference.tryHandlePending(Unknown Source)
   - locked <0x00000003c162e840> (a java.lang.ref.Reference$Lock)
   at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)

"main" #1 prio=5 os_prio=0 tid=0x0000000005118000 nid=0x2014 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"VM Thread" os_prio=2 tid=0x000000003af98000 nid=0x334c runnable

"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x000000000512e800 nid=0x3ca8 runnable

"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x0000000005130000 nid=0x33fc runnable

"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x0000000005131800 nid=0x1758 runnable

"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x0000000005133000 nid=0x2058 runnable

"GC task thread#4 (ParallelGC)" os_prio=0 tid=0x0000000005135800 nid=0x2524 runnable

"GC task thread#5 (ParallelGC)" os_prio=0 tid=0x0000000005136800 nid=0x4e4 runnable

"GC task thread#6 (ParallelGC)" os_prio=0 tid=0x0000000005139800 nid=0x3390 runnable

"GC task thread#7 (ParallelGC)" os_prio=0 tid=0x000000000513c000 nid=0x79c runnable

"GC task thread#8 (ParallelGC)" os_prio=0 tid=0x000000000513d000 nid=0x1fec runnable

"GC task thread#9 (ParallelGC)" os_prio=0 tid=0x000000000513e800 nid=0x39e0 runnable

"VM Periodic Task Thread" os_prio=2 tid=0x000000003c762000 nid=0x40f0 waiting on condition

JNI global references: 337


The request thats being sent to the server is:

Code: Select all

sfs.Send(new ExtensionRequest("getModel", new SFSObject()));

(sent when moving)

And this is what the client should receive:

Code: Select all

package altarianonline;

import altarianonline.model.*;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


import com.smartfoxserver.v2.annotations.Instantiation;
import com.smartfoxserver.v2.annotations.Instantiation.InstantiationMode;
import com.smartfoxserver.v2.entities.User;
import com.smartfoxserver.v2.entities.data.ISFSArray;
import com.smartfoxserver.v2.entities.data.ISFSObject;
import com.smartfoxserver.v2.entities.data.SFSArray;
import com.smartfoxserver.v2.entities.data.SFSObject;
import com.smartfoxserver.v2.extensions.BaseClientRequestHandler;

@Instantiation(InstantiationMode.SINGLE_INSTANCE)
public class GetModelHandler extends BaseClientRequestHandler
{
   private final ISFSObject model;
       
   
   public GetModelHandler()
    {
      this.model = generateModel();
               
    }
   
   @Override
   public void handleClientRequest(User sender, ISFSObject params)
   {
      // We just send the data model as SFSObject
       send("getModel", model, sender);
            trace("getModel Sent back to: " + sender);
            trace("Model: " + model);
            trace("Model:" + model.getDump());
            trace("Model:" + model.toString());
           
   }
   
   /*
    * Generate the data model
    */
   private ISFSObject generateModel()
   {
      // --- Character #1 -------------------------------------------------------------------------------------------------------
      RpgCharacter knightOfTheRoundTable1 = new RpgCharacter("Sigfried", "knight", new KnightSkin("roundTableKnight", "WarriorSkin"));
      
      List<Item> items1 = new ArrayList<>();
      items1.add(new ShieldItem("longSword", 500));
      
      Map<String, CharacterProperty> props1 = new HashMap<>();
      props1.put("strength", new CharacterProperty(60, 100, "str"));
      props1.put("endurance", new CharacterProperty(70, 100, "end"));
      props1.put("combatSkill", new CharacterProperty(55, 100, "csk"));
      
      Map<String, Spell> spells1 = new HashMap<>();
      spells1.put("swarm", new SpiderSwarmSpell("spss", 3));
      
      knightOfTheRoundTable1.setInventory(items1);
      knightOfTheRoundTable1.setProperties(props1);
      knightOfTheRoundTable1.setSpells(spells1);
      
      
      // --- Prepare SFSOBJECT --------------------------------------------------------------------
      ISFSObject sfsObj = SFSObject.newInstance();
      
      ISFSArray knightsArray = SFSArray.newInstance();
      knightsArray.addClass(knightOfTheRoundTable1);
      
      sfsObj.putSFSArray("knights", knightsArray);
      sfsObj.putClass("knife", new ShieldItem("MortalShield", 3000));
      sfsObj.putClass("spell", new DeathRaySpell("drs", 90));
      sfsObj.putBool("isRpg", true);
      sfsObj.putIntArray("randomValues", Arrays.asList(new Integer[] {100,45,62,51,7,13,161}));
               
      return sfsObj;
               
   }
}


Will keep testing!
Sanity1993
Posts: 26
Joined: 30 Jan 2018, 21:14

Re: Serialization, OnExtensionResponse Not firing

Postby Sanity1993 » 01 Feb 2018, 21:17

Okay so done some more testing while at home.

Changed the server extension to send back in the normal way (which i prefer). And its still sending fine.

Code: Select all

package altarianonline;

import altarianonline.model.*;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


import com.smartfoxserver.v2.annotations.Instantiation;
import com.smartfoxserver.v2.annotations.Instantiation.InstantiationMode;
import com.smartfoxserver.v2.entities.User;
import com.smartfoxserver.v2.entities.data.ISFSArray;
import com.smartfoxserver.v2.entities.data.ISFSObject;
import com.smartfoxserver.v2.entities.data.SFSArray;
import com.smartfoxserver.v2.entities.data.SFSObject;
import com.smartfoxserver.v2.extensions.BaseClientRequestHandler;

@Instantiation(InstantiationMode.SINGLE_INSTANCE)
public class GetModelHandler extends BaseClientRequestHandler
{
   
   @Override
   public void handleClientRequest(User sender, ISFSObject params)
   {
      // We just send the data model as SFSObject
           
      // --- Character #1 -------------------------------------------------------------------------------------------------------
      RpgCharacter knightOfTheRoundTable1 = new RpgCharacter("Sigfried", "knight", new KnightSkin("roundTableKnight", "WarriorSkin"));
      
      List<Item> items1 = new ArrayList<>();
      items1.add(new ShieldItem("longSword", 500));
      
      Map<String, CharacterProperty> props1 = new HashMap<>();
      props1.put("strength", new CharacterProperty(60, 100, "str"));
      props1.put("endurance", new CharacterProperty(70, 100, "end"));
      props1.put("combatSkill", new CharacterProperty(55, 100, "csk"));
      
      Map<String, Spell> spells1 = new HashMap<>();
      spells1.put("swarm", new SpiderSwarmSpell("spss", 3));
      
      knightOfTheRoundTable1.setInventory(items1);
      knightOfTheRoundTable1.setProperties(props1);
      knightOfTheRoundTable1.setSpells(spells1);
      
      
      // --- Prepare SFSOBJECT --------------------------------------------------------------------
      ISFSObject sfsObj = SFSObject.newInstance();
      
      ISFSArray knightsArray = SFSArray.newInstance();
      knightsArray.addClass(knightOfTheRoundTable1);
      
      sfsObj.putSFSArray("knights", knightsArray);
      sfsObj.putClass("knife", new ShieldItem("MortalShield", 3000));
      sfsObj.putClass("spell", new DeathRaySpell("drs", 90));
      sfsObj.putBool("isRpg", true);
      sfsObj.putIntArray("randomValues", Arrays.asList(new Integer[] {100,45,62,51,7,13,161}));
               
      send("getModel", sfsObj, sender);
                trace("getModel", sfsObj, sender);
               
   }

}


Fire that on multiple occasions and still nothing on client.

Code: Select all

21:27:17,257 INFO  [SFSWorker:Ext:1] Extensions     - {altExt}: getModel [SFSObject, size: 5] ( User Name: Unity, Id: 0, Priv: 0, Sess: 127.0.0.1:61053 )
21:27:17,265 INFO  [SFSWorker:Ext:3] Extensions     - {altExt}: getModel [SFSObject, size: 5] ( User Name: Unity, Id: 0, Priv: 0, Sess: 127.0.0.1:61053 )
21:27:17,280 INFO  [SFSWorker:Ext:2] Extensions     - {altExt}: getModel [SFSObject, size: 5] ( User Name: Unity, Id: 0, Priv: 0, Sess: 127.0.0.1:61053 )
21:27:17,311 INFO  [SFSWorker:Ext:4] Extensions     - {altExt}: getModel [SFSObject, size: 5] ( User Name: Unity, Id: 0, Priv: 0, Sess: 127.0.0.1:61053 )
21:27:17,331 INFO  [SFSWorker:Ext:1] Extensions     - {altExt}: getModel [SFSObject, size: 5] ( User Name: Unity, Id: 0, Priv: 0, Sess: 127.0.0.1:61053 )
21:27:17,363 INFO  [SFSWorker:Ext:3] Extensions     - {altExt}: getModel [SFSObject, size: 5] ( User Name: Unity, Id: 0, Priv: 0, Sess: 127.0.0.1:61053 )


Will keep trying.
Sanity1993
Posts: 26
Joined: 30 Jan 2018, 21:14

Re: Serialization, OnExtensionResponse Not firing

Postby Sanity1993 » 01 Feb 2018, 21:36

Possibly getting somewhere...
Added LogListeneners to the main scrips

Code: Select all

   sfs.AddLogListener(LogLevel.DEBUG, OnExtensionResponse);
        Debug.Log("[SFS DEBUG]" + message);
        Debug.Log("[SFS DEBUG]" + message);
        sfs.AddLogListener(LogLevel.ERROR, OnExtensionResponse);
        Debug.Log("[SFS ERROR]" + message);
        sfs.AddLogListener(LogLevel.INFO, OnExtensionResponse);
        Debug.Log("[SFS INFO]" + message);
        sfs.AddLogListener(LogLevel.WARN, OnExtensionResponse);
        Debug.Log("[SFS WARN]" + message);


To which unity spat out! (Unity logging)... Something!

Code: Select all

[SFS INFO]Error handling data: Cannot find type: altarianonline.model.KnightSkin   at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.Sfs2Cs (ISFSObject sfsObj) [0x00000] in <filename unknown>:0
  at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeObject (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
  at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeSFSObject (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
UnityEngine.Debug:Log(Object)
GameManager:infoLogMessage(BaseEvent) (at Assets/Scripts/GameManager.cs:165)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
GameManager:FixedUpdate() (at Assets/Scripts/GameManager.cs:191)


hopefully :) Just hopefully

will keep plugging away
Sanity1993
Posts: 26
Joined: 30 Jan 2018, 21:14

Re: Serialization, OnExtensionResponse Not firing

Postby Sanity1993 » 01 Feb 2018, 22:41

Finally cracked it.

With serialization failing. The "onExtensionResponse" is never fired as it doesnt seem to get to that stage ?

After correcting the [u]namespace and adding[/u]

Code: Select all

using System.Reflection;
using Sfs2X.Protocol.Serialization;

Code: Select all

OnStart(){
DefaultSFSDataSerializer.RunningAssembly = Assembly.GetExecutingAssembly();...



So anyone else struggling use these little gems!

Code: Select all

        sfs.AddLogListener(LogLevel.DEBUG, debugLogMessage);
        Debug.Log("[SFS DEBUG]" + message);
        sfs.AddLogListener(LogLevel.ERROR, infoLogMessage);
        Debug.Log("[SFS ERROR]" + message);
        sfs.AddLogListener(LogLevel.INFO, infoLogMessage);
        Debug.Log("[SFS INFO]" + message);
        sfs.AddLogListener(LogLevel.WARN, warnLogMessage);
        Debug.Log("[SFS WARN]" + message);
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Serialization, OnExtensionResponse Not firing

Postby Lapo » 02 Feb 2018, 08:24

Hi,
basically the error is telling you that you don't have a corresponding client-side class for your server side "altarianonline.model.KnightSkin".
You need to "mirror" it by creating a similar class on the client so that the serializer can recreate the object.

Makes sense?
Lapo

--

gotoAndPlay()

...addicted to flash games
Sanity1993
Posts: 26
Joined: 30 Jan 2018, 21:14

Re: Serialization, OnExtensionResponse Not firing

Postby Sanity1993 » 02 Feb 2018, 08:40

Lapo class was there just with a capital letter not a lowercase :(

Slightest things eh...
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Serialization, OnExtensionResponse Not firing

Postby Lapo » 02 Feb 2018, 08:50

Yep, names must be matching, in a strict way :)
Lapo

--

gotoAndPlay()

...addicted to flash games
Sanity1993
Posts: 26
Joined: 30 Jan 2018, 21:14

Re: Serialization, OnExtensionResponse Not firing

Postby Sanity1993 » 02 Feb 2018, 22:59

Lapo unsure if to keep posing here or create a new thread...
slight issue with "unboxing" the default serialized knight Sigfred.

I'll break down the WarriorSkin.class into three parts,
Start....

Code: Select all

using Sfs2X.Protocol.Serialization;
using UnityEngine;

namespace altarianonline.model
{

    public class WarriorSkin : Skin, SerializableSFSType
    {


Default Constructor

Code: Select all

public WarriorSkin(string id, object graphix)
      {
         this._id = id;
         this._graphix = graphix;

      }

rest of getters/setters

Code: Select all

      public string _id;
      public object _graphix;

      public string id {
         get {
            return _id;
         }
         set {
            this._id = id;
         }
      }

      public object graphix {
         get {
            return _graphix;
         }
         set {
            this._graphix = graphix;
         }
      }
   }
 }


So server is sending fine. I'm trying to unpack it essencially but unity is throwing an error. Which i cannot work out if its Unity SFS2x or what.
Error is:
23:04:08,746 INFO [SFSWorker:Ext:3] Extensions - {altExt}: [INFO]Error handling data: Method not found: 'Default constructor not found...ctor() of altarianonline.model.WarriorSkin'. at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00095] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:368
at System.Activator.CreateInstance (System.Type type) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:254
at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.Sfs2Cs (ISFSObject sfsObj) [0x00000] in <filename unknown>:0
at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeObject (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeSFSObject (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeObject (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeSFSArray (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeObject (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeSFSObject (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeObject (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeSFSArray (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeObject (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeSFSObject (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeObject (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeSFSObject (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeObject (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.DecodeSFSObject (Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.Binary2Object (Sfs2X.Util.ByteArray data) [0x00000] in <filename unknown>:0
at Sfs2X.Entities.Data.SFSObject.NewFromBinaryData (Sfs2X.Util.ByteArray ba) [0x00000] in <filename unknown>:0
at Sfs2X.Core.SFSProtocolCodec.OnPacketRead (Sfs2X.Util.ByteArray packet) [0x00000] in <filename unknown>:0
at Sfs2X.Core.SFSIOHandler.HandlePacketData (Sfs2X.Util.ByteArray data) [0x00000] in <filename unknown>:0


Now the odd part, the scripts compile fine and with that default constructor there it should only use it if it can find it ?

However if i add a blank constructor so....

Code: Select all

      public WarriorSkin()
{
      }


Script it's still programmatically correct. and compiles same as before. However this doesnt assign any values like i want it too.

Having both a blank constructor and the one assigning it can only ever see the blank one...

Am i missing something ?
Sanity1993
Posts: 26
Joined: 30 Jan 2018, 21:14

Re: Serialization, OnExtensionResponse Not firing

Postby Sanity1993 » 05 Feb 2018, 08:39

@Lapo any ideas ? I still cannot work it out. I set the constructor as base and it still doesnt use the parameter constructor
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Serialization, OnExtensionResponse Not firing

Postby Lapo » 05 Feb 2018, 08:48

The empty constructor is only necessary for the serializer.
You can still use your own custom constructor in your code, no problem, but the serializer will use the empty one and then will populate all fields via the getters/setters.

Makes sense?
Lapo

--

gotoAndPlay()

...addicted to flash games
Sanity1993
Posts: 26
Joined: 30 Jan 2018, 21:14

Re: Serialization, OnExtensionResponse Not firing

Postby Sanity1993 » 06 Feb 2018, 09:41

Okay Lapo, i used the blank constructor, added in break lines for the code to see whats being fired and whats not. Linking that to Unity etc. Was a great insight. So on the RPG Character script after u have get and set everything then iterate through everything writing to unitys console.

Code: Select all

public string toString()
        {
            Debug.Log("RPG Character: " + _name);
            Debug.Log("Type: " + _type);
            if (_inventory != null)
            {
                Debug.Log("Inventory is not null");
                foreach (Item Item in _inventory)
                {
                    Debug.Log("Item: " + Item);
                }

            }
            if (_spells != null)
            {
                Debug.Log("_spells is not null");
                foreach (Spell spell in _spells)
                {
                    Debug.Log("Spells: " + spell);
                }

            }
            if (_properties != null)
            {
                Debug.Log("properties is not null");
                foreach (CharacterProperty prop in _properties)
                {
                    Debug.Log("Properties: " + prop);
                }
            }


From the break lines "_inventory" "_Spells" "_properties" are always null.

I have attached my project as i'm literally out of ideas. -- https://1drv.ms/u/s!AsFl4d93IzThi68Nj4BrFZOahXY6Hg

Thanks in advance.
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Serialization, OnExtensionResponse Not firing

Postby Lapo » 08 Feb 2018, 08:52

Sorry for the silence. We'll have to setup the example you sent us and test it out.
I'll get back to you asap.
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Serialization, OnExtensionResponse Not firing

Postby Lapo » 08 Feb 2018, 10:20

We've tested your project.
When the client logs in a Room is created then the getModel Extension command is invoked.

At this point we see this response back at the client:

Code: Select all

(sfs_array) knights:
   (class) null

(class) spell: altarianonline.model.DeathRaySpell
(class) knife: altarianonline.model.ShieldItem
(bool) isRpg: True
(int_array) randomValues: [System.Int32[]]

This shows that the SFSArray containing the RpgCharacter instances has not been populated but the data was sent from the server. The array is expected to contain one instance of the RpgCharacter class.

Checking your RpgCharacter C# class I've noticed that it extends the MonoBehavior class, a very complex class which is likely the cause of the problem. By removing the inheritance the problem seems fixed and executing the test again shows this result on the client:

Code: Select all

(sfs_array) knights:
      (class) altarianonline.model.RpgCharacter
   
   (class) spell: altarianonline.model.DeathRaySpell
   (class) knife: altarianonline.model.ShieldItem
   (bool) isRpg: True
   (int_array) randomValues: [System.Int32[]]


The SFSArray is now populated of RpgCharacter instance(s).

The bottom line is that you have to be careful with inheritance as it can break the serializer especially when you're dealing with very complex class structures (as MonoBehavior). The class serialization system is pretty basic in its current form and doesn't deal with inheritance.

The are multiple reasons for this:
1) we have to support different client languages with different OOP paradigms and approaches at reflection, while maintaining consistency
2) performance can be severely degraded by recursively traversing complex data structures via reflection, especially on mobile devices

If your data uses simple data classes such as those we've proposed in our examples you'll be fine with class serialization and it will save you some time.

Alternatively you can use more complex data structures and avoid the limitations of SFS class serialization by adding a toSFSObject() and fromSFSObject() methods in your data classes and implementing the serialization yourself.

This last approach takes a bit of extra work but it's the most flexible and allows for a fine grained serialization, e.g. you can select which fields you want to transmit and when. It also saves bandwidth as class serialization has a certain amount of overhead.

Hope it helps
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 36 guests