×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Jun 2010
    Posts
    103

    Unhappy Getting error User 44, User 42 and User 8 errors

    Hi to all,
    Hope you all will be fine. I am sending sms on command. The view has option and back button. If you do not send sms, then back button works fine. But if you send sms then after sending sms when you click on back button , then following error occurs


    User 44, User 42, User 8
    Here is my code. Please tell me what i am doing wrong

    Code:
     HBufC* CL4_Mazazeek_AssignToneToCaller_EnterToneNumberScreen_ViewContainer::getEditorText()  {
    	
    	itext = iEdit1->GetTextInHBufL();
    	return itext;
    	
    }
    Code:
    TBool CL4_Mazazeek_AssignToneToCaller_EnterToneNumberScreen_View::HandleSend_SMSL(TInt aCommand) {
    	
    	hbuf = iMazazeek_AssignToneToCaller_EnterToneNumberScreen_ViewContainer->getEditorText();
    	
    	if (hbuf ) {
    	
    	// Creating TBuf from HBuf
    		TBuf<15> buffer(hbuf->Des());
    
    		// Print a HBufC
    		//RDebug::Print( _L("Test string: %S"), hbuf );
    		
    		_LIT(KPrivate, "Private*");
    		_LIT(KAsterisk, "*");
    		
    		TBuf<30> totalMessage(KPrivate);
    		
    		TBuf<50> msg(iModel.getMessageText());
    		
    		totalMessage.Append(msg);
    		totalMessage.Append(KAsterisk);
    		totalMessage.Append(buffer);
    		
    		// Print a TBuf
    		//RDebug::Print( _L("Test string: %S"), &totalMessage );
    		
    		_LIT(Sc,"777");
    		TBuf<10> Shortcode(Sc);
    		
    		iModel.SendSMSL(totalMessage, Shortcode);
    		
    	} //end of if
    	
    	return ETrue;
    
        
        
    } //end of HandleEdit_SMSL
    send sms

    Code:
    void CCallControllingModel::SendSMSL(TDesC& aMsgText, TDesC& aMsgNum)
    	{
    	RSendAs sendAs;
    	TInt err = sendAs.Connect();
    	
    	if (err)
    	    {
    	    // TODO: Error handling
    	    return;
    	    }
    	CleanupClosePushL(sendAs);
    
    	RSendAsMessage sendAsMessage;
    	sendAsMessage.CreateL(sendAs, KUidMsgTypeSMS);
    	CleanupClosePushL(sendAsMessage);
    	
        // Add the receiver
    	//_LIT(KReceiver, aMsgNum);
    	sendAsMessage.AddRecipientL(aMsgNum, RSendAsMessage::ESendAsRecipientTo);
    	
    	// Set the body text
        //_LIT(KBodyText, "Hi, I am Busy. I call you after sometime. Thanks");
    	//sendAsMessage.SetBodyTextL(KBodyText);
    	sendAsMessage.SetBodyTextL(aMsgText);
    	    
        // Send the message
    	///sendAsMessage.SendMessageAndCloseL();
    	
    	sendAsMessage.LaunchEditorAndCloseL();
    
    	CleanupStack::Pop(); // sendAsMessage (already closed)
    	CleanupStack::PopAndDestroy(); // sendAs
    
    }
    Why i am getting these errors?

    Thank you

  2. #2
    Regular Contributor
    Join Date
    Jun 2010
    Posts
    103

    Re: Getting error User 44, User 42 and User 8 errors

    if i use it like this then there is no error

    Code:
    TBool CL4_Mazazeek_AssignToneToCaller_EnterToneNumberScreen_View::HandleSend_SMSL(TInt aCommand) {
    	
    	hbuf = iMazazeek_AssignToneToCaller_EnterToneNumberScreen_ViewContainer->getEditorText();
    	
    	//if (hbuf ) {
    	
    	// Creating TBuf from HBuf
    		TBuf<15> buffer(hbuf->Des());
    
    		// Print a HBufC
    		//RDebug::Print( _L("Test string: %S"), hbuf );
    		
    		_LIT(KPrivate, "Private*");
    		_LIT(KAsterisk, "*");
    		
    		TBuf<30> totalMessage(KPrivate);
    		
    		TBuf<50> msg(iModel.getMessageText());
    		
    		totalMessage.Append(msg);
    		totalMessage.Append(KAsterisk);
    		totalMessage.Append(buffer);
    		
    		// Print a TBuf
    		//RDebug::Print( _L("Test string: %S"), &totalMessage );
    		
    		_LIT(Sc,"777");
    		TBuf<10> Shortcode(Sc);
    		
    		iModel.SendSMSL(totalMessage, Shortcode);
    		
    	//} //end of if
    	
    	return ETrue;
    i.e. removing if(hbuf) condition. What's wrong with the condition.

    Thanks

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    Re: Getting error User 44, User 42 and User 8 errors

    You can find the description of these messages in the SDK Help and in the on-line library too. They are unlikely caused by these particular code snippets and it is even less probable that commenting an "if(hbuf)" would fix any of them. Consider debugging the code and identifying the actual line which panics.

Similar Threads

  1. Getting User Panic 42
    By vicky_nits in forum Symbian
    Replies: 7
    Last Post: 2010-11-15, 13:25
  2. Error USER 44
    By amit04.kumar in forum Symbian
    Replies: 7
    Last Post: 2010-01-12, 21:16
  3. getting User Panic 42 in SizeChanged()
    By sunitha.m13 in forum Symbian
    Replies: 6
    Last Post: 2009-10-12, 10:44
  4. Help ..... getting User 42 panic
    By sudeepa2005 in forum Symbian
    Replies: 3
    Last Post: 2009-02-04, 13:18
  5. [moved] USER 42,44,45
    By itsbharatk in forum Symbian
    Replies: 6
    Last Post: 2009-01-15, 11:35

Posting Permissions

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