question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NullPointerException in AbstractHttp2StreamChannel

See original GitHub issue

Expected behavior

No NPE’s

Actual behavior

NPE’s

Netty version

4.1.37-Final.

I don’t have a clean repro for this, it’s showing up in tests that I’m running to upgrade Netty in finagle. A representitive stack trace looks like this:

285 2019-07-16 11:01:39,967 ERR Caught Throwable from listener onStreamClosed.
 286 java.lang.NullPointerException: null
 287         at io.netty.handler.codec.http2.AbstractHttp2StreamChannel$Http2ChannelUnsafe.doBeginRead(AbstractHttp2StreamChannel.java:786)
 288         at io.netty.handler.codec.http2.AbstractHttp2StreamChannel.streamClosed(AbstractHttp2StreamChannel.java:277)
 289         at io.netty.handler.codec.http2.Http2MultiplexCodec.onHttp2StreamStateChanged(Http2MultiplexCodec.java:195)
 290         at io.netty.handler.codec.http2.Http2FrameCodec$ConnectionListener.onStreamClosed(Http2FrameCodec.java:459)
 291         at io.netty.handler.codec.http2.DefaultHttp2Connection.notifyClosed(DefaultHttp2Connection.java:356)
 292         at io.netty.handler.codec.http2.DefaultHttp2Connection$ActiveStreams.removeFromActiveStreams(DefaultHttp2Connection.java:1000)
 293         at io.netty.handler.codec.http2.DefaultHttp2Connection$ActiveStreams.deactivate(DefaultHttp2Connection.java:956)
 294         at io.netty.handler.codec.http2.DefaultHttp2Connection$DefaultStream.close(DefaultHttp2Connection.java:512)
 295         at io.netty.handler.codec.http2.DefaultHttp2Connection$DefaultStream.close(DefaultHttp2Connection.java:518)
 296         at io.netty.handler.codec.http2.Http2ConnectionHandler.closeStream(Http2ConnectionHandler.java:605)

I suspect that we’re getting a close call triggered by a doRead and that is causing the inboundBuffer field to be null just in time for the .poll() call.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
bryce-andersoncommented, Jul 16, 2019

I’ll take it. I hope to have something up this afternoon.

0reactions
normanmaurercommented, Jul 16, 2019

@bryce-anderson np == yes 😉 ? If not I will have a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NullPointerException during Client Side ClearText Upgrade with ...
When cleartext upgrade is implemented in client side using HttpClientUpgradeHandler there is no way to pass the newly created Http2MultiplexHandler.
Read more >
java - NullPointerException. Unable to read through stream
But i'm gettting NullpointerException .The connection object is not able to get the stream data.Which is causing a null pointer exception .
Read more >
SslHandler.java example - Javatips.net
AbstractHttp2ConnectionHandlerBuilder.java · AbstractHttp2StreamChannel.java ... { throw new NullPointerException("engine"); } if (delegatedTaskExecutor ...
Read more >
Dealing With NullPointerException In Java - Sweetcode.io
What makes a null pointer exception very hard to deal with is that it is a runtime exception (a subclass of RuntimeException), and...
Read more >
https://www.vmware.com/content/dam/aw-microsites/o...
... io/netty/handler/codec/http2/AbstractHttp2StreamChannel.java ... [VMware does not distribute this component NullPointerException.java] ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found