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. PyQt5 application segmentation fault in Linux but not Windows
QtWS25 Last Chance

PyQt5 application segmentation fault in Linux but not Windows

Scheduled Pinned Locked Moved Unsolved Qt for Python
5 Posts 4 Posters 662 Views
  • 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.
  • O Offline
    O Offline
    oarcelus
    wrote on last edited by
    #1

    Dear Forum,

    As said, I am experiencing a segmentation fault problem. It is quite bizarre. The PyQt5 application I developed works perfectly fine on Windows. However, when running on Debian I get a segmentation fault.

    Also, when running Debian on VirtualBox or WSL2 the actions that drive the segmentation fault are different. But reproducible in both cases.

    I cannot pinpoint the particular thing that makes the app break, particularly because it doesn't in Windows, so I guess there are no strange leaks, or so I think. What could be going wrong? I am lost at this point.

    Best regards,
    Oier.

    Axel SpoerlA 1 Reply Last reply
    0
    • O oarcelus

      Dear Forum,

      As said, I am experiencing a segmentation fault problem. It is quite bizarre. The PyQt5 application I developed works perfectly fine on Windows. However, when running on Debian I get a segmentation fault.

      Also, when running Debian on VirtualBox or WSL2 the actions that drive the segmentation fault are different. But reproducible in both cases.

      I cannot pinpoint the particular thing that makes the app break, particularly because it doesn't in Windows, so I guess there are no strange leaks, or so I think. What could be going wrong? I am lost at this point.

      Best regards,
      Oier.

      Axel SpoerlA Online
      Axel SpoerlA Online
      Axel Spoerl
      Moderators
      wrote on last edited by
      #2

      @oarcelus
      Can you post a little more about that segmentation fault? A stack trace perhaps?

      Software Engineer
      The Qt Company, Oslo

      1 Reply Last reply
      1
      • S Offline
        S Offline
        StarterKit
        wrote on last edited by
        #3

        Do you have something hardware related in your application? for example that uses Qt Multimedia?...
        I experienced crashes when I used camera on Windows while the same app on Linux worked fine - this was because Qt maps these things to platform specific implmentations that may behave differently...

        O 1 Reply Last reply
        0
        • S StarterKit

          Do you have something hardware related in your application? for example that uses Qt Multimedia?...
          I experienced crashes when I used camera on Windows while the same app on Linux worked fine - this was because Qt maps these things to platform specific implmentations that may behave differently...

          O Offline
          O Offline
          oarcelus
          wrote on last edited by
          #4

          @StarterKit Hi, I packaged my program using both WSL2 and VirtualBox, the program relies on some Fortran code that I also compiled using the latest intel compiler.

          When compiling everything in WSL2, the app fails at some point when including a QTableView in QLayout.

          When compiling the exact same software using the same fortran compilers for the dependencies in VirtualBox this problem dissapears. However there is another segmentation fault related to the execution of the fortran routines.

          Strangely enough, when packaging my WSL2 app on a .deb file and running it in VirtualBox, I again reproduce the fortran related errors of the VirtualBox installation, but the ones that were original from WSL dissapear.

          How could I create a stacktrace (following the previous answer)?

          jsulmJ 1 Reply Last reply
          0
          • O oarcelus

            @StarterKit Hi, I packaged my program using both WSL2 and VirtualBox, the program relies on some Fortran code that I also compiled using the latest intel compiler.

            When compiling everything in WSL2, the app fails at some point when including a QTableView in QLayout.

            When compiling the exact same software using the same fortran compilers for the dependencies in VirtualBox this problem dissapears. However there is another segmentation fault related to the execution of the fortran routines.

            Strangely enough, when packaging my WSL2 app on a .deb file and running it in VirtualBox, I again reproduce the fortran related errors of the VirtualBox installation, but the ones that were original from WSL dissapear.

            How could I create a stacktrace (following the previous answer)?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @oarcelus said in PyQt5 application segmentation fault in Linux but not Windows:

            How could I create a stacktrace (following the previous answer)?

            Just run your application in a debugger - as soon as it crashes debugger will show the stack trace

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1

            • Login

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