bensari / mediaserver

Automatically exported from code.google.com/p/mediaserver
1 stars 0 forks source link

NPE when stopping playback #117

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  Send RQNT to play a file
2.  Hangup while playing

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

2013-02-06 13:57:13,476 ERROR [MGCP] (Thread-21) :__: tx=823148812 Failed_::_
java.lang.NullPointerException
        at org.mobicents.media.server.mgcp.pkg.au.PlayRecord.terminateRecordPhase(PlayRecord.java:319)
        at org.mobicents.media.server.mgcp.pkg.au.PlayRecord.terminate(PlayRecord.java:389)
        at org.mobicents.media.server.mgcp.pkg.au.PlayRecord.cancel(PlayRecord.java:219)
        at org.mobicents.media.server.mgcp.controller.Request.cancel(Request.java:132)
        at org.mobicents.media.server.mgcp.tx.cmd.NotificationRequestCmd$Request.perform(NotificationRequestCmd.java:122)
        at org.mobicents.media.server.scheduler.Task.run(Task.java:117)
        at org.mobicents.media.server.scheduler.Scheduler$WorkerThread.run(Scheduler.java:408)

Please provide any additional information below.

current version of 3.X trunk abe6c662ce7bc69daa5830a9c15677fdf014b621

Original issue reported on code.google.com by sean.hay...@bsgclearing.com on 6 Feb 2013 at 8:42

Attachments:

GoogleCodeExporter commented 8 years ago
More information:  

If I add this debug statement to PlayRecord.java, it prints NULL after the 
recorder.deactive();

  private void terminateRecordPhase() {
        if (recorder != null) {            
            recorder.deactivate();

            logger.error("recorder state? (" + recorder +")");

            recorder.removeListener(recordingHandler);
            recorder=null;
        }

moving the recorder.removeListener(recordingHandler) above 
recorder.deactivate() either masks the problem or makes it go away.

Original comment by sean.hay...@bsgclearing.com on 7 Feb 2013 at 6:38

GoogleCodeExporter commented 8 years ago
Thats normal behaviour since you send Rqnt with ES and right away delete all 
endpoint connections with DLCX.
Since dlcx is executed faster then RQNT you end up fighting on who will release 
the resources.
Bottom line : there is no need to send es before dlcx , or you should wait for 
answer before sending DLCX.

Original comment by oifa.yul...@gmail.com on 8 Feb 2013 at 9:56