×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    18

    deleting CMdaAudioOutputStream raises E32USER-CBase 40

    I'm tring to delete a CMdaAudioOutputStream object. I called Stop() and that works, but as soon as I delete the stream it raises a E32USER-CBase 40 error. Is there a certain was to delete a CMdaAudioOutputStream or am I doing something wrong or not checking for something

    Here is the destructor and callback classes
    Code:
    {
    	Cancel();
    	
    	iState = ENotPlaying;
    	
    	oStream->Stop();
    	
    	if(isock){
    		delete isock;
    	
    		isock = NULL;
    		}
    	
    	
    	if(oStream){
    		delete oStream;
    	
    		oStream = NULL;
    	}
    
    MaoscBufferCopied(TInt err, const TDesC8 & buffer){
    	//KErrAbort is raised when Stop() is called
    	if(err != KErrAbort)
    		User::LeaveIfError(err);
    	
    		writing2Stream = EFalse;
    		FillBufferL();
    	
    
    }
    
    MaoscPlayComplete(TInt err){
    	//KErrCancel is raised Stop() is called
    	if(err != KErrCancel)
    		User::LeaveIfError(err);
    
    
    }

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: deleting CMdaAudioOutputStream raises E32USER-CBase 40

    Can't it be 'isock' causing the problem?
    Otherwise note that C++ language allows deleting NULL pointers, so those if-s are not necessary.

  3. #3
    Super Contributor
    Join Date
    Mar 2008
    Posts
    1,481

    Re: deleting CMdaAudioOutputStream raises E32USER-CBase 40

    Hi,

    I just thought two options, your object is in use still and AS does not find the pointer.
    -Delete your object in MaoscPlayComplete(TInt aError) // this will be called as a result of Stop() calling
    -After calling Stop() fire an active object with self completed (delete your object in that RunL)

Similar Threads

  1. Error E32USER - CBase 71
    By silviuccia in forum Symbian Media (Closed)
    Replies: 6
    Last Post: 2009-11-20, 15:38
  2. E32User -CBase 42 in GPS positioning Active Object
    By chandran.biju007 in forum Symbian
    Replies: 3
    Last Post: 2009-08-03, 08:10
  3. E32User CBase panics....
    By raj8nokiaforum in forum Symbian
    Replies: 19
    Last Post: 2008-10-17, 08:25
  4. Replies: 5
    Last Post: 2008-06-28, 17:21
  5. e32user - CBase 90 in Debug
    By Christophe.A in forum Symbian
    Replies: 12
    Last Post: 2008-06-18, 10:28

Posting Permissions

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