×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Jan 2009
    Location
    Dhaka,Bangladesh
    Posts
    146

    Device Hang during write operation

    Hi i am creating an application which first delete all files of the phone memory and then count the free space and write several files on there.the process is shown with progress bar.
    sometimes its working fine.but after factory reset and then run my application then after write 80% -90% the device is hang.need to move battery.this bug reproduce rarely.where the problem is occurred?is it device problem?i am using E50 device.

    Thanks in advance.
    Saniat

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Device Hang during write operation

    can you show us how you are writing files.

  3. #3
    Regular Contributor
    Join Date
    Jan 2009
    Location
    Dhaka,Bangladesh
    Posts
    146

    Re: Device Hang during write operation

    void CDCEngineCore::WriteFile( const TDesC& aFile, TInt aDriveId )
    {
    TBuf<KMaxBuffer> filepath;
    filepath.Copy( aFile );
    RFile file;
    RFs fsSession;
    User::LeaveIfError( fsSession.Connect() );
    User::LeaveIfError( file.Replace( fsSession, aFile, EFileWrite ) );

    TInt getFreeSpace = DriveFreeSpace( aDriveId );
    TInt fileSize = 0;
    if( getFreeSpace > 0)
    {
    if( getFreeSpace <= KMaxByte ) //KMaxByte = 70KB
    {
    fileSize = getFreeSpace;
    }
    else
    {
    fileSize = KMaxByte;
    }

    TInt i;

    for( i = 0; i <= 2; i++ )
    {
    TInt pos = 0;
    file.Seek( ESeekStart, pos );
    if( i == 0 )
    {
    TBuf8<KMaxByte> maxByte;
    maxByte.AppendFill( '0xAA', fileSize );
    TRAPD( err1,file.Write( maxByte ) );
    file.Flush();
    }
    if( i == 1 )
    {
    TBuf8<KMaxByte> maxByte2;
    maxByte2.AppendFill( '0x55', fileSize );
    TRAPD( err2,file.Write( maxByte2) );
    file.Flush();
    }
    if( i == 2 )
    {
    TBuf8<KMaxByte> maxByte3;
    maxByte3.AppendFill( '0x00', fileSize );
    TRAPD( err3,file.Write( maxByte3) );
    file.Flush();
    }
    }
    }

    file.Close();
    fsSession.Close();
    }

    Lots of files are write in the device till the memory is full.
    Saniat

Similar Threads

  1. On Device Debugging using USB
    By tinkywinky in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 7
    Last Post: 2010-03-11, 05:17
  2. OMA Device Management Client Initialization problem
    By arieatuw in forum OMA DM/DS/CP
    Replies: 0
    Last Post: 2009-05-29, 04:54
  3. Hang Device After Removing Memory Card
    By yogesh.bhople in forum Symbian
    Replies: 6
    Last Post: 2007-07-25, 09:11
  4. Switching back to Series 60 SDK v1.2, Builder X
    By fabiano_pmj in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2005-01-19, 17:11
  5. Error after typing bldmake bldfiles
    By uckermark-girl in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2005-01-19, 07:48

Posting Permissions

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