×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    25

    File opening + memory problem on device

    Hi,

    I'm using an xml file with a size of about 3MB.
    This works in the simulator.
    But on the device (Nokia N8) i'm getting a "not enough memory" error, when tryiung to load the file.
    I read about changing the TARGET.EPOCHEAPSIZE in the project file an did so without success:

    Code:
    TARGET.EPOCHEAPSIZE = 0x20000 0x1000000 // Min 128kb, Max 16Mb
    I open the file with the following code:

    Code:
    QString gpxFile = QFileDialog::getOpenFileName(this, QString("Open File"), QString("D:/"), QString("*.gpx"));
    
        if (gpxFile=="") {return;}
    
        QFile sourceDocument;
        sourceDocument.setFileName(gpxFile);
        if (!sourceDocument.open(QIODevice::ReadOnly)) {
            QMessageBox msgBox;
             msgBox.setText("ERROR LOADING.");
             msgBox.exec();
            return;
        }
    
        QDomDocument doc( "sourceDocument" );
        doc.setContent( &sourceDocument );
    Maybe someone can help?
    Thanks a lot.
    frsc

  2. #2
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: File opening + memory problem on device

    A DOM is going to take several times the space of the raw file.

Similar Threads

  1. Application is not opening on the device
    By Ameya.joshi_cellensis in forum Symbian
    Replies: 2
    Last Post: 2010-11-16, 13:33
  2. Replies: 11
    Last Post: 2009-12-07, 10:05
  3. Problem with reading a file stored on phone memory
    By iworktech_kiran in forum Mobile Java General
    Replies: 2
    Last Post: 2009-03-15, 04:50
  4. Replies: 4
    Last Post: 2008-11-15, 03:47
  5. sis not opening on device s60 III edition
    By vivek_mics in forum Symbian
    Replies: 2
    Last Post: 2006-12-15, 16:02

Posting Permissions

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