×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Aug 2008
    Location
    Pune
    Posts
    223

    Panic E32 USER -CBase 21

    Hi All,
    I am developing an application in that panic e32 user cbase21 arises .In my application I am using list box.While handelling list box event only item at index 0 is accessible when click on other item index panic occurs.I am developing application in s60 5th edition sdk.
    my code is...
    Code:
    iListBox = new (ELeave) CAknDoubleLargeStyleListBox();
    
            // Construct listbox 
    
            iListBox->ConstructL( this, EAknListBoxSelectionList | EAknListBoxLoopScrolling );
    
            iListBox->SetContainerWindowL( *this );
    
            // Set scrollbars
    
            iListBox->CreateScrollBarFrameL( ETrue );
    
            iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOn, CEikScrollBarFrame::EAuto );   
            
            // Create listbox item array
    
            iListBoxItems = new (ELeave) CDesCArrayFlat(6);
    
            // Create listbox items
    
            iListBoxItems->AppendL( _L("0\titem0\t") );
            iListBoxItems->AppendL( _L("1\titem1\t") );
            iListBoxItems->AppendL( _L("2\titem2\t") );
            iListBoxItems->AppendL( _L("3\titem3\t") );
            iListBoxItems->AppendL( _L("4\titem4\t") );
            iListBoxItems->AppendL( _L("5\titem5\t") );
    
            // Add items to listbox
    
            iListBox->Model()->SetItemTextArray( iListBoxItems );
    
            // Listbox deletes the item array
    
            iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray );
            iListBox->HandleItemAdditionL( );
            
            //To get event in HandleListBoxEventL()
            //Do not forgot to add it..........
            iListBox->SetListBoxObserver(this);
            // Add icons to listbox
    
            AddListboxIconsL();
    
            // Activate Listbox
            iListBox->SetRect( Rect() );
            iListBox->ActivateL();
    
    In HandleListBoxEventL function....
    
    if ( aEventType == EEventEnterKeyPressed || aEventType == EEventItemDoubleClicked)
       	     {
       	     	TInt Index = iListBox->CurrentItemIndex();
       	     	
       	     	switch (Index)
       	          {
       	    	 	case 0: 
       	    	 		{
       	    	 				CAknInformationNote* informationNote;
    	 	            	   informationNote = new ( ELeave ) CAknInformationNote;
    	 	            	   informationNote->ExecuteLD(_L("item0 Selected"));
    	 	            	 
       	    	 		}
       	    	 	break;
       	    	 	case 1:
       	    	 	CAknInformationNote* informationNote;
       	    	 	informationNote = new ( ELeave ) CAknInformationNote;
       	    	 	informationNote->ExecuteLD(_L("index1 Selected"));
       	                  break;
       	    	 	case 2: 
       	    	 	CAknInformationNote* informationNote2;
       	    	 		 	            	   informationNote2 = new ( ELeave ) CAknInformationNote;
       	    	 		 	            	   informationNote2->ExecuteLD(_L("index2 Selected"));
       	    	          break;
    	   	    	case 3: 
    	   	    		CAknInformationNote* informationNote3;
    	   	    			 	            	   informationNote3 = new ( ELeave ) CAknInformationNote;
    	   	    			 	            	   informationNote3->ExecuteLD(_L("index3 Selected"));
    	   	    	      break;
    	   	    	case 4: 
    	   	    		CAknInformationNote* informationNote4;
    	   	    			 	            	   informationNote4= new ( ELeave ) CAknInformationNote;
    	   	    			 	            	   informationNote4->ExecuteLD(_L("index4 Selected"));
    	   	    	      break;
    	    	 	case 5: 
    	    	 		CAknInformationNote* informationNote5;
    	    	 			 	            	   informationNote5 = new ( ELeave ) CAknInformationNote;
    	    	 			 	            	   informationNote5->ExecuteLD(_L("index5 Selected"));
                        break;
                    default:
                        // Do default handling here…
                	   CAknInformationNote* informationNote1;
                	   informationNote1 = new ( ELeave ) CAknInformationNote;
                	   informationNote1->ExecuteLD(_L("default Selected"));
                       break;
                   }
              }
    please help me ASAP....
    Thanx...

  2. #2
    Registered User
    Join Date
    Dec 2005
    Posts
    1,236

    Re: Panic E32 USER -CBase 21

    Hi,

    I would suggest you to go through this document and check your array usage in your listbox code.
    Regards,
    Sriky

  3. #3
    Regular Contributor
    Join Date
    Aug 2008
    Location
    Pune
    Posts
    223

    Re: Panic E32 USER -CBase 21

    Quote Originally Posted by sriky27 View Post
    Hi,

    I would suggest you to go through this document and check your array usage in your listbox code.
    Thanx 4 reply sriky,
    but my problem is not solved yet.Is there any problem in my code please check it.let me know soon..

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: Panic E32 USER -CBase 21

    Since you are using 5th edition, it is pretty probable that you are using the emulator, so you could debug your code. Enable Just In Time debugging in the emulator preferences, and start your code in debug mode. Carbide will show you where the panic occurs.

  5. #5
    Regular Contributor
    Join Date
    Aug 2008
    Location
    Pune
    Posts
    223

    Re: Panic E32 USER -CBase 21

    Thanx 4 help to all,
    my problem is not solved ...
    I check just in time debugging option in emulator but as my debugger in IDE not support it I not able trace the panic where it occurs.

  6. #6
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,344

    Re: Panic E32 USER -CBase 21

    If you open the SDK help and search for the the error, you might have found the description.

    Anyways here it goes:

    E32 USER -CBase 21
    This panic is raised by any operation which accesses an element of an array by explicit reference to an index number, for example, the Delete(), InsertL() and At() member functions or the operator Operator[]. It is caused by specifying an index value which is either negative or is greater than or equal to the number of objects currently within the array.
    Anyways from the given code snippet, I cannot figure out why does it occur in this piece of code. Are you manipulating it the listbox somewhere else in your program?

    As far as your final reply is concerned, I do not get your point. If you just set Just-in-time debugging option from your Emulator->Preferences then it should give you last known position of the problem in debugging.

    Finally Listbox manipulation works apparently fine for me in S60 5th edition as it should.
    Nokia Developer Wiki Moderation team

Similar Threads

  1. Panic USER 42: how it is here ???
    By KhaledMahmood in forum Symbian Networking & Messaging (Closed)
    Replies: 10
    Last Post: 2010-01-25, 14:26
  2. Program exits with USER Panic 42
    By raffaelbechara in forum Symbian
    Replies: 2
    Last Post: 2008-10-15, 18:09
  3. ESock_Main Panic USER 0
    By ctrl-d in forum Symbian
    Replies: 0
    Last Post: 2008-04-23, 17:37
  4. USER 42 panic
    By Norrit_ in forum Symbian
    Replies: 3
    Last Post: 2006-09-14, 05:17
  5. exe and CBase 69 panic.
    By wfettich in forum Symbian
    Replies: 1
    Last Post: 2004-10-20, 14:20

Posting Permissions

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