Hi,
we provide a software for our customers that can show either a graph or a table with
the measured values at a specific time. When i have big data and switch to table view
our software crashed with the message:

Qt Code:
  1. In file ..\..\include/QtCore/../../src/corelib/tools/qvector.h, line 538: Out of memory
  2. Invalid parameter passed to C runtime function.
  3. Invalid parameter passed to C runtime function.
  4. exited with code 3
To copy to clipboard, switch view to plain text mode 

Our software crashes (Release) at around 1,8 GB memory usage (from Windows 7 task manager).

qvector.h (Qt 5.6.2)
Qt Code:
  1. template <typename T>
  2. void QVector<T>::reallocData(const int asize, const int aalloc, QArrayData::AllocationOptions options)
  3. {
  4. Q_ASSERT(asize >= 0 && asize <= aalloc);
  5. Data *x = d;
  6.  
  7. const bool isShared = d->ref.isShared();
  8.  
  9. if (aalloc != 0) {
  10. if (aalloc != int(d->alloc) || isShared) {
  11. QT_TRY {
  12. // allocate memory
  13. x = Data::allocate(aalloc, options);
  14. Q_CHECK_PTR(x); // THIS IS LINE 538
To copy to clipboard, switch view to plain text mode 

and this is the code to fill the table
Qt Code:
  1. for(int u=itemList.at(i)->idx;u<itemList.at(i)->mData->values.size();u++){
  2.  
  3. if(ui->tableWidget->rowCount() < u+1)
  4. ui->tableWidget->setRowCount(u+1);
  5.  
  6. QTableWidgetItem* itemt = new QTableWidgetItem(loc.toString(itemList.at(i)->mData->timestamps.at(u)));
  7. itemt->setTextColor(itemList.at(i)->color);
  8. ui->tableWidget->setItem(u,(i+1)*2-2,itemt);
  9.  
  10. QString tmp;
  11. if(itemList.at(i)->mData->errorFlag.length() > u){
  12. if(itemList.at(i)->mData->errorFlag.at(u) == 0){
  13.  
  14. tmp = loc.toString(itemList.at(i)->mData->values.at(u)*setManager->getPressureFactor());
  15. }
  16. else if(itemList.at(i)->mData->errorFlag.at(u) & errflgUR) // Error UR
  17. tmp = tr("Underrange");
  18. else if(itemList.at(i)->mData->errorFlag.at(u) & errflgOR) // Error OR
  19. tmp = tr("Overrange");
  20. else if(itemList.at(i)->mData->errorFlag.at(u) & errflgSEDIS ) // Error SEDIS
  21. tmp = tr("Sensor disabled");
  22. }
  23.  
  24. itemp->setTextColor(itemList.at(i)->color);
  25. ui->tableWidget->setItem(u,(i+1)*2-1,itemp);
  26.  
  27. itemList.at(i)->idx = u;
  28. }
To copy to clipboard, switch view to plain text mode 

Has someone any idea to improve our code or any other help is welcome?
HappyCoder