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

QVariant bug on text fields with the ODBC driver for IBM iSeries application distributed by IBM with the iSeries Access for Linux.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • 4.7.0, 4.7.1, 4.7.2, 4.7.3, 4.7.4, 5.1.0
    • SQL Support
    • None

    Description

      QVariant bug con il driver odbc IBM per iSeries
      Using query select fields of type text into databases on the iSeries or AS/400 via the ODBC driver supplied by IBM with iSeries Access for Linux, the request qsqlquery:: value () will block the application by indicating:

      gconv.c:75: __gconv: assertion "outbuf != ((void *)0) && *outbuf != ((void *)0)" failed.

      QVariant bug con il driver odbc IBM per iSeries
      The problem has been tested on Ubuntu 10.10 (64bit), 11.04 (32 and 64bit), 11.10 (64 bit) and Fedora 16 (64bit), but did not show up on ubuntu 4.10 (32bit). The main difference is that Ubuntu 10.04 uses iodbc, while the other distributions unixodcb.

      Below is a snippet:

        if(dbopen)
        {
          bool stato=false;
          qDebug()<<"Preparo la query...\n";
          QSqlQuery query(*db);
          query.prepare("SELECT DTDOC,NRDOC,RASCL FROM MONDINPERS/DOCACQ WHERE DTDOC=:i1");
          query.bindValue("i1",main_window->dateEdit->date().day()+main_window->dateEdit->date().month()*100+main_window->dateEdit->date().year()*10000);
          qDebug()<<"Eseguo la query...\n";
          query.exec();
          qDebug()<<"Query eseguita...\n";
          while(query.next())
          {
            qDebug()<<"Valore letto...";
            num_doc.append(query.value(1).toInt());
            qDebug()<<query.lastError();
            qDebug()<<"1...";
            main_window->listWidget_cli->addItem(QString("FD nr.")+QString::number(query.value(1).toInt())+QString(" di ")+(query.value(2).toString()));
            qDebug()<<"2...\n";
            stato=true;
          }
          if(stato)
            emit(message("Caricato dati da vecchia fatturazione."));
        }
      

      Follows the gdb bugtrace:

      (gdb) bt
      #0 0x00007ffff5d0cba5 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
      #1 0x00007ffff5d106b0 in abort () at abort.c:92
      #2 0x00007ffff5d05a71 in __assert_fail (
          assertion=0x7ffff5e22c40 "outbuf != ((void *)0) && *outbuf != ((void *)0)", file=<value optimized out>,
          line=75, function=0x7ffff5e1f7d9 "__gconv") at assert.c:81
      #3 0x00007ffff5cf93a3 in __gconv (cd=0x922e80, inbuf=0x7fffffff9bc0,
          inbufend=0xb7ec62 "\362\360\361\360\361\362\363\361\361\360\360\361\367\360\371\302\344\306\306\326@\327\311\305\331\326", '@' <repeats 24 times>"\362, \360\361\360\361\362\363\361\361\360\360\361\367\361\360\326\342\301\303@\342\331\323", '@' <repeats 27 times>"\362, \360\361\360\361\362\363\361\361\360\360\361\367\361\361\302\305\331\343\311\325\326@\301\344\307\344\342\343\326@\242\201\242", '@' <repeats 16 times>"\362, \360\361\360\361\362\363\---Type <return> to continue, or q <return> to quit---
      361\361\360\360\361\367\361\362\324\301\343\343\311\326\304\301@\327\311\305\331\311\325\326@P@\306\311\307\323\311@\342\327\301@@@@@@@"..., outbuf=0x7fffffff9bb0, outbufend=0x7ffff7fc9760 "`\227\374\367\377\177",
          irreversible=<value optimized out>) at gconv.c:75
      #4 0x00007ffff5cf882c in iconv (cd=0x1210, inbuf=0x7fffffff9bc0, inbytesleft=0x7fffffff9bb8,
          outbuf=0x7fffffff9bb0, outbytesleft=0x7fffffff9ba8) at iconv.c:53
      #5 0x00007fffe737631f in doIconv(void*, unsigned char const*, unsigned char*, unsigned long, unsigned long, unsigned long&, bool) () from /usr/lib/libcwbcore.so
      #6 0x00007fffe7376456 in PiNlConverter::convertIconv(unsigned char const*, unsigned char*, unsigned long, unsigned long, PiNlConversionDetail&) const () from /usr/lib/libcwbcore.so
      #7 0x00007fffe73796a8 in PiNlConverter::convert(unsigned char const*, unsigned char*, unsigned long, unsigned lon---Type <return> to continue, or q <return> to quit---
      g, PiNlConversionDetail&) const () from /usr/lib/libcwbcore.so
      #8 0x00007fffe75c6f5f in STATEMENT_INFO::convertToClientCodePage(char const*, char*, unsigned int, unsigned int, COLUMN_INFO&, COLUMN_INFO const&, unsigned int*, PiNlConverter::PADTYPE, int) ()
         from /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
      #9 0x00007fffe75c771b in odbcConv_SQL400_CHAR_to_C_WCHAR(STATEMENT_INFO&, char const*, char*, unsigned int, unsigned int, COLUMN_INFO&, COLUMN_INFO const&, unsigned int*) () from /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
      #10 0x00007fffe75c2587 in odbcConvSQLtoC(STATEMENT_INFO&, int, int, char const*, char*, unsigned int, unsigned int, COLUMN_INFO&, COLUMN_INFO&, unsigned int*) () from /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
      #11 0x00007fffe75b17b9 in STATEMENT_INFO::odbcGetData(unsigned int, short, char*, int, int*) ()
         from /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
      ---Type <return> to continue, or q <return> to quit---
      #12 0x00007fffe75b478d in SQLGetData () from /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
      #13 0x00007fffe839d7e1 in SQLGetData () from /usr/lib/libodbc.so.1
      #14 0x00007fffe85f2114 in qGetStringData (hStmt=0xb0df00, column=<value optimized out>, colSize=36,
          unicode=<value optimized out>) at ../../../sql/drivers/odbc/qsql_odbc.cpp:379
      #15 0x00007fffe85fc986 in QODBCResult::data (this=0x931d80, field=2)
          at ../../../sql/drivers/odbc/qsql_odbc.cpp:1212
      #16 0x00007ffff7babc4d in QSqlQuery::value (this=0x7fffffffb9e0, index=2) at kernel/qsqlquery.cpp:399
      #17 0x000000000041b294 in fatture::leggiFatture (this=0x96ec70) at fattura.cpp:657
      #18 0x00000000004363e9 in fatture::qt_metacall (this=0x96ec70, _c=QMetaObject::InvokeMetaMethod, _id=12,
          _a=0x7fffffffbbd0) at moc_fattura.cpp:113
      ---Type <return> to continue, or q <return> to quit---
      #19 0x00007ffff6b98b27 in QMetaObject::activate (sender=0x7f90b0, m=<value optimized out>,
          local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3280
      #20 0x00007ffff7468d45 in QDateTimeEdit::dateChanged (this=0x1210, _t1=<value optimized out>)
          at .moc/release-shared/moc_qdatetimeedit.cpp:254
      #21 0x00007ffff746f0e1 in QDateTimeEditPrivate::emitSignals (this=0x7fffffffbc00, ep=<value optimized out>,
          old=<value optimized out>) at widgets/qdatetimeedit.cpp:2120
      #22 0x00007ffff744929e in QAbstractSpinBoxPrivate::setValue (this=0x765640, val=<value optimized out>,
          ep=EmitIfChanged, doUpdate=<value optimized out>) at widgets/qabstractspinbox.cpp:1719
      #23 0x00007ffff744c865 in QAbstractSpinBoxPrivate::_q_editorTextChanged (this=0x765640, t=...)
          at widgets/qabstractspinbox.cpp:1487
      ---Type <return> to continue, or q <return> to quit---
      #24 0x00007ffff744c9ae in QAbstractSpinBox::qt_metacall (this=0x7f90b0, _c=QMetaObject::InvokeMetaMethod,
          _id=<value optimized out>, _a=0x7fffffffbf80) at .moc/release-shared/moc_qabstractspinbox.cpp:120
      #25 0x00007ffff7470495 in QDateTimeEdit::qt_metacall (this=0x1210, _c=4624, _id=6, _a=0xffffffffffffffff)
          at .moc/release-shared/moc_qdatetimeedit.cpp:154
      #26 0x00007ffff7470945 in QDateEdit::qt_metacall (this=0x1210, _c=4624, _id=6, _a=0xffffffffffffffff)
          at .moc/release-shared/moc_qdatetimeedit.cpp:389
      #27 0x00007ffff6b98b27 in QMetaObject::activate (sender=0x8b2300, m=<value optimized out>,
          local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3280
      #28 0x00007ffff749ae72 in QLineEdit::textChanged (this=0x1210, _t1=<value optimized out>)
          at .moc/release-shared/moc_qlineedit.cpp:242
      ---Type <return> to continue, or q <return> to quit---
      #29 0x00007ffff749e36c in QLineEdit::qt_metacall (this=0x8b2300, _c=QMetaObject::InvokeMetaMethod,
          _id=<value optimized out>, _a=0x7fffffffc130) at .moc/release-shared/moc_qlineedit.cpp:158
      #30 0x00007ffff6b98b27 in QMetaObject::activate (sender=0x8f1710, m=<value optimized out>,
          local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3280
      #31 0x00007ffff774c295 in QLineControl::textChanged (this=0x1210, _t1=<value optimized out>)
          at .moc/release-shared/moc_qlinecontrol_p.cpp:131
      #32 0x00007ffff74a4be6 in QLineControl::finishChange (this=0x8f1710, validateFromState=26,
          update=<value optimized out>, edited=true) at widgets/qlinecontrol.cpp:605
      #33 0x00007ffff74a65ff in QLineControl::processKeyEvent (this=0x8f1710, event=0x7fffffffcef0)
          at widgets/qlinecontrol.cpp:1787
      ---Type <return> to continue, or q <return> to quit---
      #34 0x00007ffff749b021 in QLineEdit::keyPressEvent (this=<value optimized out>, event=0x1210)
          at widgets/qlineedit.cpp:1665
      #35 0x00007ffff70c1cfa in QWidget::event (this=0x8b2300, event=0x7fffffffcef0) at kernel/qwidget.cpp:8222
      #36 0x00007ffff749c223 in QLineEdit::event (this=0x8b2300, e=0x7fffffffcef0) at widgets/qlineedit.cpp:1482
      #37 0x00007ffff744bd13 in QAbstractSpinBox::keyPressEvent (this=0x7f90b0, event=0x7fffffffcef0)
          at widgets/qabstractspinbox.cpp:1064
      #38 0x00007ffff746f7be in QDateTimeEdit::keyPressEvent (this=0x7f90b0, event=0x7fffffffcef0)
          at widgets/qdatetimeedit.cpp:1177
      #39 0x00007ffff70c1cfa in QWidget::event (this=0x7f90b0, event=0x7fffffffcef0) at kernel/qwidget.cpp:8222
      #40 0x00007ffff746e29d in QDateTimeEdit::event (this=0x7f90b0, event=0x7fffffffcef0)
      ---Type <return> to continue, or q <return> to quit---
          at widgets/qdatetimeedit.cpp:1039
      #41 0x00007ffff706bfdc in QApplicationPrivate::notify_helper (this=0x644480, receiver=0x7f90b0, e=0x7fffffffcef0)
          at kernel/qapplication.cpp:4396
      #42 0x00007ffff7073346 in QApplication::notify (this=<value optimized out>, receiver=0x7f90b0, e=0x7fffffffcef0)
          at kernel/qapplication.cpp:3857
      #43 0x00007ffff6b80cdc in QCoreApplication::notifyInternal (this=0x7fffffffe060, receiver=0x7f90b0,
          event=0x7fffffffcef0) at kernel/qcoreapplication.cpp:732
      #44 0x00007ffff71194ba in QKeyMapper::sendKeyEvent (keyWidget=0x7f90b0, grab=<value optimized out>,
          type=QEvent::KeyPress, code=49, modifiers=<value optimized out>, text=..., autorepeat=false, count=1,
          nativeScanCode=87, nativeVirtualKey=65457, nativeModifiers=16) at kernel/qkeymapper_x11.cpp:1867
      ---Type <return> to continue, or q <return> to quit---
      #45 0x00007ffff711bac0 in QKeyMapperPrivate::translateKeyEvent (this=0x69cf50, keyWidget=0x7f90b0,
          event=<value optimized out>, grab=16) at kernel/qkeymapper_x11.cpp:1837
      #46 0x00007ffff70f2cb4 in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fffffffdac0)
          at kernel/qapplication_x11.cpp:3429
      #47 0x00007ffff711f0e2 in x11EventSourceDispatch (s=0x649630, callback=<value optimized out>,
          user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
      #48 0x00007ffff536e342 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
      #49 0x00007ffff53722a8 in ?? () from /lib/libglib-2.0.so.0
      #50 0x00007ffff537245c in g_main_context_iteration () from /lib/libglib-2.0.so.0
      #51 0x00007ffff6bad193 in QEventDispatcherGlib::processEvents (this=0x645990, flags=<value optimized out>)
      ---Type <return> to continue, or q <return> to quit---
          at kernel/qeventdispatcher_glib.cpp:415
      #52 0x00007ffff711ea4e in QGuiEventDispatcherGlib::processEvents (this=0x1210, flags=<value optimized out>)
          at kernel/qguieventdispatcher_glib.cpp:204
      #53 0x00007ffff6b7fa02 in QEventLoop::processEvents (this=<value optimized out>, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece or DW_OP_bit_piece.
      )
          at kernel/qeventloop.cpp:149
      #54 0x00007ffff6b7fdec in QEventLoop::exec (this=0x7fffffffddf0, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece or DW_OP_bit_piece.
      ) at kernel/qeventloop.cpp:201
      #55 0x00007ffff6b83ebb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
      #56 0x000000000042835f in main (argc=1, argv=0x7fffffffe1f8) at main.cpp:43
      (gdb)
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              mabrand Mark Brand
              mondinmr Mondin Marco
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes