0
votes

actually I'm using netty 3.2.7 in a custom streaming server project. I'm trying upgrading to netty 3.3.x but I encountered problems related to "Unsafe".

I have a handler that subclass "ChunkedWriteHandler" and another class that subclass "ChunkedInput" in order to implement chunked http data trasfer to the clients.

After upgrading to 3.3.x my code breaks with the following message:

Invalid memory access of location 0x15e47da eip=0x708666

Looking at the source code I can see that now the buffer used inside ChunkedWriteHandler uses Unsafe to optimize some operations but I can't understand what I'm doing wrong (for causing an invalid memory access) and how to fix this issue.

Can some netty guru help me to understand and fix my problem?

Thanks, Rocco

1
This sounds more like a jdk bug. What java version are you using ?Norman Maurer
I've made other tests. On my primary dev machine, a 32 bit mac os 10.5 with the latest java 5, i experience the issue reported above. On my notebook, a 64 bit mac os 10.7 with the latest java 6 everything seems working properly.Rocco Zanni
Yeah like I said it looks like a jdk bugNorman Maurer

1 Answers

0
votes

In netty 3.4.1.Final its now possible to disable unsafe via "-Dorg.jboss.netty.tryUnsafe=false"