×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    9

    Question CCoeEnv::Static()->ReadDesCArrayResourceL cause program crash????

    I used CCoeEnv::Static()->ReadDesCArrayResourceL() to read ARRAY from resource twice in a function,but when I exit from program,it crash,code like below:
    ......
    CDesCArray *iCodeArray = CCoeEnv::Static()->ReadDesCArrayResourceL( R_ARRAY_COUNTRYCODE );
    CDesCArray *iNameArray = CCoeEnv::Static()->ReadDesCArrayResourceL( R_ARRAY_COUNTRYNAME );
    ......
    hope someone can help me....

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

    Re: CCoeEnv::Static()->ReadDesCArrayResourceL cause program crash????

    what is the crash code: http://wiki.forum.nokia.com/index.ph...ded_panic_code, also is this in emulator or in real device ?

  3. #3
    Registered User
    Join Date
    Sep 2009
    Posts
    9

    Re: CCoeEnv::Static()->ReadDesCArrayResourceL cause program crash????

    Error code: ALLOC:1f4c586c0
    It seems like memory leak,call CCoeEnv::Static()->ReadDesCArrayResourceL() twice will cause memory leak????

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

    Re: CCoeEnv::Static()->ReadDesCArrayResourceL cause program crash????

    just remember to delete all allocated stuff and you should get rid of it.

  5. #5
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: CCoeEnv::Static()->ReadDesCArrayResourceL cause program crash????

    Quote Originally Posted by talen_zhj View Post
    Error code: ALLOC:1f4c586c0
    It seems like memory leak,call CCoeEnv::Static()->ReadDesCArrayResourceL() twice will cause memory leak????
    Didn't you delete the iCodeArray , iNameArray after using them.
    Regards,
    Shafali

  6. #6
    Registered User
    Join Date
    Sep 2009
    Posts
    9

    Re: CCoeEnv::Static()->ReadDesCArrayResourceL cause program crash????

    no,if I delete iCodeArray,will crash as this code "KERN-EXEC 3"

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

    Re: CCoeEnv::Static()->ReadDesCArrayResourceL cause program crash????

    it shouldn't, anyway when deleting anything outside teh destructor, do set teh pointers to NULL, so you would not get double-deletion error's.

  8. #8
    Registered User
    Join Date
    Sep 2009
    Posts
    9

    Thumbs up Re: CCoeEnv::Static()->ReadDesCArrayResourceL cause program crash????

    OK.....
    I resloved this error.
    this error "KERN-EXEC 3",just because I put iNameArray to another array with below code:
    icountryArray.iarrayCountryCode.Append( (*iCodeArray)[i] );
    and icountryArray.iarrayCountryCode will be used to another function,if I delete it before Exit,this error will occur.

    now, I declare iNameArray and iCodeArray as parm of class,and delete them in destructor,system will not crash again.

    Thanks shafali gupta and symbianyucca

Similar Threads

  1. Replies: 7
    Last Post: 2010-02-08, 15:50
  2. Replies: 1
    Last Post: 2005-05-24, 02:26
  3. rebuilding a program
    By ja_calulot in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2003-09-04, 05:00
  4. MMS program for PocketPC and What Chipset ?
    By SamBenn in forum Multimodecards
    Replies: 1
    Last Post: 2003-08-07, 09:59
  5. A Really simple program to send & receive sms
    By tpex in forum PC Suite API and PC Connectivity SDK
    Replies: 0
    Last Post: 2002-05-14, 14:45

Posting Permissions

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