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

Bug when send binary data #755

Open
wettper opened this issue May 22, 2020 · 4 comments
Open

Bug when send binary data #755

wettper opened this issue May 22, 2020 · 4 comments

Comments

@wettper
Copy link

wettper commented May 22, 2020

Buy when send binary, there happened circular reference, but the same binary data sometimes has problems, sometimes normal

how i call :

@Override
public void sendEvent(String name, Object... data) {
    Packet packet = new Packet(PacketType.MESSAGE);
    packet.setSubType(PacketType.EVENT);
    packet.setName(name);
    packet.setData(Arrays.asList(data));
    send(packet);
}

and i have try:

@Override
public void sendEvent(String name, Object... data) {
    Packet packet = new Packet(PacketType.MESSAGE);
    packet.setSubType(PacketType.BINARY_EVENT);
    packet.setName(name);
    packet.setData(Arrays.asList(data));
    send(packet);
}
Error content: 
org.redisson.client.RedisException: Unexpected exception while processing command
	at org.redisson.command.CommandAsyncService.convertException(CommandAsyncService.java:320)
	at org.redisson.command.CommandAsyncService.get(CommandAsyncService.java:165)
	at org.redisson.RedissonTopic.publish(RedissonTopic.java:61)
	at com.corundumstudio.socketio.store.RedissonPubSubStore.publish(RedissonPubSubStore.java:50)
  .....
  .....
  Caused by: com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain: io.netty.buffer.UnpooledByteBufAllocator["emptyBuf"]->io.netty.buffer.EmptyByteBuf["alloc"]->io.netty.buffer.UnpooledByteBufAllocator["emptyBuf"]->io.netty.buffer.EmptyByteBuf["alloc"]->io.netty.buffer.UnpooledByteBufAllocator["emptyBuf"]->io.netty.buffer.EmptyByteBuf["alloc"]->io.netty.buffer.UnpooledByteBufAllocator["emptyBuf"]->io.netty.buffer.EmptyByteBuf["alloc"]->io.netty.buffer.UnpooledByteBufAllocator["emptyBuf"]->io.netty.buffer.EmptyByteBuf["alloc"]->io.netty.buffer.UnpooledByteBufAllocator["emptyBuf"]->io.netty.buffer.EmptyByteBuf["alloc"]->io.netty.buffer.UnpooledByteBufAllocator["emptyBuf"]->io.netty.buffer.EmptyByteBuf["alloc"]->io.netty.buffer.UnpooledByteBufAllocator["emptyBuf"]
.....
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
......
Caused by: java.lang.StackOverflowError: null
	at java.lang.Exception.<init>(Exception.java:66)
	at java.io.IOException.<init>(IOException.java:58)
	at com.fasterxml.jackson.core.JsonProcessingException.<init>(JsonProcessingException.java:25)
	at com.fasterxml.jackson.core.JsonProcessingException.<init>(JsonProcessingException.java:41)
	at com.fasterxml.jackson.databind.JsonMappingException.<init>(JsonMappingException.java:251)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:706)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:581)
......
@wettper
Copy link
Author

wettper commented May 22, 2020

Use version is

<dependency>
   <groupId>com.corundumstudio.socketio</groupId>
   <artifactId>netty-socketio</artifactId>
   <version>1.7.12</version>
</dependency>
<dependency>
   <groupId>org.redisson</groupId>
   <artifactId>redisson</artifactId>
   <version>2.8.1</version>
</dependency>

@wettper
Copy link
Author

wettper commented May 22, 2020

@mrniko

@mrniko
Copy link
Owner

mrniko commented Jun 11, 2020

Did you try to use 1.7.18 version?

@wettper
Copy link
Author

wettper commented Jul 9, 2020

Did you try to use 1.7.18 version?

Did you mean version of 1.7.18 has been fixed this bug,I have try 1.7.14

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