NegativeArraySizeException

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

Moderators: Lapo, Bax

zynbasil
Posts: 35
Joined: 23 May 2016, 03:59

NegativeArraySizeException

Postby zynbasil » 28 Nov 2018, 07:27

sfs2x:2.13.4
client: JavaScript 1.7.13

Occasionally appear:

Code: Select all

java.lang.NegativeArraySizeException
at sfs2x.websocket.SFS2XWSService$WSChannelListener.onWebSocketBinary(SFS2XWSService.java:264)
at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onBinaryMessage(JettyListenerEventDriver.java:82)
at org.eclipse.jetty.websocket.common.message.SimpleBinaryMessage.messageComplete(SimpleBinaryMessage.java:68)
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:66)
at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onBinaryFrame(JettyListenerEventDriver.java:68)
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:157)
at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:376)
at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:220)
at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:220)
at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:256)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:679)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:511)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
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(Thread.java:745)



Code: Select all

java.io.IOException: Cannot append to finished buffer
at org.eclipse.jetty.websocket.common.message.SimpleBinaryMessage.appendFrame(SimpleBinaryMessage.java:48)
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:62)
at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onBinaryFrame(JettyListenerEventDriver.java:68)
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:157)
at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:376)
at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:220)
at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:220)
at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:256)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:679)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:511)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
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(Thread.java:745)
User avatar
Lapo
Site Admin
Posts: 21012
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: NegativeArraySizeException

Postby Lapo » 28 Nov 2018, 08:16

Hi,
thanks for reporting. It might be symptom of a network error, perhaps from client side.
Any ways to reproduce it?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
zynbasil
Posts: 35
Joined: 23 May 2016, 03:59

Re: NegativeArraySizeException

Postby zynbasil » 29 Nov 2018, 12:07

This is online server's error,I do not know how to reproduce it~

ccu: 3500
User avatar
Lapo
Site Admin
Posts: 21012
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: NegativeArraySizeException

Postby Lapo » 29 Nov 2018, 14:35

Without a way to reproduce there's not much we can do.
If the issue is not very frequent it's likely due to a network issue, very likely from client side.

It could even be caused by a random bot scanning the web and attempting random connections to http servers.

How frequent is this error during one day for example?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
zynbasil
Posts: 35
Joined: 23 May 2016, 03:59

Re: NegativeArraySizeException

Postby zynbasil » 01 Dec 2018, 16:38

It could even be caused by a random bot scanning the web and attempting random connections to http servers.
---How can I be sure this is the reason?
How frequent is this error during one day for example?
---Not often。some time 1 hours, some time 10 hours
User avatar
Lapo
Site Admin
Posts: 21012
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: NegativeArraySizeException

Postby Lapo » 03 Dec 2018, 08:35

zynbasil wrote:---How can I be sure this is the reason?

The error suggests that malformed data is being fed to the server which suggests either a network issue or a non-SmartFox client trying to exchange data and failing.

Not often。some time 1 hours, some time 10 hours

And what is the average traffic on your server?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
zynbasil
Posts: 35
Joined: 23 May 2016, 03:59

Re: NegativeArraySizeException

Postby zynbasil » 17 Dec 2018, 09:02

I can't upload img

Error
Sorry, the board attachment quota has been reached.
User avatar
Lapo
Site Admin
Posts: 21012
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: NegativeArraySizeException

Postby Lapo » 17 Dec 2018, 09:35

zynbasil wrote:I can't upload img

Sorry about that. I have updated the forums config, you should be able to do it now.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
zynbasil
Posts: 35
Joined: 23 May 2016, 03:59

Re: NegativeArraySizeException

Postby zynbasil » 18 Dec 2018, 01:35

what is the average traffic on your server?

580C7368-6351-4413-B8FC-7EF674DDA67F (1).png
(111.91 KiB) Not downloaded yet

A13219ED-0828-4BD5-B410-A13EA97B1D91.png
(236.92 KiB) Not downloaded yet

99B05DB3-B53D-432F-92C5-3F84946435FC.png
(178.87 KiB) Not downloaded yet
User avatar
Lapo
Site Admin
Posts: 21012
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: NegativeArraySizeException

Postby Lapo » 18 Dec 2018, 08:39

Thanks.
Going back to the first post, you reported two errors.
As I mentioned the first one sounds very much like bad data sent from the client, in other words it looks like the client is not a real SmartFox client.

The second one is more Jetty related, and I am not sure if it's a Jetty issue we don't know about or again something related to a network issue. Do you see these two types of errors happening together in the logs?

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 19 guests