×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    May 2007
    Posts
    51

    Application crashing MMFServerProxy...

    Hello,

    I am having the following problem:
    I have created an application for the Nokia 5500 (S60) that uses the CMdaAudioRecorderUtility class to record audio to a file on the phone.
    The application sends the file then through a Bluetooth serial link that has been established before.
    After some time the application crashes with an error message
    "Application ... closed"
    and then
    "Application MMFServerProxy... closed"

    It seems that this is part of Nokia firmware or part of Symbian OS.
    Any ideas how I could approach the problem?

    Thanks
    Kind regards
    codepatch
    Last edited by codepatch; 2007-07-25 at 04:09.

  2. #2
    Super Contributor
    Join Date
    Jun 2004
    Location
    SymbianLand
    Posts
    763

    Re: Application crashing MMFServerProxy...

    Install Yucca's Crash Monitor and find out the exact panic code.
    I think then it would be much easier to detect what's going wrong.
    --Mayur.

  3. #3
    Regular Contributor
    Join Date
    May 2007
    Posts
    51

    Re: Application crashing MMFServerProxy...

    Ok thanks ,

    I installed the crash monitor and got the following crash details in reverse time-order.
    This time I got an error message when trying to record. And when I tried again the application crashed

    Msg1:
    Executable:
    Threadname: MyApplication
    Exit category: KERN-EXEC
    Exit type: Panic
    Exit reason: 0
    Time: 10:14:28 25/Jul/07

    Msg2:
    Executable: 3f8 @ @
    Threadname: Local-6412d3f8
    Exit category: Kill
    Exit type: Kill
    Exit reason: 0
    Time: 10:14:24 25/Jul/07

    Msg3:
    Executable: erProxyServer
    Threadname: MMFControllerProxyServer3a160ab
    Exit category: Kill
    Exit type: Kill
    Exit reason: 0
    Time: 10:14:23 25/Jul/07

    Msg4:
    Executable: erProxyServer
    Threadname: MMFControllerProxyServer3a160ab
    Exit category: Kill
    Exit type: Kill
    Exit reason: 0
    Time: 10:14:23 25/Jul/07

    Msg5:
    Executable: b60 @ @
    Threadname: Local-6412db60
    Exit category: Kill
    Exit type: Kill
    Exit reason: 0
    Time: 10:14:23 25/Jul/07

    I hope this gives some insight. Thanks for your help.

  4. #4
    Super Contributor
    Join Date
    Jun 2004
    Location
    SymbianLand
    Posts
    763

    Re: Application crashing MMFServerProxy...

    Ooooooohhhhhhh thats some domino effect .
    Anyways I can only make sense of the first panic : which is KERN-EXEC 0 which is an invalid handle of an R class.
    Basically you are calling some function on the R class instance before calling an Open on the R class instance.
    Can you share some code if possible?
    --Mayur.

  5. #5
    Regular Contributor
    Join Date
    May 2007
    Posts
    51

    Re: Application crashing MMFServerProxy...

    Well I basically used the example from the SDK and only tweaked it a little.
    Furthermore I was running the application for a long time and the crash didn't happen now. So it's a very strange behaviour...
    Here is my class for recording:
    Code:
    /*
    * ============================================================================
    *  Name     : Recorderadapter.cpp
    *  Part of  : RecorderExample
    *  Created  : 20.03.2005 by Forum Nokia
    *  Version  : 1.0.0
    *  Copyright: Nokia Corporation
    * ============================================================================
    */
    
    //INCLUDES
    #include "PhoneMuse.hrh"
    #include <e32base.h>
    #include <eikmenup.h>
    #include <eikapp.h>
    
    #include <eikappui.h>
    #include <eikenv.h>
    
    #include <aknutils.h>
    
    #include "PhoneMuseAppView.h"
    
    #include "recorderadapter.h"
    #include <aknnotewrappers.h> //warning note
    
    #include <e32std.h> //tint64
    
    // The sound file's name produced in recording mode
    _LIT(KRecorderFile, "record");
    _LIT(KRecorderFileEnd, ".wav");
    
    
    _LIT(KAudioRecorder, "Recorder");
    _LIT(KPath, "C:\\");
    _LIT(KFileName, "C:\\record%d.wav");
    // ----------------------------------------------------
    // CRecorderAdapter::CRecorderAdapter()
    // C++ default constructor
    // ----------------------------------------------------
    CRecorderAdapter::CRecorderAdapter()
    {
    	iStatus = EStop;
    }
    
    // ----------------------------------------------------
    // CRecorderAdapter::NewL()
    // ----------------------------------------------------
    CRecorderAdapter* CRecorderAdapter::NewL(CPhoneMuseAppView* Container)
        {
        CRecorderAdapter* self = NewLC(Container);
        CleanupStack::Pop(self); 
        return self;
        }
    
    // ----------------------------------------------------
    // CRecorderAdapter::NewLC()
    // ----------------------------------------------------
    CRecorderAdapter* CRecorderAdapter::NewLC(CPhoneMuseAppView* Container)
    {
        CRecorderAdapter* self = new (ELeave) CRecorderAdapter();
        CleanupStack::PushL(self);
        self->ConstructL(Container);
        return self;
    }
    
    
    // ----------------------------------------------------
    // CRecorderAdapter::ConstructL()
    // Recorder is initialized
    // ----------------------------------------------------
    void CRecorderAdapter::ConstructL(CPhoneMuseAppView* Container)
    {
        iContainer = Container;
        iBuf = HBufC8::NewMaxL(bufsize);
        iMdaAudioRecorderUtility = CMdaAudioRecorderUtility::NewL(*this, 0, 80, EMdaPriorityPreferenceQuality);
        iTrack = 1;   
        
    	
        //Open last recent audio file
    	OpenFileL(EFalse);  
        
    }
    
    // ----------------------------------------------------
    // CRecorderAdapter::~CRecorderAdapter()
    // ----------------------------------------------------
    CRecorderAdapter::~CRecorderAdapter()
    {
    	delete iMdaAudioRecorderUtility;    
    	iMdaAudioRecorderUtility = NULL;
    }
    
    void CRecorderAdapter::UpdateMenuL(CEikMenuPane* /*aMenuPane*/)
    {
    }
    
    
    // ----------------------------------------------------
    // CRecorderAdapter::PlayL()
    // Set position and start playing audio file
    void CRecorderAdapter::PlayL()
    {
    	// Set playback position to the start of the file
        iPosition = TTimeIntervalMicroSeconds(0);
        iContainer->UpdateRecStatus(ETrue);
        PlayCurrentPositionL();
        
    }
    
    
    // ----------------------------------------------------
    // CRecorderAdapter::PlayCurrentPositionL()
    // Start playing after setting up player
    // ----------------------------------------------------
    void CRecorderAdapter::PlayCurrentPositionL()
    {
        // Play through the device speaker
        iMdaAudioRecorderUtility->SetAudioDeviceMode(CMdaAudioRecorderUtility::ELocal);
    
        // Set maximum volume for playback
        iMdaAudioRecorderUtility->SetVolume(iMdaAudioRecorderUtility->MaxVolume() - (iMdaAudioRecorderUtility->MaxVolume() / 4));
    
    	//Set position to last played position
    	iMdaAudioRecorderUtility->SetPosition(iPosition);
    	
        iMdaAudioRecorderUtility->PlayL();
        
        iStatus = EPlaying;
       
    }
    
    
    // ----------------------------------------------------
    // CRecorderAdapter::GetRecorderStatus()
    // Return recorder status
    // ----------------------------------------------------
    TRecorderAdapterStatus CRecorderAdapter::GetRecorderStatus()
    {
    	return iStatus;	
    }
    
    // ----------------------------------------------------
    // CRecorderAdapter::StopL()
    // Stop both playing and recording
    // ----------------------------------------------------
    void CRecorderAdapter::StopL(TRecorderAdapterStatus aStatus)
    {
    	iPosition = iMdaAudioRecorderUtility -> Position();
    	
        iMdaAudioRecorderUtility->Stop();
        
        iStatus = aStatus;
        iContainer->UpdateRecStatus(EFalse);
    }
    
    // ----------------------------------------------------
    // CRecorderAdapter::RecordL()
    // Starts recording after setting up
    // ----------------------------------------------------
    void CRecorderAdapter::RecordL()
    {
    	iStatus = ERecording;
      
    
    	// New audio file can be opened in 
    	// Series 60 Platform 2nd Edition, including FP1 and FP2
    		
        OpenFileL(ETrue);
    	
    }
    
    
    // ----------------------------------------------------
    // CRecorderAdapter::OpenFileL()
    // Open last recent file or new file with bigger running number
    // ----------------------------------------------------
    void CRecorderAdapter::OpenFileL(TBool newFile)
    {
    
    	
    	aFileName.Format(KFileName, iTrack);
    	
        // Open an existing sample file for playback or recording,
        // causes MMdaObjectStateChangeObserver::MoscoStateChangeEvent to be called
    	iMdaAudioRecorderUtility->Close();
       iMdaAudioRecorderUtility->OpenFileL(aFileName);
    }
    
    // ----------------------------------------------------
    // CRecorderAdapter::Identify()
    // Returns identify string
    // ----------------------------------------------------
    const TDesC& CRecorderAdapter::Identify()
    {
    	return KAudioRecorder;
    }
    
    // ----------------------------------------------------
    // CRecorderAdapter::MoscoStateChangeEvent()
    // Is called, if recorder's state change.
    // ----------------------------------------------------
    void CRecorderAdapter::MoscoStateChangeEvent(CBase* /*Object*/, TInt aPreviousState, TInt CurrentState, TInt aErrorCode)
    {
    	if (aErrorCode != KErrNone)
    		{	
    			
    			//If user wants record, but errors occurs, warning note is shown
    			if (iStatus == ERecording)
    				{
    				_LIT(text, "Recording failed!");
    				CAknWarningNote* note = new (ELeave) CAknWarningNote();
    				note -> ExecuteLD(text);
    				}
    			
    				
    			iStatus = EStop;
    		}
    	//When recorder is ready and state is ERecording, recording may start
    	else if (iStatus == ERecording && CurrentState == 1 && aPreviousState == 0)
    		{
    
    		// Set maximum gain for recording
    	    iMdaAudioRecorderUtility->SetGain(iMdaAudioRecorderUtility->MaxGain());
    	   	
    	   	iMdaAudioRecorderUtility->SetPosition(TTimeIntervalMicroSeconds(0));
    	   
    	    iMdaAudioRecorderUtility->RecordL();
    	    iContainer->UpdateRecStatus(ETrue);
    	    //iContainer ->ResetAllValues(GetDuration(), GetMaxDuration());
    
    	    
    		}
    	//If playing stops to end of the file, status changes to EStop	
    	else if (iStatus == EPlaying && CurrentState == 1)
    		{
    				iStatus = EStop;				
    		}
    }
    	
    // ----------------------------------------------------
    // CRecorderAdapter::GetDuration()
    // Returns current duration in seconds.
    // ----------------------------------------------------
    TInt CRecorderAdapter::GetDuration()
    {
    	TTimeIntervalMicroSeconds returnValue;
    	if (iStatus == ERecording)
    		returnValue = iMdaAudioRecorderUtility -> Duration();
    	else if (iStatus == EPlaying)
    		returnValue = iMdaAudioRecorderUtility -> Position();
    	else
    		return 0;
    	
    	TInt64 time = returnValue.Int64();
    	time = time / 1000000;
    		
    	//return time.GetTInt();
    	return TInt(time);
    }
    
    
    // ----------------------------------------------------
    // CRecorderAdapter::GetMaxDuration()
    // Returns audiofile's maximun duration in seconds.
    // ----------------------------------------------------
    TInt CRecorderAdapter::GetMaxDuration()
    {
    
    	TTimeIntervalMicroSeconds returnValue;
    	
    	if (iStatus == ERecording)
    		returnValue = iMdaAudioRecorderUtility -> RecordTimeAvailable();
    	else if (iStatus == EPlaying || iStatus == EPause)
    		returnValue = iMdaAudioRecorderUtility -> Duration();
    	else
    		return 0;
    	
    	TInt64 time = returnValue.Int64();
    	time = time / 1000000;
    		
    	//return time.GetTInt();	
    	return TInt(time);
    }
    HBufC8* CRecorderAdapter::getData()
    	{
    	    return iBuf;
    		
    	}
    void CRecorderAdapter::setTrack(int track)
    	{
    		iTrack=track;
    		OpenFileL(ETrue);
    	}
    	
    TFileName CRecorderAdapter::getFileName()
    	{
    	return aFileName;
    	}
    
    // End of File

Similar Threads

  1. 3250: Too many SMSs received crash the application
    By kewldeep in forum Mobile Java General
    Replies: 4
    Last Post: 2007-01-27, 00:00
  2. Sending SMS to Emulator through desktop application
    By iqbalaminkhan in forum Mobile Web Site Development
    Replies: 0
    Last Post: 2006-12-22, 05:01
  3. Application without icon in application menu
    By iulian_moldovan in forum Symbian C++
    Replies: 3
    Last Post: 2006-12-14, 09:38
  4. Replies: 0
    Last Post: 2005-05-28, 10:20
  5. Replies: 0
    Last Post: 2003-02-03, 08:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •