Archived:Icon creation panics if index out of bounds on S60 3rd Edition (Known Issue)
Archived: 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}}.
This known issue was originally created by Otsov and has been verified by Nokia Developer.
Article Metadata
Tested with
Devices(s): Emulator
Compatibility
Platform(s): S60 3rd Edition
Article
Created: otsov
(13 Nov 2007)
Last edited: hamishwillee
(21 Jun 2012)
Overview
When creating an icon with some specific API calls, a panic is raised for debug builds.
Description
When trying to create an icon with either of the following functions
AknIconUtils::CreateIconL()
AknsUtils::CreateIconL()
<code>
and a .mif or .mbm file which is indexed with an index greater than the range of {{Icode|TInt16}} (that is, above 32767), {{Icode|AknIcon 5}} panic is raised for debug builds (that is, the emulator).
==Solution==
The panic is raised for debug builds (that is, the emulator) only. {{Icode|CreateIconL()}} functions have {{Icode|__ASSERT_DEBUG}} statements for image and mask index values - a panic is always raised if index > {{Icode|KMaxTInt16}}.
In release (device) builds, these functions leave with error code {{Icode|KErrEof (-25)}}.
Because of the way images are indexed in .mif files, the maximum safe number of icons in a single mif file is KMaxTInt16/4 (8192).


(no comments yet)