×

Discussion Board

Results 1 to 3 of 3

Thread: User 70 panic

  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    339

    User 70 panic

    hi I am using Client/Server framework to send and receive data between two applications. Releated part is shown below



    Client

    Code:
    void SendStop()
    {
    SendReceive( EStopServ, TIpcArgs(NULL) );	
    }

    server

    Code:
    RMessage2* iMessage;
    
    void ServiceL(const RMessage2& aMessage)
    {
    	switch ( aMessage.Function() )
    	{
      	case EAnyOther:
    		{
    		iMessage = (RMessage2 *)(&aMessage);
    		break;
    		}
    
            case EStopServ:	
      		{	
    		if(iMessage)
      			{	
      			iMessage->Complete(KErrCancel);   // complete previous stored message
      			iMessage = NULL;
      			}
    
     	 	aMessage.Complete(KErrNone);    // USER 70 panic
      		break;
      		}
    
    	}
    }
    As stated in documentation the reason for USER 70 is "This panic is raised when attempting to complete a client/server request and the RMessagePtr is null."

    So how this could be in above code? thanks

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

    Re: User 70 panic

    aMessage is an argument of your method, a very short living variable on the stack. iMessage stores its address. iMessage->Complete is the line which dies.
    You can try copying RMessage2 as a value, and store its validity in a TBool.
    Or, you can keep the pointer+NULL-check thing, just create your own RMessage2. Something like iMessage=new(ELeave)RMessage2(aMessage). That is not very usual, but should definitely work. In this case do not forget deleting your copy prior to NULL-ing the pointer.

  3. #3
    Registered User
    Join Date
    Dec 2009
    Posts
    339

    Re: User 70 panic

    Thanks a lot wizard_hu_. now it works fine.

Similar Threads

  1. User 11 panic
    By yahoo2010 in forum Symbian
    Replies: 8
    Last Post: 2011-03-04, 22:43
  2. User 11 Panic
    By rohanwaugh in forum Symbian User Interface
    Replies: 4
    Last Post: 2008-12-04, 12:44
  3. Help USER 0 panic without user::invariant
    By joseph.m in forum Symbian
    Replies: 9
    Last Post: 2008-08-15, 20:17
  4. User 42 panic
    By chandola in forum Symbian
    Replies: 2
    Last Post: 2008-05-16, 13:15
  5. About USER 45 panic
    By bakakaba in forum Symbian
    Replies: 2
    Last Post: 2005-08-25, 15:59

Posting Permissions

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