×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    KERN-EXEC 3 panic in SwitchCurrentEntryL(KMsvGlobalOutBoxIndexEntryId) in 3rd Edition

    Hi

    Code:
    void CSmsSender::ConstructL()
        {
    	////////////// Sender data /////////////////////////////
    	iSession = CMsvSession::OpenSyncL( *this );
        }
    
    void CSmsSender::HandleSessionEventL( TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* /*aArg3*/)
    	{
    	
    	TBuf<100> sent(KNullDesC());
    	TInt event = aEvent;
    	
    	switch ( aEvent )
    		{
    		case EMsvServerReady:
    			{
    				TMsvId serviceId( KUidMsgTypeSMS.iUid ); // SMS service id
    
    				// Determine if the event was succesful.
    				// ServiceProgress inserts TBuf8 value in progress.
    				TBuf8<KBfrLength> progress;
    				iSession->ServiceProgress( serviceId, progress );
    				_LIT8( KCompare, "KErrNone" );
    
    				if ( progress.Compare( KCompare ) )
    				{
    					// Check that MtmRegistry has not already been accessed.
    					if ( !iMtmRegistry )
    					{
    						AccessMtmL();
    					}
    				}
    				break;
    			}
               }
    }
    
    void CSmsSender::AccessMtmL()
    	{
        // Create an MTM Registry object.
        iMtmRegistry = CClientMtmRegistry::NewL( *iSession );
    
        // Create an SMS Client MTM object.
        iSmsMtm = STATIC_CAST( CSmsClientMtm*, iMtmRegistry->NewMtmL( KUidMsgTypeSMS ) );
        }
    
    
    TBool CSmsSender::SendL( /*const TDesC& aRecipientNumber, const TDesC& aMessageText*/ )
        {
    	// All SMSs in the array have been sent
    	if( iCurrentSMSIndex == iTotalSMSCount )
    		{
    		// Start the timer to start database scanning
    		iDbScanner->StartTimerL();
    		return EFalse;
    		}
    	
    	if( iCurrentSMSIndex >= 0 )
    		{
    		iMessageText = (*iSMSArray)[iCurrentSMSIndex];
    		iRecipientNumber = (*iNumArray)[iCurrentSMSIndex];
    		iFlashFlag = (*iFlashArray)[iCurrentSMSIndex];
    		iReportFlag = (*iReportArray)[iCurrentSMSIndex];
    		iActiveSMSId = (*iSMSIdArray)[iCurrentSMSIndex];
    		}
    	else
    		{
    		return EFalse;
    		}
    
        if ( CreateMsgL() )
            {
            return ETrue;
            }
    	
        return EFalse;
        }
    
    
    TBool CSmsSender::CreateMsgL()
        {
    
    	CFileLogger::WriteLogL(KCreateMsg());
       
    	CFileLogger::WriteLogL(_L("Before SwitchCurrentEntryL"));
    	// Current entry is the Draft folder.
        //TRAPD(err,iSmsMtm->SwitchCurrentEntryL( KMsvDraftEntryId ));
    
    // Give me panic KERN EXCE 3
    	TRAPD(err,iSmsMtm->SwitchCurrentEntryL( KMsvGlobalOutBoxIndexEntryId ));

    please help me in SwitchCurrentEntryL. i am doing work in 3rd edition FP1.

    regards
    Tanya

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: KERN-EXEC 3 panic in SwitchCurrentEntryL(KMsvGlobalOutBoxIndexEntryId) in 3rd Edi

    did you actually make sure that iSmsMtm is constructed correctly ?

  3. #3
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: KERN-EXEC 3 panic in SwitchCurrentEntryL(KMsvGlobalOutBoxIndexEntryId) in 3rd Edi

    hi

    ya, because this same code doing work perfect in 2nd edition FP2, FP3.

    Tanya

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: KERN-EXEC 3 panic in SwitchCurrentEntryL(KMsvGlobalOutBoxIndexEntryId) in 3rd Edi

    OpenSyncL and EMsvServerReady are a suspicious combination to me. Although it can happen that you still get the EMsvServerReady event when you open the session synchronously, you should check it. Also make sure that your HandleSessionEvent will not run until your code returns to the "Application Framework".

    So code
    Code:
    CSmsSender *mysender=CSmsSender::NewLC();
    mysender->SendL();
    will definitely not work.

    You can try what happens if you copy the statements from the EMsvServerReady-block immediately after the OpenSyncL (and comment the original EMsvServerReady-block).

  5. #5
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: KERN-EXEC 3 panic in SwitchCurrentEntryL(KMsvGlobalOutBoxIndexEntryId) in 3rd Edi

    i block following code:
    void CSmsSender::HandleSessionEventL( TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* /*aArg3*/)
    {
    switch ( aEvent )
    {
    /*
    case EMsvServerReady:
    {
    .
    .
    .
    }
    */
    }
    }
    */


    and modified constructL following way:
    // -----------------------------------------------------------------------------
    // CSmsSender::ConstructL()
    // Symbian 2nd phase constructor can leave.
    // -----------------------------------------------------------------------------
    //
    void CSmsSender::ConstructL()
    {
    ////////////// Sender data /////////////////////////////
    iSession = CMsvSession::OpenSyncL( *this );

    // Create an MTM Registry object.
    iMtmRegistry = CClientMtmRegistry::NewL( *iSession );

    // Create an SMS Client MTM object.
    iSmsMtm = STATIC_CAST( CSmsClientMtm*, iMtmRegistry->NewMtmL( KUidMsgTypeSMS ) );
    }

    give panic KERN-EXEC 0.

    regards
    Tanya
    Last edited by Tanya; 2008-02-14 at 10:42.

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: KERN-EXEC 3 panic in SwitchCurrentEntryL(KMsvGlobalOutBoxIndexEntryId) in 3rd Edi

    I have exactly the same code
    Code:
        iSession = CMsvSession::OpenSyncL(*this);
        iMtmReg = CClientMtmRegistry::NewL(*iSession);
        iSmsMtm = static_cast<CSmsClientMtm*>(iMtmReg->NewMtmL(KUidMsgTypeSMS));
    and it actually works. The problem should be somewhere else.

  7. #7
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: KERN-EXEC 3 panic in SwitchCurrentEntryL(KMsvGlobalOutBoxIndexEntryId) in 3rd Edi

    Quote Originally Posted by wizard_hu_ View Post
    I have exactly the same code
    Code:
        iSession = CMsvSession::OpenSyncL(*this);
        iMtmReg = CClientMtmRegistry::NewL(*iSession);
        iSmsMtm = static_cast<CSmsClientMtm*>(iMtmReg->NewMtmL(KUidMsgTypeSMS));
    and it actually works. The problem should be somewhere else.
    Ya its true i am also write this way but it's work perfect on 2ed edition but this same code do not work perfectly in 3rd edition.

    so
    iMtmReg = CClientMtmRegistry::NewL(*iSession);
    iSmsMtm = static_cast<CSmsClientMtm*>(iMtmReg->NewMtmL(KUidMsgTypeSMS));

    i put in HandleSessionEventL() and it's work perfect and also sending messages if i write in CreateMsgL() function.
    iSmsMtm->SwitchCurrentEntryL( KMsvDraftEntryId );

    But if i write
    iSmsMtm->SwitchCurrentEntryL( KMsvGlobalOutBoxIndexEntryId );
    this way than give me panic KERN-EXEC 3.

    please give me a solution that why KMsvGlobalOutBoxIndexEntryId do not work in 3rd edition and give me a panic??

    Regards
    Tanya

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: KERN-EXEC 3 panic in SwitchCurrentEntryL(KMsvGlobalOutBoxIndexEntryId) in 3rd Edi

    Actually I have only created messages in Drafts and in Inbox. Outbox might require special treatment (perhaps due to its temporary-nature, I mean messages do not stay in outbox, they are usually moved there from Drafts, and after sending they get moved forwards to Sent), but I really do not know.

  9. #9
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: KERN-EXEC 3 panic in SwitchCurrentEntryL(KMsvGlobalOutBoxIndexEntryId) in 3rd Edi

    Quote Originally Posted by wizard_hu_ View Post
    Actually I have only created messages in Drafts and in Inbox. Outbox might require special treatment (perhaps due to its temporary-nature, I mean messages do not stay in outbox, they are usually moved there from Drafts, and after sending they get moved forwards to Sent), but I really do not know.
    You are right message create in Draft but i implemented in 2nd edition and i am directly switch Entry in to outbox and that working perfectly and with fast speed.
    and incoming messages i am store in database and also send messages from database table i am not using inbox for sending and receive new messages.

    in 3rd edition i thing it's not possible direct switch entry in to Outbox and i tried to create message in Draft for sending message and its doing work perfectly with GUI application.

    But using same code i make one Console Exe but its not doing work perfectly in background i check out in with TaskSpy that .exe close in background at the time of SwitchCurrentEntry.

    iSmsMtm->SwitchCurrentEntryL( KMsvDraftEntryId );

    if you have any idea about this, Why my console exe close when try to SwitchEntry.

    Regards
    Tanya

  10. #10
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: KERN-EXEC 3 panic in SwitchCurrentEntryL(KMsvGlobalOutBoxIndexEntryId) in 3rd Edi

    CMsvSession needs an Active Scheduler (since it uses "callbacks", which are wrapped Active Object in fact). Console executables have no scheduler unless you explicitly create one.

  11. #11
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: KERN-EXEC 3 panic in SwitchCurrentEntryL(KMsvGlobalOutBoxIndexEntryId) in 3rd Edi

    Quote Originally Posted by wizard_hu_ View Post
    CMsvSession needs an Active Scheduler (since it uses "callbacks", which are wrapped Active Object in fact). Console executables have no scheduler unless you explicitly create one.
    ya i also tried this way but think is that scheduler() call end of the CreateMsgL() function but my application closed in createMsgL().

    Regards
    Tanya

  12. #12
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: KERN-EXEC 3 panic in SwitchCurrentEntryL(KMsvGlobalOutBoxIndexEntryId) in 3rd Edi

    Hi

    i used Scheduler:

    Code:
    LOCAL_C void MainL()
        {
    		CSmsHandler* smsHandler = CSmsHandler::NewL();
        }
    
    LOCAL_C void DoStartL()
        {
        // Create active scheduler (to run active objects)
        CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
        CleanupStack::PushL(scheduler);
        CActiveScheduler::Install(scheduler);
    
    	MainL();
    
    	CActiveScheduler::Start();	
    
    
        // Delete active scheduler
        CleanupStack::PopAndDestroy(scheduler);
    But i have a problem in CreateMsgL() function please help me.

    Tanya
    Last edited by Tanya; 2008-02-20 at 12:01.

Similar Threads

  1. Doubts - S60 3rd Edition versus S60 3rd Edition FP1
    By juarezjunior in forum Symbian
    Replies: 4
    Last Post: 2009-04-27, 11:29
  2. Extended Panic Code in Series 60 Third Edition Emulator
    By razas in forum Symbian Tools & SDKs
    Replies: 6
    Last Post: 2007-08-17, 12:06
  3. S60 3rd edition signing process
    By fightersoft in forum Symbian
    Replies: 11
    Last Post: 2007-05-03, 08:18
  4. Carbide c++ and S60 3rd Edition Feature Pack 1 Working
    By jimgilmour1 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2006-10-18, 20:39
  5. Replies: 3
    Last Post: 2006-10-04, 22:44

Posting Permissions

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