Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#709 closed defect (fixed)

Spurious NPE at Shutdown

Reported by: sponge Owned by: zzz
Priority: minor Milestone: 0.9.2
Component: router/transport Version: 0.9.1
Keywords: NPE Shutdown Cc: Zlatin Balevsky
Parent Tickets: Sensitive: no


Seen on android. Corner case?

E/I2P     (19221): Router [Thread-53] Starting final shutdown(3)
E/I2P     (19221): Router [Thread-53] Error shutting down the comm system java.lang.NullPointerException java.lang.NullPointerException
E/I2P     (19221):      at net.i2p.router.transport.udp.UDPEndpoint.clearOutbound(
E/I2P     (19221):      at net.i2p.router.transport.udp.UDPTransport.destroyAll(
E/I2P     (19221):      at net.i2p.router.transport.udp.UDPTransport.shutdown(
E/I2P     (19221):      at net.i2p.router.transport.udp.UDPTransport.stopListening(
E/I2P     (19221):      at net.i2p.router.transport.TransportManager.stopListening(
E/I2P     (19221):      at net.i2p.router.transport.TransportManager.shutdown(
E/I2P     (19221):      at net.i2p.router.transport.CommSystemFacadeImpl.shutdown(
E/I2P     (19221):      at net.i2p.router.Router.shutdown2(
E/I2P     (19221):      at net.i2p.router.Router.shutdown(
E/I2P     (19221):      at$
E/I2P     (19221):      at
E/I2P     (19221): Router [Thread-53] Shutdown(3) complete


Change History (4)

comment:1 Changed 9 years ago by zzz


Fixed in 0.9.1-24-rc

comment:2 Changed 9 years ago by zzz

Resolution: fixed
Status: newclosed

comment:3 Changed 9 years ago by Zlatin Balevsky

Cc: Zlatin Balevsky added

The change in revision b77be03e354ba8a303d01d36f0b25744a7319370 is an improvement, but a further improvement would be http://pastethis.i2p/show/1905/ . Even that does not prevent all spurious startup & shutdown errors; you need explicit state management (for example with enums) to avoid them. I suspect ticket #710 is a symptom of the same problem.

comment:4 Changed 9 years ago by zzz

Sure. The OP was reported on Android, where shutdown-during-startup is a lot more likely to happen through user and/or OS actions, and the general slowness of the platform. While these are low priority problems, yes we should fix them.

In my i2p.i2p.zzz.test branch I went through and synchronized all the startup/shutdown methods in the router, which should help. Those changes will be probably propped as 0.9.2-1.

Note: See TracTickets for help on using tickets.