I know this is a typical error message, but I cannot find a solution in the other post I found on it.
I have the following code:
{
if(datos == NULL){
qDebug() << "NULL database";
return;
}
if(!datos->isOpen()){
qDebug() << "Failed to open the database";
return;
}
qDebug() << "step 1: " << s;
setWindowTitle(s);
qDebug() << "step 2";
ui->listWidget_estad->clear();
qDebug() << "step 3";
ui->listWidget_nombres->clear();
qDebug() << "step 4";
...
}
void Ligas::SetId(const QString s,QSqlDatabase *datos)
{
if(datos == NULL){
qDebug() << "NULL database";
return;
}
if(!datos->isOpen()){
qDebug() << "Failed to open the database";
return;
}
qDebug() << "step 1: " << s;
setWindowTitle(s);
qDebug() << "step 2";
ui->listWidget_estad->clear();
qDebug() << "step 3";
ui->listWidget_nombres->clear();
qDebug() << "step 4";
...
}
To copy to clipboard, switch view to plain text mode
I get to "Step 1" before the message error:
The inferior stopped because it received a signal from the Operating System.
Signal name : SIGSEGV
Signal meaning : Segmentation fault
If I delete setWindowTitle(s); I get the very same error after Step 2. So I am really confused. Can anybody help me?
The program used to work fine before adding new rows into the database.
Bookmarks