Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSqlQuery.nex() and QSqlQuery.seek(i) crashes randomly. [SOLVED]
Forum Updated to NodeBB v4.3 + New Features

QSqlQuery.nex() and QSqlQuery.seek(i) crashes randomly. [SOLVED]

Scheduled Pinned Locked Moved General and Desktop
sqliteqsqlquery
6 Posts 2 Posters 1.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    amahta
    wrote on last edited by amahta
    #1

    Hi everyone.
    I have a huge database (40 GBs) in SQLite full of images and text and numbers and stuff.
    I am trying to export all those images into a folder but I get random crashes after 300, 400 records are exported.
    Any ideas?

    Thou shalt programme
    http://www.amin-ahmadi.com

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Did you check the memory consumption of your application ?
      What does a run through the debugger tell you ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Did you check the memory consumption of your application ?
        What does a run through the debugger tell you ?

        A Offline
        A Offline
        amahta
        wrote on last edited by amahta
        #3

        @SGaist It crashes when it tries to execute nex() function.
        I tried allocating and freeing memory inside the loop but it just crashes. And worst part is, not at the same record number. Each time it crashes at a random record number.

        Thou shalt programme
        http://www.amin-ahmadi.com

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Are you running a SELECT * query ? Or are you doing smaller batches ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          A 1 Reply Last reply
          0
          • SGaistS SGaist

            Are you running a SELECT * query ? Or are you doing smaller batches ?

            A Offline
            A Offline
            amahta
            wrote on last edited by
            #5

            @SGaist it's actually SELECT *
            Are you suggesting I should do smaller batches? (using LIMIT) How much is small?

            Thou shalt programme
            http://www.amin-ahmadi.com

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Indeed, as you wrote, you have 40GB database and I don't know the size of the images you have in there. So depending on that and the current number of entries you might be just filling your memory. Try starting with e.g. 100, if it resist increase the value.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved