Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<Error encoding object: java.lang.IllegalArgumentException: null> in server side #239

Open
kidysnoopy opened this issue Sep 15, 2017 · 0 comments
Assignees

Comments

@kidysnoopy
Copy link

Issue

Short description

When we use [org.red5.server.so.SharedObject.sendMessage()」function to send data of ByteArray to client in the red5 server,
sometimes it shows [ERROR o.r.s.n.r.codec.RTMPProtocolEncoder - Error encoding object: java.lang.IllegalArgumentException: null] in red5.log file
Could you please help check how to solve this problem?

Environment

[] Operating system and version: Red Hat Enterprise Linux5
[] Java version: jdk1.6.0_30
[] Red5 version: Red5 Server 1.0.1 $Rev: 4450 $
[] Client Version: ActionScript 4.0
[] AMF Version: AMF3

Code

public void setBackgroundImage(ByteArray backgroudImage, int width, int height) {
	// call flash function
	List<Object> arguments = new ArrayList<Object>();
	arguments.add(backgroudImage);
	arguments.add(width);
	arguments.add(height);
	whiteBoardSO.sendMessage("setBackgroundImage", arguments);
}

Logs

[SharedObjectThread-2] ERROR o.r.s.n.r.codec.RTMPProtocolEncoder - Error encoding object:
java.lang.IllegalArgumentException: null
at java.nio.Buffer.position(Buffer.java:216) ~[na:1.6.0_30]
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:129) ~[na:1.6.0_30]
at org.apache.mina.core.buffer.AbstractIoBuffer.get(AbstractIoBuffer.java:615) ~[mina-core-2.0.7.jar:na]
at org.apache.mina.core.buffer.AbstractIoBuffer.get(AbstractIoBuffer.java:1321) ~[mina-core-2.0.7.jar:na]
at org.red5.io.amf3.Output.writeByteArray(Output.java:534) ~[red5-server-1.0.jar:na]
at org.red5.io.object.Serializer.serialize(Serializer.java:80) ~[red5-server-1.0.jar:na]
at org.red5.io.object.Serializer.serialize(Serializer.java:60) ~[red5-server-1.0.jar:na]
at org.red5.server.net.rtmp.codec.RTMPProtocolEncoder.doEncodeSharedObject(RTMPProtocolEncoder.java:691) ~[red5-server-1.0.jar:na]
at org.red5.server.net.rtmp.codec.RTMPProtocolEncoder.encodeFlexSharedObject(RTMPProtocolEncoder.java:597) ~[red5-server-1.0.jar:na]
at org.red5.server.net.rtmp.codec.RTMPProtocolEncoder.encodeMessage(RTMPProtocolEncoder.java:543) ~[red5-server-1.0.jar:na]
at org.red5.server.net.rtmp.codec.RTMPProtocolEncoder.encodePacket(RTMPProtocolEncoder.java:147) ~[red5-server-1.0.jar:na]
at org.red5.server.net.rtmp.codec.RTMPProtocolEncoder.encode(RTMPProtocolEncoder.java:119) ~[red5-server-1.0.jar:na]
at org.red5.server.net.rtmp.codec.RTMPMinaProtocolEncoder.encode(RTMPMinaProtocolEncoder.java:48) [red5-server-1.0.jar:na]
at org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:308) [mina-core-2.0.7.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:482) [mina-core-2.0.7.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1400(DefaultIoFilterChain.java:47) [mina-core-2.0.7.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.filterWrite(DefaultIoFilterChain.java:775) [mina-core-2.0.7.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.filterWrite(DefaultIoFilterChain.java:705) [mina-core-2.0.7.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:482) [mina-core-2.0.7.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireFilterWrite(DefaultIoFilterChain.java:475) [mina-core-2.0.7.jar:na]
at org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:494) [mina-core-2.0.7.jar:na]
at org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:439) [mina-core-2.0.7.jar:na]
at org.red5.server.net.rtmp.RTMPMinaConnection.write(RTMPMinaConnection.java:308) [red5-server-1.0.jar:na]
at org.red5.server.net.rtmp.Channel.write(Channel.java:136) [red5-server-1.0.jar:na]
at org.red5.server.net.rtmp.Channel.write(Channel.java:105) [red5-server-1.0.jar:na]
at org.red5.server.net.rtmp.RTMPConnection.sendSharedObjectMessage(RTMPConnection.java:983) [red5-server-1.0.jar:na]
at org.red5.server.so.SharedObject$1.run(SharedObject.java:332) [red5-server-1.0.jar:na]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_30]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_30]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_30]

@mondain mondain self-assigned this Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants