Ant-Media-Server icon indicating copy to clipboard operation
Ant-Media-Server copied to clipboard

fix null pointer exception

Open USAMAWIZARD opened this issue 6 months ago • 2 comments

USAMAWIZARD avatar May 13 '25 18:05 USAMAWIZARD

full logs available here

2025-05-07 06:40:28,834 [Thread-5] INFO  i.a.streamsource.StreamFetcher - stop stream called for http://46.202.151.44:5080/live/streams/953546125826235881120293.mp4 and streamId:saPune0EQJW6EuHZ675943173021872
2025-05-07 06:40:28,834 [Thread-5] INFO  i.a.s.StreamFetcherManager - Stopping playlist for stream: saPune0EQJW6EuHZ675943173021872
2025-05-07 06:40:28,834 [Thread-5] WARN  i.a.s.StreamFetcherManager - inside of stopStreaming for saPune0EQJW6EuHZ675943173021872
2025-05-07 06:40:28,835 [Thread-5] INFO  i.a.streamsource.StreamFetcher - stop stream called for http://46.202.151.44:5080/live/streams/953546125826235881120293.mp4 and streamId:saPune0EQJW6EuHZ675943173021872

when the application is closed the streams are stopped (see the above logs )

and then stream fetcher also stops at same time and that is triggering the call multiple time to closeBroadcast

2025-05-07 06:40:28,865 [Thread-2219] INFO  i.a.streamsource.StreamFetcher - Calling streamFinished listener for streamId:saPune0EQJW6EuHZ675943173021872 and it will not restart the stream automatically because callback is getting the responsbility
2025-05-07 06:40:28,866 [Thread-2219] WARN  i.a.s.StreamFetcherManager - inside of stopStreaming for saPune0EQJW6EuHZ675943173021872
2025-05-07 06:40:28,866 [Thread-2219] INFO  i.a.streamsource.StreamFetcher - Stream fetcher will not try again for streamUrl:http://46.202.151.44:5080/live/streams/953546125826235881120293.mp4 because stopRequestReceived:true and restartStream:false
2025-05-07 06:40:28,869 [Thread-5] ERROR i.a.shutdown.AMSShutdownManager - java.lang.NullPointerException: Cannot invoke "io.antmedia.datastore.db.types.Broadcast.getType()" because the return value of "io.antmedia.muxer.MuxAdaptor.getBroadcast()" is null
	at io.antmedia.AntMediaApplicationAdapter.closeRTMPStreams(AntMediaApplicationAdapter.java:1741)
	at io.antmedia.AntMediaApplicationAdapter.stopApplication(AntMediaApplicationAdapter.java:1878)
	at io.antmedia.AntMediaApplicationAdapter.serverShuttingdown(AntMediaApplicationAdapter.java:1861)
	at io.antmedia.shutdown.AMSShutdownManager.notifyShutdown(AMSShutdownManager.java:40)
	at org.red5.server.service.ShutdownServer$2.run(ShutdownServer.java:164)

USAMAWIZARD avatar May 14 '25 05:05 USAMAWIZARD