×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    17

    Problem in reading Inbox

    Hi to all,

    I am trying to build an application to read SMS in the inbox for N72 (based on S60 2nd Edition FP3) , I´m using the CSMSHandle class provided in the wiki example http://wiki.forum.nokia.com/index.php/SMS_Operations .

    But Program gets closed when I call ReadInbox method of the Class CSMSHandle.


    Thanks in advance.

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

    Re: Problem in reading Inbox

    Can you tell me? what is the panic code you are getting?

  3. #3
    Registered User
    Join Date
    Jul 2010
    Posts
    17

    Re: Problem in reading Inbox

    as I am new to the S60 development... i didn't know where i can get it ... bt it doesnt show any error on console.... and ends when Inbox is read with "Program Closed: application name"...

    as i tracked the error it occurs at the following line....
    .
    .
    .
    TMsvSelectionOrdering sort;
    sort.SetShowInvisibleEntries(ETrue);
    CMsvEntry* inboxContext = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, sort); //Error occurs here
    .
    .
    .

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

    Re: Problem in reading Inbox

    The panic code thing is here: http://wiki.forum.nokia.com/index.ph...ded_panic_code
    However it does not work on S60 2nd FP3 as I know (it may be disabled on S60 2nd FP2 too).
    A thing you can try is putting a TRAP around that method call, perhaps it just leaves somewhere, and that is something you can catch and log/display.
    Since it is a variable declaration, you want to have it outside of the TRAP, something like this
    Code:
    CMsvEntry *inboxContect=NULL;
    TRAPD(err, inboxContext = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, sort))
    if(err!=KErrNone) {do something, display it, or write to a logfile}

  5. #5
    Registered User
    Join Date
    Jul 2010
    Posts
    17

    Re: Problem in reading Inbox

    Thanks wizard for your kind reply

    puting TRAP didnot worked. but i found the panic Code at the same line...it is KERN-EXEC 3

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

    Re: Problem in reading Inbox

    yep, you can not TRAP panics, anyway the KERN-EXEC 3 indicates a memory violation error, most likely a usage of a NULL pointer or other ways invalid pointer usage. Thus do check the ecat line where you get it, and then see all pointers used on that line and see that they are non-NULL and valid.

  7. #7
    Registered User
    Join Date
    Jul 2010
    Posts
    17

    Re: Problem in reading Inbox

    in Debug mode I found the following error "can't read memory from address 0x00000020" at following line for iSession

    CMsvEntry* inboxContext=CMsvEntry::NewL(iSession, KMsvGlobalInBoxIndexEntryId, sort);

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

    Re: Problem in reading Inbox

    how is your iSession defined and initialized ?

  9. #9
    Registered User
    Join Date
    Jul 2010
    Posts
    17

    Re: Problem in reading Inbox

    iSession is defined in CSmsHandler class..... and is initialized in the constructor of the Class...

    i am using wiki example http://wiki.forum.nokia.com/index.php/SMS_Operations for s60 2nd 3rd edition

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

    Re: Problem in reading Inbox

    No you are not. You are using iSession and the original code appears to use *iSession, so I would actully like to see the real code you are using. So just copy paste the parts where you are initializing it, and check how you are having it declared in your class as a member variable.

  11. #11
    Registered User
    Join Date
    Jul 2010
    Posts
    17

    Re: Problem in reading Inbox

    Sorry... actually it is *iSession it was typing error... I m using the exact code provided in the example...

    Here is initializaton code inside CSmsHandler Constructor...
    .
    .

    iSession = CMsvSession::OpenSyncL( *this );

    iMtmRegistry = CClientMtmRegistry::NewL(*iSession);
    //iMtm = iMtmRegistry->NewMtmL(KUidMsgTypeSMS);
    iSmsMtm = STATIC_CAST(CSmsClientMtm*,iMtmRegistry->NewMtmL(KUidMsgTypeSMS));

    // Entry selection for all received messages.
    iSelection = new ( ELeave ) CMsvEntrySelection();
    .
    .
    .

    code where error occurs..........
    .
    .
    .

    TMsvSelectionOrdering sort;
    sort.SetShowInvisibleEntries(ETrue); // we want to handle also the invisible entries

    CMsvEntry* inboxContext=CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, sort); // Error Occurs here
    CleanupStack::PushL(inboxContext);

    CMsvEntrySelection* entries = inboxContext->ChildrenL();
    CleanupStack::PushL( entries );

    TInt msgCount= entries->Count();
    .
    .
    .
    Last edited by manvinder84; 2010-10-30 at 08:19.

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

    Re: Problem in reading Inbox

    then it looks good to me, and I can not see anything there that could be the problem. The CMsvEntry though has some variables it puts in a stack, so in theory could could have stack-overflow, so just a wild guessing you could try increasing your stack to be bigger than the default one.

  13. #13
    Registered User
    Join Date
    Jul 2010
    Posts
    17

    Re: Problem in reading Inbox

    i managed to increase stack size using EPOCSTACKSIZE in MMP file ... but problem still exists...



    any more suggestion..
    Last edited by manvinder84; 2010-10-30 at 09:07.

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

    Re: Problem in reading Inbox

    the line only has one pointer that is used, and if you really do initialize and use it beforehad without problems, then I'm puzzled. Anyway, you could always check the capabilities you have and see that ReadUserData WriteUserData NetworkServices ones are included.

Similar Threads

  1. Problem while reading message from inbox
    By ash_leo in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2008-12-26, 14:01
  2. problem in Reading sms from inbox
    By venkatesh.pampana in forum Symbian
    Replies: 2
    Last Post: 2008-10-29, 13:04
  3. Reading Inbox
    By 1xuname1x in forum Mobile Java General
    Replies: 2
    Last Post: 2008-02-04, 11:34
  4. CMsvSession Problem, Cannot access Inbox for reading SMS
    By peter0815neu in forum General Messaging
    Replies: 0
    Last Post: 2006-04-24, 15:00
  5. reading sms from the inbox
    By chandanp in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2002-11-22, 10:56

Posting Permissions

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