×

Discussion Board

Results 1 to 3 of 3

Thread: error cbase 63

  1. #1
    Registered User
    Join Date
    Feb 2008
    Location
    Genova - Italy
    Posts
    26

    Exclamation error cbase 63

    hi all!!

    i have this problem: when run application in emulator i receive this error: Application closed E32USER-CBASE63

    my newfile and directory are creating correctly, but not found!

    my program create a file.txt, and i want write on the HBufC8 by TPtr8.
    when i Build Porject there aren't problems!
    i used a helloworld project, and i add my menu row.
    my source is in the helloworldAppUi.cpp, and i show you!
    help me!!
    it's 3 day that i try!!
    thanks!!!

    Code:
    void CHelloWorldAppUi::ConstructL()
    	{
    	// Initialise app UI with standard value.
    	BaseConstructL(CAknAppUi::EAknEnableSkin);
    
    	// Create view object
    	iAppView = CHelloWorldAppView::NewL( ClientRect() );
    
    	// Create a file to write the text to
    	RFs fsSession;
    	User::LeaveIfError(fsSession.Connect());
    	CleanupClosePushL( fsSession );
    
    	TInt err = fsSession.MkDirAll(KFileName);
    	if ( (KErrNone != err) && (KErrAlreadyExists != err) )
    		{
    		CleanupStack::PopAndDestroy(1); //  fsSession
    		return;
    		}
    	
    	TInt errDataFile = fsSession.MkDirAll(dataFileName);
    	if ((KErrNone != errDataFile) && (KErrAlreadyExists != errDataFile ) )
    		{
    		CleanupStack::PopAndDestroy(2); // fsSession
    		return;
    		}
    	
    	RFile file;
    	err = file.Replace(fsSession, KFileName, EFileWrite );
    	CleanupClosePushL( file );
    	if ( KErrNone != err )
    		{
    		CleanupStack::PopAndDestroy(3); // file, fsSession
    		return;
    		}
    	
    	RFile dataValue;
    	err = dataValue.Replace(fsSession, dataFileName, EFileWrite );
    	CleanupClosePushL(dataValue);
    	if ( KErrNone != err )
    		{
    		CleanupStack::PopAndDestroy(4); // dataValue, fsSession
    		return;
    		}
    	
    	RFileWriteStream outputFileStream( file );
    	CleanupClosePushL( outputFileStream );
    	outputFileStream << KText;
    
    	CleanupStack::PopAndDestroy(5); // outputFileStream, file, fsSession
    	fsSession.Close();
    
    	}
    and case mycommand is:

    Code:
    case ECommand3:
    	{
    	RFs fsSession;
    	User::LeaveIfError(fsSession.Connect());
    	CleanupClosePushL(fsSession);
    	//fsSession.Connect();
    	
    	RFile dataValue;
    	TInt err = dataValue.Replace(fsSession, dataFileName, EFileWrite );
    	CleanupClosePushL(dataValue);
    	if ( KErrNone != err )
    	{
    	CleanupStack::PopAndDestroy(1); // dataValue, fsSession
    	return;
    	}
    	
    	RArray<TInt> assi;
    	TInt i=0;		
    	for (i=1;i<=MaxNumberValue; i++) assi[i]=i;
    	
    	HBufC8 *buf = HBufC8::NewL(MaxNumberValue);
    	TPtr8 pBuf = buf->Des();
    	for (i=1 ; i<=assi.Count() ; i++) pBuf[i]=assi[i];
    	
    	dataValue.Write(pBuf);
    	fsSession.Close();
    	
    	}
    Thnks all!!
    bye!!
    Fabio

  2. #2
    Nokia Developer Champion
    Join Date
    Jul 2004
    Posts
    2,015

    Re: error cbase 63

    The description given for this error code is very specific in telling you where the problem is.

    Have you looked up the description of the error code?

    Or if you have, do you not understand why your code is at fault given what the explanation for the error code is?

    In particular, why have you done this:

    CleanupStack::PopAndDestroy(2); // fsSession
    Last edited by hotcheese; 2008-03-27 at 18:47.

  3. #3
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: error cbase 63

    hi,

    just call CleanupStack::PopAndDestroy(),or CleanupStack::PopAndDestroy(fsSession ).

    savaj...

Posting Permissions

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