Solved Qt designer throwing "segmentation fault" errors
-
@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
-
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. -
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())
-
-
I am afraid PyQt is outside my area of expertise. Hopefully someone here will know... Good luck!
-
@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?
-
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.
-
@worldsnexthero
Given your change toLD_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.... -
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....?
-
@worldsnexthero
I believe you are saying you need to alterLD_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. -
that's right, this worked for me! thanks!