Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:AknTextUtils::WrapToArrayL() does not accept literals (Known Issue)

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

AknTextUtils::WrapToArrayL() exits with KERNEXEC 3 panic when a literal (such as _L("") or _LIT("")) is passed as a parameter. It works fine if a descriptor other than a literal is passed. (e.g. TBuf, HBuf, TLitC).

Article Metadata
Tested with
Devices(s): Nokia N95, Nokia E90 Communicator, Nokia N73
Platform(s): S60 3rd Edition, S60 3rd Edition FP1
S60 3rd Edition FP1
S60 3rd Edition (initial release)
Created: User:Technical writer 1 (07 Aug 2008)
Last edited: hamishwillee (07 Aug 2012)

How to reproduce

  1. Declare and initialize a TRect object.
  2. Declare and initialize a const CFont object and use the following lines of code.
    CArrayFix<TPtrC>* array = new (ELeave)CArrayFixFlat<TPtrC>( 1 );
    CleanupStack::PushL( array );
    AknTextUtils::WrapToArrayL( _L( "Foo" ), aRect.Width(), *aFont, *array );

This works fine if the following lines of code are used:

TBuf<10> buf = KBuf;
CArrayFix<TPtrC>* array = new (ELeave)CArrayFixFlat<TPtrC>( 1 );
CleanupStack::PushL( array );
AknTextUtils::WrapToArrayL( buf, aRect.Width(), *aFont, *array );


No solution exists.

This page was last modified on 7 August 2012, at 00:34.
63 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.