Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Dialog crashing when deployed
Qt 6.11 is out! See what's new in the release blog

Dialog crashing when deployed

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Dan3460D Offline
    Dan3460D Offline
    Dan3460
    wrote on last edited by Dan3460
    #1

    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?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Did you check that commodity is a valid pointer ?
      Are you sure the initialisation is done properly ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Dan3460D Offline
        Dan3460D Offline
        Dan3460
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Can you check what differs between the two implementation ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved