Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2009

    Red face KERN EXEC 3 on array access

    Hi there,
    why could it be that

    CDesCArrayFlat* Uvals = new (ELeave) CDesCArrayFlat( 1 );
    CleanupStack::PushL( Uvals );
    RDebug::Printf("Nvals length %d\n", Nvals->Count());
    RDebug::Printf("Uvals length %d\n", Uvals->Count());
    for (TInt i=0; i<Uvals->Count(); i++) {
    	RDebug::Printf("Uvals[%d]=%s\n", i, Uvals->At(i));

    115.865	Nvals length 5
    115.865	Uvals length 1
    115.865	Uvals[0]=0U�&ÞÞÞÞ  (should be an IP Address, iRecv is a TBuf<255>)
    and then crashes when accessing Nvals[0], which is declared in the constructor and used like

    Nvals = new (ELeave) CArrayFixFlat<TInt>(_M_TRACERT_NUMSAMPLES+1);  (_M_TRACERT_NUMSAMPLES=3)
    Nvals->AppendL(ttl);  (ttl is a TUint8)
    Thx for any hints.

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    જુનાગઢ - India

    Re: KERN EXEC 3 on array access

    Flat array have method MdcaPoint() to access value of particular index. so try to call Uvals->MdcaPoint(i) instead Uvals->At(i).

  3. #3
    Registered User
    Join Date
    Aug 2003
    Oulu, Finland

    Re: KERN EXEC 3 on array access

    Your Uvals array holds descriptors while %s formats C-style strings. To format descriptors, use %S (capital S). The format parameter is the address of the descriptor, e.g. &Uvals->At(i).

    Nvals is apparently a pointer to an array and not the array itself. Therefore Nvals[0] should lead to a compilation error. (*Nvals)[0] is probably what you wanted. Otherwise it is hard to say based on the information you provided. Generally, KERN-EXEC 3 panics are often caused by accessing invalid memory locations.


Similar Threads

  1. Kern Exec :0 error..?
    By remesh in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2009-01-08, 10:06
  2. Replies: 5
    Last Post: 2008-12-12, 09:42
  3. Search Field - KERN EXEC 3
    By Kavit Patel in forum Symbian
    Replies: 6
    Last Post: 2008-09-17, 12:59
  4. kern exec 3 in grid,plz help
    By isarc in forum Symbian
    Replies: 4
    Last Post: 2008-05-21, 05:18
  5. Replies: 4
    Last Post: 2008-03-05, 09:30

Posting Permissions

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