×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    30

    Strange behavior of the class CArrayFixFlat

    Hello.

    Please, help me to find a reason of strange behavior of the class CArrayFixFlat.

    In header file I have got a variable declaration:
    CArrayFixFlat<TRect> * iTopRect;

    In cpp file at the "ConstructL" function I write:
    iTopRect = new (ELeave)CArrayFixFlat<TRect>(7);
    TInt cnt = iTopRect -> Length();

    In debug time I get cnt = 16.
    Any further access to iTopRect leads to panic: "data access error"

    I don't understand such behavior.

    I suppose that the reason is a "out-of memory" error.
    But, in this case, the new operator must lead to leave.

    So, I have no ideas now.

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    India, Nashik
    Posts
    816

    Re: Strange behavior of the class CArrayFixFlat

    Quote Originally Posted by BETEP.OK View Post
    Hello.

    Please, help me to find a reason of strange behavior of the class CArrayFixFlat.

    In header file I have got a variable declaration:
    CArrayFixFlat<TRect> * iTopRect;

    In cpp file at the "ConstructL" function I write:
    iTopRect = new (ELeave)CArrayFixFlat<TRect>(7);
    TInt cnt = iTopRect -> Length();

    In debug time I get cnt = 16.
    Any further access to iTopRect leads to panic: "data access error"

    I don't understand such behavior.

    I suppose that the reason is a "out-of memory" error.
    But, in this case, the new operator must lead to leave.

    So, I have no ideas now.
    The mistake is you are calling length function not Count , length will give you the lenght of the datastructure in terms of bytes

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    30

    Re: Strange behavior of the class CArrayFixFlat

    Oh!
    Great thanks.
    Now all works fine.

    I have not switched from c# to symbian c++ and used the length method instead of the count one.

Similar Threads

  1. Issue when trying to generate .sis file
    By rmulam in forum Symbian Tools & SDKs
    Replies: 9
    Last Post: 2009-08-13, 14:10
  2. Java Application running on WTK but not on S60 SDK
    By roman.benz in forum Mobile Java Tools & SDKs
    Replies: 6
    Last Post: 2009-06-09, 14:38
  3. Class 1 to Class 2&3?
    By freeinkeroinen in forum Bluetooth Technology
    Replies: 2
    Last Post: 2006-05-03, 07:03
  4. Strange Unresolved External Link Error
    By mubx2000 in forum Symbian Networking & Messaging (Closed)
    Replies: 7
    Last Post: 2006-04-18, 09:31
  5. Replies: 3
    Last Post: 2004-07-16, 13:09

Posting Permissions

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