Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. My app crashes on the laptop and not on the desktop

My app crashes on the laptop and not on the desktop

Scheduled Pinned Locked Moved Unsolved Qt for Python
13 Posts 2 Posters 1.7k 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.
  • G Offline
    G Offline
    Gibser
    wrote on last edited by Gibser
    #1

    Hello everyone. I discovered that the application I'm writing using the Qt framework works perfectly on the desktop where I developed it but crashes on the laptop. In short:
    In the main window there is a QTabWidget which I use to switch screens based on the selected item. When I switch to the screen where I use a 3d window enclosed in a QWidget the gui freezes on this screen and, even clicking on the other elements of the QTabWidget, the GUI stays on that view. If I click on a particular item, the app stops responding. If I replace the QWidget that encloses the 3d window with a simple QWidget there is no problem. Obviously without the code I'm not very helpful in looking for a possible solution, but can you think of anything that can help me?

    self.view = Qt3DWindow()
    .
    .
    .
    self.centralWidget = QWidget.createWindowContainer(self.view) #If I replace with QWidget () it works
    
    

    This is the function I call when I click an element of the QTabWidget

        def tabChanged(self):
            print(self.tab_holder.currentIndex())
            if self.tab_holder.currentIndex() == 1:
                self.segmentationTab.setContents()
            elif self.tab_holder.currentIndex() == 2:
                self.labelingTab.setFocus()
                self.labelingTab.setContents()
            elif self.tab_holder.currentIndex() == 3:
                self.reconstructionTab.setContents()
            else:
                pass
    

    This is setScene of ReconstructionWidget, which is the widget creates problems if I select it

    def setContents(self):
           print('Okay')
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Which version of Qt are you using ?
      Which OS ?
      Which graphics driver ?

      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
      • G Offline
        G Offline
        Gibser
        wrote on last edited by
        #3

        Hello, I'm using PyQt 5.15.2 and PyQt3D 5.15.2 on Windows 10 (Both machines).
        I have an amd card on the desktop where I don't have this problem and an nvidia gtx1050ti on the laptop where it happens.

        Nvidia driver version: 457.51

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

          How did you install these packages ?

          You might also want to check if your drivers are the latest and if so, downgrade to test if they introduced a bug.

          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
          1
          • G Offline
            G Offline
            Gibser
            wrote on last edited by
            #5

            I installed the packages via pip. However, creating a standalone executable with cxfreeze is also the same. I also confirm that the same happens on my friend's laptop, so at the moment it doesn't happen only on my desktop pc

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

              Then you should check with the drivers.
              Does your friend laptop have the same specs as yours ?

              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
              • G Offline
                G Offline
                Gibser
                wrote on last edited by
                #7

                No, it has different hardware, but the video card is nvidia (949mx). At this point I'm wondering, will it be some library that I don't have on the laptop and cxfreeze didn't pack? How can I check, and if so, package the whole application correctly?

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

                  The hardcore way would be to setup a minimal Python environment on one of these laptops to check that.

                  By crash do you mean it does not start at all ?

                  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
                  • G Offline
                    G Offline
                    Gibser
                    wrote on last edited by
                    #9

                    It starts up, and I can browse widgets that don't have a Qt3DWindow. If I select ReconstructionWidget, which has this type of window, the GUI stays stuck on the same point if I select other widgets . However I can interact with the elements of the other widgets, I just don't see them because they are covered by the one with the 3d window. I can't even see the button animations, for example when I hover the mouse over them. Also, selecting the SegmentationWidget the app stops responding and I am forced to close. There are no errors in the terminal.

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

                      Right, sorry, you wrote that in your initial post...

                      I would go with setting up a Python environment to check if it's working there.

                      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
                      1
                      • G Offline
                        G Offline
                        Gibser
                        wrote on last edited by
                        #11

                        No problem, thanks for your time!
                        So I set up a new python environment. Do I install the packages gradually?

                        1 Reply Last reply
                        0
                        • G Offline
                          G Offline
                          Gibser
                          wrote on last edited by Gibser
                          #12

                          I have implemented a basic app with a 3d window and a torus mesh, it works fine.
                          In the old app, I found that everything works if I comment

                          self.view.setRootEntity(self.rootEntity)
                          

                          where self.rootEntity is a QEntity()

                          UPDATE:
                          It doesn't give problems when I set the root entity, but when I insert mesh, transform and material to a torus entity created as follows:

                          self.material = QPhongMaterial(self.rootEntity)
                          self.torusEntity = QEntity(self.rootEntity)
                          self.torusMesh = QTorusMesh()
                          self.torusMesh.setRadius(5)
                          self.torusMesh.setMinorRadius(1)
                          self.torusMesh.setRings(100)
                          self.torusMesh.setSlices(20)
                          
                          self.torusTransform = QTransform()
                          self.torusTransform.setScale3D(QVector3D(1.0, 1.0, 1.0))
                          self.torusTransform.setRotation(QQuaternion.fromAxisAndAngle(QVector3D(1, 0, 0), 45))
                          
                          self.torusEntity.addComponent(self.torusMesh)         # <-----   Problems from here
                          self.torusEntity.addComponent(self.torusTransform)
                          self.torusEntity.addComponent(self.material)
                          
                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #13

                            Can you provide a minimal runnable script that triggers this ?

                            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