×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    51

    Exclamation Grid app is crashing... need urgent help...

    hi all
    i am a newbie. i am using Carbide v1.2 and Symbian SDK 3rd edition version 9.1.
    i am trying to implenent a grid in my app. i have used the grid example found here:

    http://wiki.forum.nokia.com/index.php/Grid_example

    function it said to load and add the icons to the right size.
    so i implemented the code found in c:\Symbian\9.1\S60_3rd\S60Doc\s60_platform_avkon_ui_resources_grids_v1_1_en.pdf

    on page 19 section 6.5.

    i have compiled it. it compiles with zero errors. when i run the program in debug mode, the application exits
    here is the thread stack:

    Code:
    Thread [Thread id: 2412] (Suspended: Signal 'Halt' received. Description: User halted thread.)	
    	39 0x83BA12( ekern.exe )()  0x0083ba12	
    	38 0x83BCC0( ekern.exe )()  0x0083bcc0	
    	37 0x85516E( ekern.exe )()  0x0085516e	
    	36 0x87451E( ekern.exe )()  0x0087451e	
    	35 0x87427A( ekern.exe )()  0x0087427a	
    	34 0x832B09( ekern.exe )()  0x00832b09	
    	33 0x831FC8( ekern.exe )()  0x00831fc8	
    	32 0x831287( ekern.exe )()  0x00831287	
    	31 0x8334D2( ekern.exe )()  0x008334d2	
    	30 0x874891( ekern.exe )()  0x00874891	
    	29 0x866D67( ekern.exe )()  0x00866d67	
    	28 0x8342B5( ekern.exe )()  0x008342b5	
    	27 0x83422B( ekern.exe )()  0x0083422b	
    	26 0x6005B149( euser.dll )()  0x6005b149	
    	25 0x6001DBE9( euser.dll )()  0x6001dbe9	
    	24 0x600133E9( euser.dll )()  0x600133e9	
    	23 0x6000BEE9( euser.dll )()  0x6000bee9	
    	22 0x6000C044( euser.dll )()  0x6000c044	
    	21 0x6000C6EF( euser.dll )()  0x6000c6ef	
    	20 CMyGridContainer::GetArrayL() E:\SymbianProjects\MyGrid\src\MyGridContainer.cpp:299 0x1e4e3b0c	
    	19 CMyGridContainer::MakeGridBoxL() E:\SymbianProjects\MyGrid\src\MyGridContainer.cpp:120 0x1e4e35c1	
    	18 CMyGridContainer::SizeChanged() E:\SymbianProjects\MyGrid\src\MyGridContainer.cpp:43 0x1e4e32e9	
    	17 0x4060AE4E( CONE.DLL )()  0x4060ae4e	
    	16 0x4060ACAA( CONE.DLL )()  0x4060acaa	
    	15 CMyGridContainer::ConstructL() E:\SymbianProjects\MyGrid\src\MyGridContainer.cpp:35 0x1e4e3277	
    	14 CMyGridAppView::ConstructL() E:\SymbianProjects\MyGrid\src\MyGridAppView.cpp:101 0x1e4e158f	
    	13 CMyGridAppView::NewLC() E:\SymbianProjects\MyGrid\src\MyGridAppView.cpp:66 0x1e4e144e	
    	12 CMyGridAppView::NewL() E:\SymbianProjects\MyGrid\src\MyGridAppView.cpp:51 0x1e4e13d6	
    	11 CMyGridAppUi::ConstructL() E:\SymbianProjects\MyGrid\src\MyGridAppUi.cpp:68 0x1e4e1e6d	
    	10 0x40B54656( eikcore.dll )()  0x40b54656	
    	9 0x40B546B7( eikcore.dll )()  0x40b546b7	
    	8 0x40B4B897( eikcore.dll )()  0x40b4b897	
    	7 0x40B5EC00( eikcore.dll )()  0x40b5ec00	
    	6 0x40B5E9DB( eikcore.dll )()  0x40b5e9db	
    	5 E32Main() E:\SymbianProjects\MyGrid\src\MyGrid.cpp:22 0x1e4e11d4	
    	4 _E32Startup() M:\src\cedar\generic\BASE\E32\EUSER\epoc\win32\uc_exe.cpp:46 0x1e4e4c55	
    	3 0x83A6A2( ekern.exe )()  0x0083a6a2	
    	2 0x838AD1( ekern.exe )()  0x00838ad1	
    	1 0x7C80B50B( KERNEL32.dll )()  0x7c80b50b

    here is the code MyGrid.cpp
    Code:
    // INCLUDE FILES
    #include <eikstart.h>
    #include "MyGridhApplication.h"
    
    
    LOCAL_C CApaApplication* NewApplication()
    	{
    	return new CMaxSplashApplication;
    	}
    
    GLDEF_C TInt E32Main()
    	{
    	return EikStart::RunApplication( NewApplication ); // 5 E32Main() E:\SymbianProjects\MyGrid\src\MyGrid.cpp:22 0x1e4e11d4
    	}
    MyGridAppUi.cpp

    Code:
    void CMYGridAppUi::ConstructL()
    {
    	// Initialise app UI with standard value.
    	BaseConstructL(CAknAppUi::EAknEnableSkin);
    	// Create view object
    	iAppView = CMaxSplashAppView::NewL( ClientRect() ); //11 CMyGridAppUi::ConstructL() E:\SymbianProjects\MyGrid\src\MyGridAppUi.cpp:68 0x1e4e1e6d
    	AddViewL(iAppView);
    	SetDefaultViewL(*iAppView);
    }
    MyGridAppView.cpp
    Code:
    CMaxSplashAppView* CMaxSplashAppView::NewL( const TRect& aRect )
    {
    	CMaxSplashAppView* me = CMaxSplashAppView::NewLC( aRect ); //	12 CMyGridAppView::NewL() E:\SymbianProjects\MyGrid\src\MyGridAppView.cpp:51 0x1e4e13d6	
    	CleanupStack::Pop( me );
    	return me;
    }
    
    // CMaxSplashAppView* CMaxSplashAppView::NewLC( const TRect& aRect )
    {
    	CMaxSplashAppView* myself = new ( ELeave ) CMaxSplashAppView;
    	CleanupStack::PushL( myself );
    	myself->ConstructL( aRect );
    	return myself; // 	13 CMyGridAppView::NewLC() E:\SymbianProjects\MyGrid\src\MaxSplashAppView.cpp:66 0x1e4e144e	
    }
    
    void CMaxSplashAppView::ConstructL( const TRect& aRect )
    {
    	BaseConstructL( R_LPVR_MAIN_VIEW );
    
    	if( (CSplashScreen *)NULL == m_cSplashScreenPtr )
    	{
    		m_cSplashScreenPtr = new CSplashScreen(this);
    		m_cSplashScreenPtr->ConstructL(aRect);
    		m_cSplashScreenPtr->SetMopParent(this);
    		AppUi()->AddToStackL(*this, m_cSplashScreenPtr);
    	}
    	
    	
    	if( (CMyGridContainer *)NULL == m_cMyGridContainerPtr )
    		{
    		    m_cMyGridContainerPtr = new CMyGridContainer();
    		    m_cMyGridContainerPtr->ConstructL(aRect);
    		    m_cMyGridContainerPtr->SetMopParent(this); //	13 CMyGridAppView::NewLC() E:\SymbianProjects\MyGrid\src\MaxSplashAppView.cpp:66 0x1e4e144e	
    			AppUi()->AddToStackL(*this, m_cMyGridContainerPtr);
    		}
    }
    MyGridContainer.cpp

    Code:
    void CMyGridContainer::ConstructL(const TRect& aRect)
    {
    	CreateWindowL();
    	SetRect(CEikonEnv::Static()->EikAppUi()->ClientRect());
    	ActivateL(); //<-- 15 CMyGridContainer::ConstructL() E:\SymbianProjects\MyGrid\src\MyGridContainer.cpp:35 0x1e4e3277	
    	//SetMenuL(); //<-- this line has purposefully commented because its giving an error as unidentified identifier SetMenuL()
    	DrawNow();
    }
    
    
    void CMyGridContainer::MakeGridBoxL()
    {
    	TInt MySetIndex(0);
    	
    	if(iMyGrid)
    		{
    		MySetIndex=iMyGrid->CurrentItemIndex();
    		}
    	
    	delete iMyGrid;
    	iMyGrid = NULL;
    	
    	iMyGrid= new (ELeave) CAknGrid;
    	iMyGrid->SetContainerWindowL(*this);
    	
    	CAknGridM* GridViewM = new (ELeave) CAknGridM;
    	iMyGrid->SetModel(GridViewM);
    	
    	iMyGrid->ConstructL(this, EAknDialogSelectionList);
    	
    	TRect MyRect(Rect() );
    	
    	TInt NumH = (MyRect.Height() /80);
    	TInt NumW = ( MyRect.Width() /80);
    	
    	if(NumH < 3)
    		{
    			NumH=3;
    		}
    	
    	if(NumW < 3)
    		{
    			NumW=3;
    		}
    	
    	TSize SizeOfItems;
    	
    	SizeOfItems.iHeight= ( MyRect.iBr.iX - MyRect.iTl.iX ) /NumH;
    	SizeOfItems.iWidth = ( MyRect.iBr.iY - MyRect.iTl.iY ) /NumW;
    	
    	iMyGrid->SetLayoutL(EFalse, ETrue, ETrue, NumW, NumH, SizeOfItems);
    	
    	iMyGrid->SetPrimaryScrollingType(CAknGridView::EScrollIncrementLineAndLoops);
    	iMyGrid->SetSecondaryScrollingType(CAknGridView::EScrollIncrementLineAndLoops);
    	
    	iMyGrid->SetCurrentDataIndex(0);
    	
    	CArrayPtr<CGulIcon>* icons = new (ELeave) CAknIconArray(2);
    	CleanupStack::PushL(icons);
    	
    	const CFont* MyUseFont = AknLayoutUtils::FontFromId(EAknLogicalFontSecondaryFont);
    	
    	TPoint TxtStartPoint(0,
    			(SizeOfItems.iHeight - (MyUseFont->HeightInPixels() + 3)));
    				TPoint TxtEndddPoint(SizeOfItems.iWidth, SizeOfItems.iHeight);
    			 
    				TPoint StartIcon(0,0);
    				TPoint EnddIcon(SizeOfItems.iWidth, TxtStartPoint.iY);
    				
    				TSize IconsSize((((EnddIcon.iX - StartIcon.iX) * 9) / 10),
    			(((EnddIcon.iY - StartIcon.iY) * 9) / 10));
    			 
    				iMyGrid->Model()->SetItemTextArray(GetArrayL(icons, IconsSize)); //<--19 CMyGridContainer::MakeGridBoxL() E:\SymbianProjects\MyGrid\src\MyGridContainer.cpp:120 0x1e4e35c1
    				iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL(icons);
    				CleanupStack::Pop(); // icons
    			 
    				iMyGrid->ScrollBarFrame()->SetScrollBarVisibilityL(
    			CEikScrollBarFrame::EAuto, CEikScrollBarFrame::EAuto);
    			    
    				iMyGrid->HandleItemAdditionL();
    			 
    				AknListBoxLayouts::SetupStandardGrid(*iMyGrid);
    			 
    				AknListBoxLayouts::SetupFormGfxCell(*iMyGrid, iMyGrid->ItemDrawer(), 0, 0, 0, 0, 0,  SizeOfItems.iWidth,(EnddIcon.iY - StartIcon.iY), StartIcon, EnddIcon);
    			 
    				TInt BaseLine = (TxtEndddPoint.iY -
    			MyUseFont->BaselineOffsetInPixels() - 3);
    			 
    				AknListBoxLayouts::SetupFormTextCell(*iMyGrid, iMyGrid->ItemDrawer(),
    							1,  MyUseFont, 
    							215, 
    							3, 
    							0, 
    							BaseLine,
    							SizeOfItems.iWidth, 
    							CGraphicsContext::ECenter,
    							TxtStartPoint, 
    							TxtEndddPoint
    							);
    			 
    			 
    				TInt ItemsCount = iMyGrid->Model()->ItemTextArray()->MdcaCount();
    				
    				if(ItemsCount > MySetIndex && MySetIndex >= 0)
    					iMyGrid->SetCurrentItemIndex(MySetIndex);
    				else if(ItemsCount > 0)
    					iMyGrid->SetCurrentItemIndex(0);
    				
    			    iMyGrid->MakeVisible( ETrue );
    			    iMyGrid->SetFocus( ETrue );
    			    iMyGrid->ActivateL();
    			    iMyGrid->DrawNow();
    	
    }
    cont... next thread...
    Thanking you,
    Yours sincerely,

    Shankha Sanyal

  2. #2
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    51

    Re: Grid app is crashing... need urgent help...

    continued from previous thread

    CDesCArray* CMyGridContainer::GetArrayL(CArrayPtr<CGulIcon>* aIcon, const TSize& aIconsize)
    {


    CDesCArrayFlat* MyArray = new(ELeave)CDesCArrayFlat(1);
    CleanupStack::PushL(MyArray);

    /*
    this part copied from c:\Symbian\9.1\S60_3rd\S60Doc\s60_platform_avkon_ui_resources_grids_v1_1_en.pdf
    */
    // Create icon array with granularity of 1 icon
    CArrayPtr< CGulIcon >* icons = new(ELeave) CAknIconArray(1);
    CleanupStack::PushL( icons );

    _LIT(KtxMyGridIconsPath ,"z:\\resource\\apps\\MyGridIcons.mbm" );

    // Load the Bse30bitmap
    CFbsBitmap* Bse30bitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsBse30);
    CleanupStack::PushL( Bse30bitmap );
    // Load the Bse30mask
    CFbsBitmap* Bse30mask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsBse30mask );
    CleanupStack::PushL( Bse30mask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Bse30bitmap, Bse30mask ) );
    CleanupStack::Pop(2); // bitmap, mask

    // /*

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    //*/

    // Load the Bse_301bitmap
    CFbsBitmap* Bse_301bitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsBse_301);
    CleanupStack::PushL( Bse_301bitmap );
    // Load the Bse_301mask
    CFbsBitmap* Bse_301mask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsBse_301mask );
    CleanupStack::PushL( Bse_301mask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Bse_301bitmap, Bse_301mask ) );
    CleanupStack::Pop(2); // bitmap, mask

    // /*

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    //*/



    // Load the Helpbitmap
    CFbsBitmap* Helpbitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsHelp);
    CleanupStack::PushL( Helpbitmap );
    // Load the Helpmask
    CFbsBitmap* Helpmask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsHelpmask );
    CleanupStack::PushL( Helpmask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Helpbitmap, Helpmask ) );
    CleanupStack::Pop(2); // bitmap, mask

    // /*

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    //*/



    // Load the Ipobitmap
    CFbsBitmap* Ipobitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsIpo);
    CleanupStack::PushL( Ipobitmap );
    // Load the Ipomask
    CFbsBitmap* Ipomask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsIpomask );
    CleanupStack::PushL( Ipomask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Ipobitmap, Ipomask ) );
    CleanupStack::Pop(2); // bitmap, mask

    // /*

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    //*/



    // Load the Mfbitmap
    CFbsBitmap* Mfbitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsMf);
    CleanupStack::PushL( Mfbitmap );
    // Load the Bse30mask
    CFbsBitmap* Mfmask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsMfmask );
    CleanupStack::PushL( Mfmask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Mfbitmap, Mfmask ) );
    CleanupStack::Pop(2); // bitmap, mask

    // /*

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    //*/



    // Load the Navbitmap
    CFbsBitmap* Navbitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath, //20 CMyGridContainer::GetArrayL() E:\SymbianProjects\MyGrid\src\MyGridContainer.cpp:299 0x1e4e3b0c
    EMbmMygridiconsNav);
    CleanupStack::PushL( Navbitmap );
    // Load the Bse30mask
    CFbsBitmap* Navmask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsNavmask );
    CleanupStack::PushL( Navmask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Navbitmap, Navmask ) );
    CleanupStack::Pop(2); // bitmap, mask

    // /*

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    //*/


    // Load the Niftybitmap
    CFbsBitmap* Niftybitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsNifty);
    CleanupStack::PushL( Niftybitmap );
    // Load the Bse30mask
    CFbsBitmap* Niftymask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsNiftymask );
    CleanupStack::PushL( Niftymask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Niftybitmap, Niftymask ) );
    CleanupStack::Pop(2);

    // /*

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    //*/


    // Load the Add_stockbitmap
    CFbsBitmap* Add_stockbitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsAdd_stock);
    CleanupStack::PushL( Add_stockbitmap );
    // Load the Bse30mask
    CFbsBitmap* Add_stockmask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsAdd_stockmask );
    CleanupStack::PushL( Add_stockmask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Add_stockbitmap, Add_stockmask ) );
    CleanupStack::Pop(2);

    // /*

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    //*/


    // Load the Alert_iconbitmap
    CFbsBitmap* Alert_iconbitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsAlert_icon);
    CleanupStack::PushL( Alert_iconbitmap );
    // Load the Bse30mask
    CFbsBitmap* Alert_iconmask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsAlert_iconmask );
    CleanupStack::PushL( Alert_iconmask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Alert_iconbitmap, Alert_iconmask ) );
    CleanupStack::Pop(2);

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    CleanupStack::Pop(MyArray);
    return MyArray;

    }

    [/code]

    please help me solve this problem.
    thanks2
    Thanking you,
    Yours sincerely,

    Shankha Sanyal

  3. #3
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    Re: Grid app is crashing... need urgent help...

    Hi,

    first I must say that I'm not sure if anyone will go throght the full code here as it is really big)

    You have said that it crashes when you have tried to debug it. But where exactly? Did you have try to put breakpoint into code and did you debug it line-by-line? With which error it crash? When I looked quickly into the stack dump I could see here that the method 'CMyGridContainer::GetArrayL()' was called, so I guess the application doesn't crash just after startup, but after some pieces of the code are executed.

    Could you try to debug it?

    BR
    STeN

  4. #4
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    51

    Re: Grid app is crashing... need urgent help...

    Quote Originally Posted by stenlik View Post
    Hi,

    first I must say that I'm not sure if anyone will go throght the full code here as it is really big)

    You have said that it crashes when you have tried to debug it. But where exactly? Did you have try to put breakpoint into code and did you debug it line-by-line? With which error it crash? When I looked quickly into the stack dump I could see here that the method 'CMyGridContainer::GetArrayL()' was called, so I guess the application doesn't crash just after startup, but after some pieces of the code are executed.

    Could you try to debug it?

    BR
    STeN
    Hi stenlik,
    Thanks for your advise for not writing writing too much )
    I'll definitely keep that in mind the next time i make a post. Please forgive me if i had made too long because i wanted to be thorough and went a wee bit overboard.

    Thanks again for your advice of trying to debug the application. I debugged it and sort of resolved the situation, i.e its not crashing anymore. although i am getting unexpected results. I'll make a new post for this problem.
    Thanking you,
    Yours sincerely,

    Shankha Sanyal

  5. #5
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    Re: Grid app is crashing... need urgent help...

    Hi,

    it's definitely O.K - it's fine that you have solved the problem, even partially! Big pieces of code are not problem) but I think that people who writes here mostly do not have time to go through the whole code...

    Good luck
    STeN

  6. #6
    Regular Contributor
    Join Date
    Apr 2010
    Posts
    131

    Re: Grid app is crashing... need urgent help...

    Quote Originally Posted by shankha View Post
    continued from previous thread

    CDesCArray* CMyGridContainer::GetArrayL(CArrayPtr<CGulIcon>* aIcon, const TSize& aIconsize)
    {


    CDesCArrayFlat* MyArray = new(ELeave)CDesCArrayFlat(1);
    CleanupStack::PushL(MyArray);

    /*
    this part copied from c:\Symbian\9.1\S60_3rd\S60Doc\s60_platform_avkon_ui_resources_grids_v1_1_en.pdf
    */
    // Create icon array with granularity of 1 icon
    CArrayPtr< CGulIcon >* icons = new(ELeave) CAknIconArray(1);
    CleanupStack::PushL( icons );

    _LIT(KtxMyGridIconsPath ,"z:\\resource\\apps\\MyGridIcons.mbm" );

    // Load the Bse30bitmap
    CFbsBitmap* Bse30bitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsBse30);
    CleanupStack::PushL( Bse30bitmap );
    // Load the Bse30mask
    CFbsBitmap* Bse30mask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsBse30mask );
    CleanupStack::PushL( Bse30mask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Bse30bitmap, Bse30mask ) );
    CleanupStack::Pop(2); // bitmap, mask

    // /*

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    //*/

    // Load the Bse_301bitmap
    CFbsBitmap* Bse_301bitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsBse_301);
    CleanupStack::PushL( Bse_301bitmap );
    // Load the Bse_301mask
    CFbsBitmap* Bse_301mask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsBse_301mask );
    CleanupStack::PushL( Bse_301mask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Bse_301bitmap, Bse_301mask ) );
    CleanupStack::Pop(2); // bitmap, mask

    // /*

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    //*/



    // Load the Helpbitmap
    CFbsBitmap* Helpbitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsHelp);
    CleanupStack::PushL( Helpbitmap );
    // Load the Helpmask
    CFbsBitmap* Helpmask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsHelpmask );
    CleanupStack::PushL( Helpmask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Helpbitmap, Helpmask ) );
    CleanupStack::Pop(2); // bitmap, mask

    // /*

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    //*/



    // Load the Ipobitmap
    CFbsBitmap* Ipobitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsIpo);
    CleanupStack::PushL( Ipobitmap );
    // Load the Ipomask
    CFbsBitmap* Ipomask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsIpomask );
    CleanupStack::PushL( Ipomask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Ipobitmap, Ipomask ) );
    CleanupStack::Pop(2); // bitmap, mask

    // /*

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    //*/



    // Load the Mfbitmap
    CFbsBitmap* Mfbitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsMf);
    CleanupStack::PushL( Mfbitmap );
    // Load the Bse30mask
    CFbsBitmap* Mfmask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsMfmask );
    CleanupStack::PushL( Mfmask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Mfbitmap, Mfmask ) );
    CleanupStack::Pop(2); // bitmap, mask

    // /*

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    //*/



    // Load the Navbitmap
    CFbsBitmap* Navbitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath, //20 CMyGridContainer::GetArrayL() E:\SymbianProjects\MyGrid\src\MyGridContainer.cpp:299 0x1e4e3b0c
    EMbmMygridiconsNav);
    CleanupStack::PushL( Navbitmap );
    // Load the Bse30mask
    CFbsBitmap* Navmask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsNavmask );
    CleanupStack::PushL( Navmask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Navbitmap, Navmask ) );
    CleanupStack::Pop(2); // bitmap, mask

    // /*

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    //*/


    // Load the Niftybitmap
    CFbsBitmap* Niftybitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsNifty);
    CleanupStack::PushL( Niftybitmap );
    // Load the Bse30mask
    CFbsBitmap* Niftymask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsNiftymask );
    CleanupStack::PushL( Niftymask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Niftybitmap, Niftymask ) );
    CleanupStack::Pop(2);

    // /*

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    //*/


    // Load the Add_stockbitmap
    CFbsBitmap* Add_stockbitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsAdd_stock);
    CleanupStack::PushL( Add_stockbitmap );
    // Load the Bse30mask
    CFbsBitmap* Add_stockmask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsAdd_stockmask );
    CleanupStack::PushL( Add_stockmask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Add_stockbitmap, Add_stockmask ) );
    CleanupStack::Pop(2);

    // /*

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    //*/


    // Load the Alert_iconbitmap
    CFbsBitmap* Alert_iconbitmap = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsAlert_icon);
    CleanupStack::PushL( Alert_iconbitmap );
    // Load the Bse30mask
    CFbsBitmap* Alert_iconmask = iEikonEnv->CreateBitmapL( KtxMyGridIconsPath,
    EMbmMygridiconsAlert_iconmask );
    CleanupStack::PushL( Alert_iconmask );
    // Append the mail icon to icon array
    icons->AppendL( CGulIcon::NewL( Alert_iconbitmap, Alert_iconmask ) );
    CleanupStack::Pop(2);

    // Attach icon array to grid’s item drawer
    iMyGrid->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
    CleanupStack::Pop(); // icons

    CleanupStack::Pop(MyArray);
    return MyArray;

    }

    [/code]

    please help me solve this problem.
    thanks2
    You just need to POP icons and MyArray once before returning instead of doing it often.

Similar Threads

  1. OpenGL ES app is not trusted
    By mribble in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 7
    Last Post: 2006-11-03, 22:48
  2. 6680 Uninstall Problem: Please help: Urgent
    By arizkohli in forum Symbian
    Replies: 0
    Last Post: 2005-07-11, 14:10
  3. How to make sure the inside app just can be executed on one place
    By cellsoft_David in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-06-15, 09:52
  4. game crashing by pressing up key in Nokia series 40 (Urgent)
    By rahulsunrays in forum Mobile Java General
    Replies: 1
    Last Post: 2004-10-11, 17:45
  5. Replies: 1
    Last Post: 2004-02-20, 02:54

Posting Permissions

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