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. Qt designer throwing "segmentation fault" errors
QtWS25 Last Chance

Qt designer throwing "segmentation fault" errors

Scheduled Pinned Locked Moved Solved Installation and Deployment
13 Posts 4 Posters 2.7k 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.
  • W Offline
    W Offline
    worldsnexthero
    wrote on last edited by
    #1

    Qt designer opening up okay however whenever we load an already saved .ui file or "create" new one, Qt designer crashes. In picture below you can see the "Create" button im referring to qtdesigner.PNG

    Also in terminal it provides following errors:

    qt.qpa.xcb: failed to initialize XRandr
    qt.qpa.xcb: X server does not support XInput 2
    qt.qpa.xcb: QXcbConnection: XCB error: 1 (BadRequest), sequence: 169, resource id: 53, major code: 131 (Unknown), minor code: 47
    Segmentation fault
    
    
    jsulmJ 1 Reply Last reply
    0
    • W worldsnexthero

      you're right, i have libraries in both PyQt site-packages and in /usr/lib/x86_linux_gnu OS area. how to have designer and PyQt select correct path? i was thinking keep the LD_LIBRARY_PATH to OS location at all times and for PyQt since there are python scripts, I can change LIBRARY PATH location within scripts....?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #12

      @worldsnexthero
      I believe you are saying you need to alter LD_LIBRARY_PATH when running your Python script only. Do not do so when running Creator/Designer.

      If you run your script from a shell you can do export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/localhome/lab/FaizanEnv/lib/python3.7/site-packages/PyQt5/Qt/lib there only and then run your Python. Or, you can put in a shell script which runs your Python. Or if you execute your app from Qt Creator there is a "Runtime variables" for the project where you can set it.

      1 Reply Last reply
      0
      • W worldsnexthero

        Qt designer opening up okay however whenever we load an already saved .ui file or "create" new one, Qt designer crashes. In picture below you can see the "Create" button im referring to qtdesigner.PNG

        Also in terminal it provides following errors:

        qt.qpa.xcb: failed to initialize XRandr
        qt.qpa.xcb: X server does not support XInput 2
        qt.qpa.xcb: QXcbConnection: XCB error: 1 (BadRequest), sequence: 169, resource id: 53, major code: 131 (Unknown), minor code: 47
        Segmentation fault
        
        
        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @worldsnexthero What is the OS?
        What are Qt and QtCreator versions?
        You can try to start QtCreator without plug-ins to see whether this makes a difference (often plug-ins cause crashes): call qtcreator with -load all parameter (see https://doc.qt.io/qtcreator/creator-cli.html).

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

        1 Reply Last reply
        0
        • W Offline
          W Offline
          worldsnexthero
          wrote on last edited by
          #3

          the OS is debian8

          i've never started "qtcreator" unsure if i can still use "-load all" parameter. instead, i usually invoke the "designer" by command:

          /usr/lib/x86_64-linux-gnu/qt5/bin/designer
          

          this is what i get when i type "qtcreator -version" (see error at end):

          qtcreator -version
          qt.qpa.xcb: failed to initialize XRandr
          qt.qpa.xcb: X server does not support XInput 2
          
          Qt Creator 3.2.1 based on Qt 5.15.1
          
            AnalyzerBase 3.2.1 Code Analyzer Base Plugin
            Android 3.2.1 Support for deployment to and execution on Android Devices
            AutotoolsProjectManager 3.2.1 Autotools project integration.
            BareMetal 3.2.1 This plugin adds a target for bare metal development.
            Bazaar 3.2.1 Bazaar integration.
            Beautifier 3.2.1 Format source files with the help of beautifiers like AStyle, uncrustify or clang-format.
            BinEditor 3.2.1 Binary editor component.
            Bookmarks 3.2.1 Bookmarks in text editors.
            CMakeProjectManager 3.2.1 CMake support
            CVS 3.2.1 CVS integration.
            ClassView 3.2.1 Class View component.
            ClearCase 3.2.1 ClearCase integration.
            CodePaster 3.2.1 Codepaster plugin for pushing/fetching diff from server
            Core 3.2.1 The core plugin for the Qt IDE.
            CppEditor 3.2.1 C/C++ editor component.
            CppTools 3.2.1 Tools for analyzing C/C++ code.
            Debugger 3.2.1 Debugger integration.
            Designer 3.2.1 Qt Designer integration.
            DiffEditor 3.2.1 Diff editor component.
            EmacsKeys 3.2.1 The main idea behind this plugin is to provide additional actions a typical emacs user would expect. It doesn't claim to provide full emacs emulation. The following actions are available:
           - Movement [C-f, C-b, C-n, C-p, M-f, M-b, C-a, C-e, M-<, M->]
           - Mark-based selection [C-SPC, C-x C-x]
           - Cut/copy/yank (doesn't provide kill ring feature) [M-w, C-w, C-y]
           - Kill actions, which interact properly with clipboard [C-k, M-d, C-d]
           - Scrolling (half of the screen, keeps cursor visible) [C-v, M-v]
           - Insert new line and indent [C-j]
          
          IMPORTANT: Actions are not bound to any key combinations by default. You can find them under 'EmacsKeys' section in keyboard shortcuts settings.
          
          Also it's worth mentioning that EmacsKeys plugin forces disabling of menu mnemonics by calling Qt's qt_set_sequence_auto_mnemonic function with false argument. Many of the english menu mnemonics get into the way of typical emacs keys, this includes: Alt+F (File), Alt+B (Build), Alt+W (Window). It's a temporary solution, it remains until there is a better one.
            FakeVim 3.2.1 VI-style keyboard navigation.
            GLSLEditor 3.2.1 Editor for GLSL.
            GenericProjectManager 3.2.1 Generic support
            Git 3.2.1 Git integration.
            Help 3.2.1 Help system.
            ImageViewer 3.2.1 Image Viewer component.
            Ios 3.2.1 Support for deployment to and execution on iOS Devices
            Macros 3.2.1 Macros in text editors.
            Mercurial 3.2.1 Mercurial integration.
            Perforce 3.2.1 Perforce integration.
            ProjectExplorer 3.2.1 ProjectExplorer framework that can be extended with different kind of project types.
            PythonEditor 3.2.1 Editor and file creation wizards for Python. Example plugin for QtCreator API demonstration.
            QbsProjectManager 3.2.1 QBS support
            QmakeProjectManager 3.2.1 Provides project type for Qt/QMake .pro files and tools.
            QmlDesigner 3.2.1 Visual Designer for QML files.
            QmlJSEditor 3.2.1 Editor for QML and JavaScript.
            QmlJSTools 3.2.1 Tools for analyzing Qml/JS code.
            QmlProfiler 3.2.1 Qml Profiler Plugin
            QmlProjectManager 3.2.1 Qt Quick support
            Qnx 3.2.1 Adds support for QNX and BlackBerry 10 to Qt Creator
            QtSupport 3.2.1 Provides support code for build systems.
            RemoteLinux 3.2.1 Support for deployment to and execution on a remote Linux host.
            ResourceEditor 3.2.1 Editor for qrc files.
            Subversion 3.2.1 Subversion integration.
            TaskList 3.2.1 Use .tasks-files to populate the Issues view.
            TextEditor 3.2.1 Text editor framework and the implementation of the basic text editor.
            Todo 3.2.1 Adds pane that lists all TODO, FIXME, etc. entries in comments.
            Valgrind 3.2.1 Valgrind Plugin
            VcsBase 3.2.1 Version Control System Base Plugin
            Welcome 3.2.1 Default Welcome Screen Plugin
            WinRt 3.2.1 Helper for Windows Runtime projects
          
          (C) 2014 Digia Plc
          
          qtcreator: relocation error: /usr/local/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so: symbol xkb_compose_state_unref, version V_0.5.0 not defined in file libxkbcommon.so.0 with link time reference
          
          
          jsulmJ 1 Reply Last reply
          0
          • W worldsnexthero

            the OS is debian8

            i've never started "qtcreator" unsure if i can still use "-load all" parameter. instead, i usually invoke the "designer" by command:

            /usr/lib/x86_64-linux-gnu/qt5/bin/designer
            

            this is what i get when i type "qtcreator -version" (see error at end):

            qtcreator -version
            qt.qpa.xcb: failed to initialize XRandr
            qt.qpa.xcb: X server does not support XInput 2
            
            Qt Creator 3.2.1 based on Qt 5.15.1
            
              AnalyzerBase 3.2.1 Code Analyzer Base Plugin
              Android 3.2.1 Support for deployment to and execution on Android Devices
              AutotoolsProjectManager 3.2.1 Autotools project integration.
              BareMetal 3.2.1 This plugin adds a target for bare metal development.
              Bazaar 3.2.1 Bazaar integration.
              Beautifier 3.2.1 Format source files with the help of beautifiers like AStyle, uncrustify or clang-format.
              BinEditor 3.2.1 Binary editor component.
              Bookmarks 3.2.1 Bookmarks in text editors.
              CMakeProjectManager 3.2.1 CMake support
              CVS 3.2.1 CVS integration.
              ClassView 3.2.1 Class View component.
              ClearCase 3.2.1 ClearCase integration.
              CodePaster 3.2.1 Codepaster plugin for pushing/fetching diff from server
              Core 3.2.1 The core plugin for the Qt IDE.
              CppEditor 3.2.1 C/C++ editor component.
              CppTools 3.2.1 Tools for analyzing C/C++ code.
              Debugger 3.2.1 Debugger integration.
              Designer 3.2.1 Qt Designer integration.
              DiffEditor 3.2.1 Diff editor component.
              EmacsKeys 3.2.1 The main idea behind this plugin is to provide additional actions a typical emacs user would expect. It doesn't claim to provide full emacs emulation. The following actions are available:
             - Movement [C-f, C-b, C-n, C-p, M-f, M-b, C-a, C-e, M-<, M->]
             - Mark-based selection [C-SPC, C-x C-x]
             - Cut/copy/yank (doesn't provide kill ring feature) [M-w, C-w, C-y]
             - Kill actions, which interact properly with clipboard [C-k, M-d, C-d]
             - Scrolling (half of the screen, keeps cursor visible) [C-v, M-v]
             - Insert new line and indent [C-j]
            
            IMPORTANT: Actions are not bound to any key combinations by default. You can find them under 'EmacsKeys' section in keyboard shortcuts settings.
            
            Also it's worth mentioning that EmacsKeys plugin forces disabling of menu mnemonics by calling Qt's qt_set_sequence_auto_mnemonic function with false argument. Many of the english menu mnemonics get into the way of typical emacs keys, this includes: Alt+F (File), Alt+B (Build), Alt+W (Window). It's a temporary solution, it remains until there is a better one.
              FakeVim 3.2.1 VI-style keyboard navigation.
              GLSLEditor 3.2.1 Editor for GLSL.
              GenericProjectManager 3.2.1 Generic support
              Git 3.2.1 Git integration.
              Help 3.2.1 Help system.
              ImageViewer 3.2.1 Image Viewer component.
              Ios 3.2.1 Support for deployment to and execution on iOS Devices
              Macros 3.2.1 Macros in text editors.
              Mercurial 3.2.1 Mercurial integration.
              Perforce 3.2.1 Perforce integration.
              ProjectExplorer 3.2.1 ProjectExplorer framework that can be extended with different kind of project types.
              PythonEditor 3.2.1 Editor and file creation wizards for Python. Example plugin for QtCreator API demonstration.
              QbsProjectManager 3.2.1 QBS support
              QmakeProjectManager 3.2.1 Provides project type for Qt/QMake .pro files and tools.
              QmlDesigner 3.2.1 Visual Designer for QML files.
              QmlJSEditor 3.2.1 Editor for QML and JavaScript.
              QmlJSTools 3.2.1 Tools for analyzing Qml/JS code.
              QmlProfiler 3.2.1 Qml Profiler Plugin
              QmlProjectManager 3.2.1 Qt Quick support
              Qnx 3.2.1 Adds support for QNX and BlackBerry 10 to Qt Creator
              QtSupport 3.2.1 Provides support code for build systems.
              RemoteLinux 3.2.1 Support for deployment to and execution on a remote Linux host.
              ResourceEditor 3.2.1 Editor for qrc files.
              Subversion 3.2.1 Subversion integration.
              TaskList 3.2.1 Use .tasks-files to populate the Issues view.
              TextEditor 3.2.1 Text editor framework and the implementation of the basic text editor.
              Todo 3.2.1 Adds pane that lists all TODO, FIXME, etc. entries in comments.
              Valgrind 3.2.1 Valgrind Plugin
              VcsBase 3.2.1 Version Control System Base Plugin
              Welcome 3.2.1 Default Welcome Screen Plugin
              WinRt 3.2.1 Helper for Windows Runtime projects
            
            (C) 2014 Digia Plc
            
            qtcreator: relocation error: /usr/local/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so: symbol xkb_compose_state_unref, version V_0.5.0 not defined in file libxkbcommon.so.0 with link time reference
            
            
            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @worldsnexthero said in Qt designer throwing "segmentation fault" errors:

            unsure if i can still use "-load all" parameter

            I don't know either, but you can simply try

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

            1 Reply Last reply
            0
            • artwawA Offline
              artwawA Offline
              artwaw
              wrote on last edited by artwaw
              #5

              Another thing might be, that you need to update Debian. V8 is a bit... dated.
              More to the point, last line of the message you've included says that something is missing in libxkbcommon.so.0 - so different (possibly updated?) version would be needed.

              For more information please re-read.

              Kind Regards,
              Artur

              1 Reply Last reply
              2
              • W Offline
                W Offline
                worldsnexthero
                wrote on last edited by worldsnexthero
                #6

                what i found interesting is that if i have LD_LIBRARY_PATH defined as follows:

                export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/localhome/lab/FaizanEnv/lib/python3.7/site-packages/PyQt5/Qt/lib
                
                
                • designer works with no "segmentation error"

                • however, python script to call GUI does not work with error:

                    * ImportError: /localhome/lab/FaizanEnv/lib/python3.7/site-packages/PyQt5/QtWidgets.abi3.so: symbol _ZNK13QOpenGLWidget10redirectedEP6QPoint, version Qt_5 not defined in file libQt5Widgets.so.5 with link time reference
                  

                if i switch the LD_LIBRARY_PATH paths as follows:

                export LD_LIBRARY_PATH=/localhome/lab/FaizanEnv/lib/python3.7/site-packages/PyQt5/Qt/lib:/usr/lib/x86_64-linux-gnu
                
                • then designer does not work with mentioned "segmentation error"

                • however, python script to call GUI works

                i installed all my packaged based on this reference

                for reference, here is my python script:

                 2 import sys
                  3 from PyQt5.QtWidgets import QApplication, QWidget
                  4 from PyQt5.QtGui import QIcon
                  5 
                  6 from PyQt5 import QtWidgets, uic
                  7 from PyQt5.QtWidgets import QMessageBox
                  8 import sys
                  9 
                 10 class Example(QtWidgets.QMainWindow):
                 11     def __init__(self):
                 12         super(Example, self).__init__()
                 13         uic.loadUi('PhyAccess.ui', self)
                 14 
                 15 app = QtWidgets.QApplication([])
                 16 win = Example()
                 17 win.show()
                 18 sys.exit(app.exec())
                
                
                jsulmJ JonBJ 2 Replies Last reply
                0
                • artwawA Offline
                  artwawA Offline
                  artwaw
                  wrote on last edited by
                  #7

                  I am afraid PyQt is outside my area of expertise. Hopefully someone here will know... Good luck!

                  For more information please re-read.

                  Kind Regards,
                  Artur

                  1 Reply Last reply
                  0
                  • W worldsnexthero

                    what i found interesting is that if i have LD_LIBRARY_PATH defined as follows:

                    export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/localhome/lab/FaizanEnv/lib/python3.7/site-packages/PyQt5/Qt/lib
                    
                    
                    • designer works with no "segmentation error"

                    • however, python script to call GUI does not work with error:

                        * ImportError: /localhome/lab/FaizanEnv/lib/python3.7/site-packages/PyQt5/QtWidgets.abi3.so: symbol _ZNK13QOpenGLWidget10redirectedEP6QPoint, version Qt_5 not defined in file libQt5Widgets.so.5 with link time reference
                      

                    if i switch the LD_LIBRARY_PATH paths as follows:

                    export LD_LIBRARY_PATH=/localhome/lab/FaizanEnv/lib/python3.7/site-packages/PyQt5/Qt/lib:/usr/lib/x86_64-linux-gnu
                    
                    • then designer does not work with mentioned "segmentation error"

                    • however, python script to call GUI works

                    i installed all my packaged based on this reference

                    for reference, here is my python script:

                     2 import sys
                      3 from PyQt5.QtWidgets import QApplication, QWidget
                      4 from PyQt5.QtGui import QIcon
                      5 
                      6 from PyQt5 import QtWidgets, uic
                      7 from PyQt5.QtWidgets import QMessageBox
                      8 import sys
                      9 
                     10 class Example(QtWidgets.QMainWindow):
                     11     def __init__(self):
                     12         super(Example, self).__init__()
                     13         uic.loadUi('PhyAccess.ui', self)
                     14 
                     15 app = QtWidgets.QApplication([])
                     16 win = Example()
                     17 win.show()
                     18 sys.exit(app.exec())
                    
                    
                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #8

                    @worldsnexthero How does your LD_LIBRARY_PATH look like if you do not change it? I don't use PyQt, does your PyQt installation contain its own version of the Designer? If so, does that one work?

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

                    1 Reply Last reply
                    0
                    • W Offline
                      W Offline
                      worldsnexthero
                      wrote on last edited by
                      #9

                      It does not ( I cannot find designer in PyQt5 directory structure) so I'm still unsure why changing the order in the LD_LIBRARY_PATH causes this issue...

                      Still debugging.

                      1 Reply Last reply
                      0
                      • W worldsnexthero

                        what i found interesting is that if i have LD_LIBRARY_PATH defined as follows:

                        export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/localhome/lab/FaizanEnv/lib/python3.7/site-packages/PyQt5/Qt/lib
                        
                        
                        • designer works with no "segmentation error"

                        • however, python script to call GUI does not work with error:

                            * ImportError: /localhome/lab/FaizanEnv/lib/python3.7/site-packages/PyQt5/QtWidgets.abi3.so: symbol _ZNK13QOpenGLWidget10redirectedEP6QPoint, version Qt_5 not defined in file libQt5Widgets.so.5 with link time reference
                          

                        if i switch the LD_LIBRARY_PATH paths as follows:

                        export LD_LIBRARY_PATH=/localhome/lab/FaizanEnv/lib/python3.7/site-packages/PyQt5/Qt/lib:/usr/lib/x86_64-linux-gnu
                        
                        • then designer does not work with mentioned "segmentation error"

                        • however, python script to call GUI works

                        i installed all my packaged based on this reference

                        for reference, here is my python script:

                         2 import sys
                          3 from PyQt5.QtWidgets import QApplication, QWidget
                          4 from PyQt5.QtGui import QIcon
                          5 
                          6 from PyQt5 import QtWidgets, uic
                          7 from PyQt5.QtWidgets import QMessageBox
                          8 import sys
                          9 
                         10 class Example(QtWidgets.QMainWindow):
                         11     def __init__(self):
                         12         super(Example, self).__init__()
                         13         uic.loadUi('PhyAccess.ui', self)
                         14 
                         15 app = QtWidgets.QApplication([])
                         16 win = Example()
                         17 win.show()
                         18 sys.exit(app.exec())
                        
                        
                        JonBJ Offline
                        JonBJ Offline
                        JonB
                        wrote on last edited by
                        #10

                        @worldsnexthero
                        Given your change to LD_LIBRARY_PATH makes one of Creator/your application work/not work.

                        Both your application and Qt Designer use Qt. It is not required that they use the same versions of Qt. But each must be "consistent".

                        You seem to be changing LD_LIBRARY_PATH before yo run Creator/Designer. Why? If you are only wanting to change it for your running application, you should not change it for Creator/Designer, only, say, inside so that it affects only your running application.

                        When I go

                        ls -l `locate -b '\\libQt5Widgets.so.5'`
                        

                        it gives me multiple hits, inside & outside the ~/.local/lib/python3... area, and they are different dated files/versions. So the one in your Python's site packages is not the same as the one in the OS area. I imagine this is the cause of them problem. Your Python app may want to run the version which comes with PyQt5, but Qt Creator/Designer will not....

                        1 Reply Last reply
                        0
                        • W Offline
                          W Offline
                          worldsnexthero
                          wrote on last edited by
                          #11

                          you're right, i have libraries in both PyQt site-packages and in /usr/lib/x86_linux_gnu OS area. how to have designer and PyQt select correct path? i was thinking keep the LD_LIBRARY_PATH to OS location at all times and for PyQt since there are python scripts, I can change LIBRARY PATH location within scripts....?

                          JonBJ 1 Reply Last reply
                          0
                          • W worldsnexthero

                            you're right, i have libraries in both PyQt site-packages and in /usr/lib/x86_linux_gnu OS area. how to have designer and PyQt select correct path? i was thinking keep the LD_LIBRARY_PATH to OS location at all times and for PyQt since there are python scripts, I can change LIBRARY PATH location within scripts....?

                            JonBJ Offline
                            JonBJ Offline
                            JonB
                            wrote on last edited by
                            #12

                            @worldsnexthero
                            I believe you are saying you need to alter LD_LIBRARY_PATH when running your Python script only. Do not do so when running Creator/Designer.

                            If you run your script from a shell you can do export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/localhome/lab/FaizanEnv/lib/python3.7/site-packages/PyQt5/Qt/lib there only and then run your Python. Or, you can put in a shell script which runs your Python. Or if you execute your app from Qt Creator there is a "Runtime variables" for the project where you can set it.

                            1 Reply Last reply
                            0
                            • W Offline
                              W Offline
                              worldsnexthero
                              wrote on last edited by
                              #13

                              that's right, this worked for me! thanks!

                              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