Unsolved Dialog crashing when deployed
-
I deployed an application but is crashing at one dialog that maintains a table on a database. The application runs on debug mode and
if i run on release mode but from the QT Creator. Correction it doesn't. This dialog is constructed in the same way that other 10 tables. Digging on the net i found a similar problem that suggested that a variable was being overrun, so i started to check if that was possible here and i did fund where the problem was occurring;QSqlQuery query; query.exec("select * from commodity"); while(query.next()) { ui->commodity->addItem(query.value(1).toString()); }
if i comment the ui->commodity->...... line the dialog run but the drop down menu is not filled up. This is the same construction that I have in the other tables and don't understand what could be different from any other table. The only thing different between this table and the others that i made is that when i created the UI by mistake i put a button instead of a drop down menu. After getting an error on the compile i changed the widget but kept the name.
Has anyone have similar problem? -
Hi,
Did you check that commodity is a valid pointer ?
Are you sure the initialisation is done properly ? -
Yes, i have another two tables that also uses the commodity table with exactly the same query to fill up the drop down menus and work perfectly.
-
Can you check what differs between the two implementation ?