Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-29288

Qt5 QJsonDocument method 'toJson()' will crash with bigger arrays

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 5.1.0
    • 5.0.0
    • Core: Other
    • None
    • Linux 64 bits.
    • e1d3687d64a19d27448b3f8247505daa99261ea1

      Qt5 brings Json classes that are pretty powerful. As any new feature, it may have some bugs lurking in corner cases.

      One of this, is when a Json document is created with somewhat big arrays of elements (e.g 2500 elements, each one looks like:
      {
      "name": "John",
      "surname": "Doe 4"
      }

      Attached an example to reproduce this bug (plus the generated backtrace). Since it depends on the number of elements (and the number of attributes), I wouldn't be surprised if it is related with a stack issue (is QJson using recursive methods?).

        1. bt.txt
          2 kB
        2. qjsonbug.tar.bz2
          19 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            laknoll Lars Knoll
            adenilson Adenilson Cavalcanti
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes