×

Discussion Board

Results 1 to 7 of 7

Thread: SMSMtmUI panic

  1. #1
    Registered User
    Join Date
    Mar 2008
    Location
    India
    Posts
    26

    SMSMtmUI panic

    Hi,

    could anyone here kindly tell me what does "SMSMtmUI 21" panic means on S60 platform ??.... I could not find it .

    With thanks

  2. #2
    Registered User
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128

    Re: SMSMtmUI panic

    Quote Originally Posted by madhurjya.pb View Post
    Hi,

    could anyone here kindly tell me what does "SMSMtmUI 21" panic means on S60 platform ??.... I could not find it .

    With thanks
    Hi madhurjya,

    Can you write Code drop here and in which point you got panic....?

  3. #3
    Registered User
    Join Date
    Mar 2008
    Location
    India
    Posts
    26

    Re: SMSMtmUI panic

    Quote Originally Posted by kis_spn View Post
    Hi madhurjya,

    Can you write Code drop here and in which point you got panic....?
    Hi kis,

    Thanks for your interest. Here I am pasting the code segment. I am trying to display a message.

    With thanks



    void CSmsHandler::ViewL(TInt32 a, TInt i)
    {
    // There is an own registry for UI MTM's.

    iMtmUiRegistry = CMtmUiRegistry::NewL( *iSession );

    // We are interested in the next unread message.
    // TMsvId entryId( iSelection->At( iNextUnread ) );
    CMsvEntry* serverEntry = iSession->GetEntryL( a/*entryId*/);
    CleanupStack::PushL( serverEntry );

    // Create new MTM.
    const TUid t = { 0x1000102C };
    CBaseMtm* clientMtm = iMtmRegistry->NewMtmL( KUidMsgTypeSMS/*serverEntry->Entry().iMtm*/);
    CleanupStack::PushL( clientMtm );
    clientMtm->SwitchCurrentEntryL( serverEntry->EntryId() );


    // TMsvEntry entry( serverEntry->Entry() );
    // entry.SetNew( EFalse ); // message is no longer new
    // entry.SetUnread( EFalse ); // message is no longer unread
    // serverEntry->ChangeL( entry ); // commit changes

    CBaseMtmUi* ui = iMtmUiRegistry->NewMtmUiL( *clientMtm ); // UI MTM for SMS
    CleanupStack::PushL( ui );

    // Display the SMS using the UI MTM.
    iOperation = ui->ViewL( iStatus ); // [red]Here I get the panic[/red]

    CleanupStack::PopAndDestroy( 3 ); // ui, clientMtm, serverEntry
    SetActive();
    }

  4. #4
    Registered User
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128

    Re: SMSMtmUI panic

    Quote Originally Posted by madhurjya.pb View Post
    Hi kis,

    Thanks for your interest. Here I am pasting the code segment. I am trying to display a message.

    With thanks



    void CSmsHandler::ViewL(TInt32 a, TInt i)
    {
    // There is an own registry for UI MTM's.

    iMtmUiRegistry = CMtmUiRegistry::NewL( *iSession );

    // We are interested in the next unread message.
    // TMsvId entryId( iSelection->At( iNextUnread ) );
    CMsvEntry* serverEntry = iSession->GetEntryL( a/*entryId*/);
    CleanupStack::PushL( serverEntry );

    // Create new MTM.
    const TUid t = { 0x1000102C };
    CBaseMtm* clientMtm = iMtmRegistry->NewMtmL( KUidMsgTypeSMS/*serverEntry->Entry().iMtm*/);
    CleanupStack::PushL( clientMtm );
    clientMtm->SwitchCurrentEntryL( serverEntry->EntryId() );


    // TMsvEntry entry( serverEntry->Entry() );
    // entry.SetNew( EFalse ); // message is no longer new
    // entry.SetUnread( EFalse ); // message is no longer unread
    // serverEntry->ChangeL( entry ); // commit changes

    CBaseMtmUi* ui = iMtmUiRegistry->NewMtmUiL( *clientMtm ); // UI MTM for SMS
    CleanupStack::PushL( ui );

    // Display the SMS using the UI MTM.
    iOperation = ui->ViewL( iStatus ); // [red]Here I get the panic[/red]

    CleanupStack::PopAndDestroy( 3 ); // ui, clientMtm, serverEntry
    SetActive();
    }
    Hi,

    Try to below code to open sms......

    CBaseMtmUi* ui = iMtmUiRegistry->NewMtmUiL( *clientMtm );
    // UI MTM for SMS
    CleanupStack::PushL( ui );

    ui->BaseMtm().SwitchCurrentEntryL(serverEntry->EntryId().Id());
    CMsvOperationWait* waiter=CMsvOperationWait::NewLC();
    waiter->Start(); //we use synchronous waiter
    CMsvOperation* op = ui->OpenL(waiter->iStatus); //the main "async-sync" call
    CleanupStack::PushL(op);
    CActiveScheduler::Start(); //notice! nested active scheduler for modal operation

    // 4. cleanup for example even members
    CleanupStack::PopAndDestroy(4); // op,waiter, mtm, ui

    Please let me know in case of any queries?

  5. #5
    Registered User
    Join Date
    Mar 2008
    Location
    India
    Posts
    26

    Re: SMSMtmUI panic

    Quote Originally Posted by kis_spn View Post
    Hi,

    Try to below code to open sms......

    CBaseMtmUi* ui = iMtmUiRegistry->NewMtmUiL( *clientMtm );
    // UI MTM for SMS
    CleanupStack::PushL( ui );

    ui->BaseMtm().SwitchCurrentEntryL(serverEntry->EntryId().Id());
    CMsvOperationWait* waiter=CMsvOperationWait::NewLC();
    waiter->Start(); //we use synchronous waiter
    CMsvOperation* op = ui->OpenL(waiter->iStatus); //the main "async-sync" call
    CleanupStack::PushL(op);
    CActiveScheduler::Start(); //notice! nested active scheduler for modal operation

    // 4. cleanup for example even members
    CleanupStack::PopAndDestroy(4); // op,waiter, mtm, ui

    Please let me know in case of any queries?



    Hi, Kishore,

    Thanks for your quote. I tried the changes that you told me to do. Still I have some problem.

    ui->BaseMtm().SwitchCurrentEntryL(serverEntry->EntryId().Id());

    This Line gives compilation error. I think Id() is not required. So, I removed.

    Now it compiles OK, but gives SMSMtmUI 2 panic at this line-

    CMsvOperation* op = ui->OpenL(waiter->iStatus);


    Could you kindly help me in this regard?....

    With thanks..

  6. #6
    Registered User
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128

    Re: SMSMtmUI panic

    Hi Madhur,
    Once again you makesure...you are doing this way...

    Even I've try this is workin fine for me..
    Try this, It'll solve your problem...
    ===================================
    void Open(const TMsvId &aId)

    // 1. construct the client MTM
    TMsvEntry indexEntry;
    TMsvId serviceId;
    User::LeaveIfError( iMsvSession->GetEntry(aId, serviceId, indexEntry));
    CBaseMtm* mtm = iClientMtmReg->NewMtmL(indexEntry.iMtm);
    CleanupStack::PushL(mtm);

    // 2. construct the user interface MTM
    CBaseMtmUi* uiMtm = iMtmUiReg->NewMtmUiL(*mtm);
    CleanupStack::PushL(uiMtm);

    // 3. display the message
    uiMtm->BaseMtm().SwitchCurrentEntryL(indexEntry.Id());
    CMsvOperationWait* waiter=CMsvOperationWait::NewLC();
    waiter->Start(); //we use synchronous waiter
    CMsvOperation* op = uiMtm->OpenL(waiter->iStatus); //the main "async-sync" call
    CleanupStack::PushL(op);
    CActiveScheduler::Start(); //notice! nested active scheduler for modal operation

    // 4. cleanup for example even members
    CleanupStack::PopAndDestroy(4); // op,waiter, mtm, uimtm
    =================================================

  7. #7
    Registered User
    Join Date
    Mar 2008
    Location
    India
    Posts
    26

    Re: SMSMtmUI panic

    Quote Originally Posted by kis_spn View Post
    Hi Madhur,
    Once again you makesure...you are doing this way...

    Even I've try this is workin fine for me..
    Try this, It'll solve your problem...
    ===================================
    void Open(const TMsvId &aId)

    // 1. construct the client MTM
    TMsvEntry indexEntry;
    TMsvId serviceId;
    User::LeaveIfError( iMsvSession->GetEntry(aId, serviceId, indexEntry));
    CBaseMtm* mtm = iClientMtmReg->NewMtmL(indexEntry.iMtm);
    CleanupStack::PushL(mtm);

    // 2. construct the user interface MTM
    CBaseMtmUi* uiMtm = iMtmUiReg->NewMtmUiL(*mtm);
    CleanupStack::PushL(uiMtm);

    // 3. display the message
    uiMtm->BaseMtm().SwitchCurrentEntryL(indexEntry.Id());
    CMsvOperationWait* waiter=CMsvOperationWait::NewLC();
    waiter->Start(); //we use synchronous waiter
    CMsvOperation* op = uiMtm->OpenL(waiter->iStatus); //the main "async-sync" call
    CleanupStack::PushL(op);
    CActiveScheduler::Start(); //notice! nested active scheduler for modal operation

    // 4. cleanup for example even members
    CleanupStack::PopAndDestroy(4); // op,waiter, mtm, uimtm
    =================================================



    Hi Kishor ,

    Thanks again for your kind interest. Actually now I am working with some other issue and I have left this problem for the time. I was able to display my messages using CEikRichTextEditor. Anyway, I will check it out again as you have told me.

    Thanks and regards

Similar Threads

  1. What Is The Reason For EIKCTL Panic 4
    By praveenvlm in forum Symbian User Interface
    Replies: 2
    Last Post: 2007-10-22, 07:38
  2. Using Bluetooth serial port in MIDlets (nokia 9500 issue)
    By orsteglasy in forum Mobile Java Networking & Messaging & Security
    Replies: 11
    Last Post: 2007-10-07, 21:49
  3. Panic dialog - ERRRD
    By greatape in forum Symbian
    Replies: 7
    Last Post: 2007-09-16, 19:32
  4. CEikProgressInfo & PANIC when setting wrong width and final val
    By eekisa in forum Symbian User Interface
    Replies: 2
    Last Post: 2006-01-05, 13:26
  5. Replies: 0
    Last Post: 2004-09-24, 22:01

Posting Permissions

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