Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Feb 2008

    Program terminates abnormally on E62 without any error/panic


    I am new to symbian c++. I am uncompressing a file and trying to read its content. Uncompressed data is a structured data (record length 17) with first field as unsigned integer(2-bytes), rest some are one byte, some are 4 byte(long). I am ignoring the first record (lng = lng +17) and trying to read first field after that for rest of the records. This works fine in emulator and reads entire buffer but fails on E62. On E62 it executes once, then it enters the loop, increases the pointer (value of lng is 121 at his point) but terminates at the point of type casting without any error/panic. I guess its a case of memory violation, but how to detect if I dont get an error. My program runs fine on emulator but terminates abnormally on E62 without givin any error/panic. Please help me to find what wrong i am doing. Thanks

    // code snippet

    HBufC8* buffer = HBufC8::NewLC(member->UncompressedSize());
    TPtr8 bufferPtr(buffer->Des());
    User::LeaveIfError(stream->Read(bufferPtr, member->UncompressedSize()));

    TUint16 sc_code;
    TUint16 lng;
    lng = 87;

    // 1. Tried this
    //TUint8* pInput = (TUint8*)bufferPtr.Ptr();

    // 2. Tried this
    // char* str = new(ELeave) char[member->UncompressedSize()];
    // Mem::Copy(str, buffer->Ptr(), member->UncompressedSize());

    // the program terminates midway after entering the loop
    while (lng < member->UncompressedSize())
    lng = lng + 17;
    // Program terminates abnormally executing once the following line on E62,No error/panics shown.
    // But runs fine on emulator. please tell me what wrong i am doing here.

    // 1. Tried this
    //sc_code = *((TUint16*)(pInput + lng));

    2. Tried this
    //sc_code = *((TUint16 *)(str + lng));

    ......... etc..

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Wiltshire, UK

    Re: Program terminates abnormally on E62 without any error/panic

    You might want to enable error logging
    See http://wiki.forum.nokia.com/index.ph...ded_panic_code

    My guess is its almost certainly an alignment problem looking at the code
    See http://blogs.msdn.com/grantri/archiv...14/183524.aspx for more information on alignment problems.

    I recommend using RDesReadStream to sort out these issues.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Oslo, Norway

    Re: Program terminates abnormally on E62 without any error/panic

    You should check http://wiki.forum.nokia.com/index.ph...ded_panic_code in order to get the panic code. Your code mixes 8 bit descriptors and 16 bit data, so it might be an alignment problem.

  4. #4
    Registered User
    Join Date
    Feb 2008

    Re: Program terminates abnormally on E62 without any error/panic

    Hi Wizard & Paul,
    Thanks for your quick reply. I am going thru the links given by you. I will try again and let you know the outcomes.


Similar Threads

  1. problem in j2me program on Nokia 6630/6680
    By lappard in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2006-06-28, 16:32
  2. File access frequently by two program
    By kth0506 in forum Symbian
    Replies: 8
    Last Post: 2006-03-31, 14:38
  3. Connecting Java(J2SE) program on PC with SymbianC++ program on mobile using bluetooth
    By dotmilind in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-03-25, 23:10
  4. Replies: 1
    Last Post: 2005-05-24, 02:26
  5. Replies: 0
    Last Post: 2004-03-09, 02:50

Posting Permissions

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