Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cura 2.3.1-2 segfault on startup in libQt5Gui #1393

Closed
FirefighterBlu3 opened this issue Jan 31, 2017 · 10 comments
Closed

cura 2.3.1-2 segfault on startup in libQt5Gui #1393

FirefighterBlu3 opened this issue Jan 31, 2017 · 10 comments

Comments

@FirefighterBlu3
Copy link

Arch Linux, cura built from AUR after complete removal from system including user cache and config. dependencies also rebuilt.

[david@Scott ~]$ pb -Qi cura
Name            : cura
Version         : 2.3.1-2
Description     : A software solution for 3D printing aimed at RepRaps and the Ultimaker.
Architecture    : x86_64
URL             : https://ultimaker.com/en/products/cura-software
Licenses        : AGPLv3
Groups          : None
Provides        : cura
Depends On      : qt5-svg  python-scipy  python-pyserial  python-numpy  uranium  curaengine  cura-binary-data
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 27.41 MiB
Packager        : Unknown Packager
Build Date      : Tue 31 Jan 2017 05:07:30 AM EST
Install Date    : Tue 31 Jan 2017 05:08:08 AM EST
Install Reason  : Explicitly installed
Install Script  : Yes
Validated By    : None
[david@Scott ~]$ pb -Qi python cura curaengine cura-binary-data uranium python-pyqt5 |awk '/Name|Version/ {print $0}'
Name            : python
Version         : 3.6.0-2
Name            : cura
Version         : 2.3.1-2
Name            : curaengine
Version         : 2.3.1-1
Name            : cura-binary-data
Version         : 2.3.1-2
Name            : uranium
Version         : 2.3.1-1
Name            : python-pyqt5
Version         : 5.7.1-3
[david@Scott ~]$ cura 
2017-01-31 05:19:26,512 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin ConsoleLogger
2017-01-31 05:19:26,536 - INFO - /usr/lib/cura/plugins/CuraEngineBackend/CuraEngineBackend.py (__init__ [40]): Found CuraEngine at: /usr/bin/CuraEngine
2017-01-31 05:19:26,537 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin CuraEngineBackend
2017-01-31 05:19:26,577 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin UpdateChecker
2017-01-31 05:19:26,577 - INFO - /usr/lib/uranium/plugins/UpdateChecker/UpdateChecker.py (run [28]): Checking for new version of cura
2017-01-31 05:19:26,584 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin LocalFileOutputDevice
2017-01-31 05:19:26,584 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin ConsoleLogger was already loaded
2017-01-31 05:19:26,587 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin SimpleView
2017-01-31 05:19:26,589 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin WireframeView
2017-01-31 05:19:26,591 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin FileLogger
2017-01-31 05:19:26,596 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin MirrorTool
2017-01-31 05:19:26,602 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin TranslateTool
2017-01-31 05:19:26,605 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin SelectionTool
2017-01-31 05:19:26,608 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin CameraTool
2017-01-31 05:19:26,616 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin ScaleTool
2017-01-31 05:19:26,625 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin RotateTool
2017-01-31 05:19:26,632 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin 3MFWriter
2017-01-31 05:19:26,635 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin STLWriter
2017-01-31 05:19:26,640 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin STLReader
2017-01-31 05:19:26,643 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin OBJReader
2017-01-31 05:19:26,645 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin OBJWriter
2017-01-31 05:19:26,660 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin XmlMaterialProfile
2017-01-31 05:19:26,663 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin LegacyProfileReader
2017-01-31 05:19:26,663 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin UpdateChecker was already loaded
2017-01-31 05:19:26,663 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin LocalFileOutputDevice was already loaded
2017-01-31 05:19:26,665 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin CuraProfileWriter
2017-01-31 05:19:26,668 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin SolidView
2017-01-31 05:19:26,668 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin ConsoleLogger was already loaded
2017-01-31 05:19:26,669 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin SimpleView was already loaded
2017-01-31 05:19:26,669 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin WireframeView was already loaded
2017-01-31 05:19:26,675 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin VersionUpgrade21to22
2017-01-31 05:19:26,677 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin CuraProfileReader
2017-01-31 05:19:26,682 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin RemovableDriveOutputDevice
2017-01-31 05:19:26,685 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin GCodeProfileReader
2017-01-31 05:19:26,686 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin FileLogger was already loaded
2017-01-31 05:19:26,686 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin MirrorTool was already loaded
2017-01-31 05:19:26,686 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin TranslateTool was already loaded
2017-01-31 05:19:26,686 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin SelectionTool was already loaded
2017-01-31 05:19:26,686 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin CameraTool was already loaded
2017-01-31 05:19:26,686 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin ScaleTool was already loaded
2017-01-31 05:19:26,686 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin RotateTool was already loaded
2017-01-31 05:19:26,700 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin USBPrinting
2017-01-31 05:19:26,704 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin ChangeLogPlugin
2017-01-31 05:19:26,704 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin 3MFWriter was already loaded
2017-01-31 05:19:26,704 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin STLWriter was already loaded
2017-01-31 05:19:26,704 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin STLReader was already loaded
2017-01-31 05:19:26,705 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin OBJReader was already loaded
2017-01-31 05:19:26,705 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin OBJWriter was already loaded
2017-01-31 05:19:26,719 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin XRayView
2017-01-31 05:19:26,721 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin GCodeWriter
2017-01-31 05:19:26,727 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin UltimakerMachineActions
2017-01-31 05:19:26,734 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin X3DReader
2017-01-31 05:19:26,737 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin 3MFReader
2017-01-31 05:19:26,740 - WARNING - .../site-packages/UM/Preferences.py (getValue [70]): Tried to get the value of non-existing setting cura/active_mode.
2017-01-31 05:19:26,740 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin PerObjectSettingsTool
2017-01-31 05:19:26,742 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin MachineSettingsAction
2017-01-31 05:19:26,742 - WARNING - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Plugin CuraEngineBackend was already loaded
2017-01-31 05:19:26,744 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin AutoSave
2017-01-31 05:19:26,748 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin ImageReader
2017-01-31 05:19:26,753 - INFO - .../site-packages/UM/PluginRegistry.py (loadPlugin [63]): Loaded plugin LayerView
2017-01-31 05:19:26,754 - INFO - .../site-packages/UM/Qt/QtApplication.py (__init__ [39]): Command line arguments: {'external-backend': False, 'disable-textures': False, 'file': [], 'debug-mode': False}
2017-01-31 05:19:26,756 - INFO - .../site-packages/UM/VersionUpgradeManager.py (upgrade [98]): Looking for old configuration files to upgrade.
2017-01-31 05:19:27,049 - DEBUG - .../site-packages/UM/Backend/Backend.py (_onSocketError [190]): Socket was unable to bind to port, increasing port number to 49675
2017-01-31 05:19:27,149 - DEBUG - .../site-packages/UM/Backend/Backend.py (_createSocket [206]): Previous socket existed. Closing that first.
2017-01-31 05:19:27,151 - DEBUG - /usr/lib/cura/plugins/CuraEngineBackend/CuraEngineBackend.py (_terminate [186]): Attempting to kill the engine process
2017-01-31 05:19:27,151 - DEBUG - .../site-packages/UM/Backend/Backend.py (_createSocket [206]): Previous socket existed. Closing that first.
2017-01-31 05:19:27,157 - DEBUG - .../site-packages/UM/Backend/Backend.py (_onSocketError [190]): Socket was unable to bind to port, increasing port number to 49676
2017-01-31 05:19:27,257 - DEBUG - .../site-packages/UM/Backend/Backend.py (_createSocket [206]): Previous socket existed. Closing that first.
2017-01-31 05:19:27,259 - DEBUG - /usr/lib/cura/plugins/CuraEngineBackend/CuraEngineBackend.py (_terminate [186]): Attempting to kill the engine process
2017-01-31 05:19:27,260 - DEBUG - .../site-packages/UM/Backend/Backend.py (_createSocket [206]): Previous socket existed. Closing that first.
2017-01-31 05:19:27,377 - DEBUG - /usr/lib/cura/plugins/MachineSettingsAction/MachineSettingsAction.py (_onContainerAdded [40]): Not attaching MachineSettingsAction to ultimaker_original_dual; Multi-extrusion printers are not supported
2017-01-31 05:19:27,413 - WARNING - .../site-packages/cura/MachineActionManager.py (addSupportedAction [68]): Unable to add DiscoverUM3Action to ultimaker3_extended, as the action is not recognised
2017-01-31 05:19:27,414 - WARNING - .../site-packages/cura/MachineActionManager.py (addFirstStartAction [79]): Unable to add DiscoverUM3Action to ultimaker3_extended, as the action is not recognised
2017-01-31 05:19:27,414 - DEBUG - /usr/lib/cura/plugins/MachineSettingsAction/MachineSettingsAction.py (_onContainerAdded [40]): Not attaching MachineSettingsAction to ultimaker3_extended; Multi-extrusion printers are not supported
2017-01-31 05:19:27,471 - DEBUG - /usr/lib/cura/plugins/MachineSettingsAction/MachineSettingsAction.py (_onContainerAdded [40]): Not attaching MachineSettingsAction to ultimaker2_plus; Machines that use variants are not supported
2017-01-31 05:19:27,538 - WARNING - .../site-packages/cura/MachineActionManager.py (addSupportedAction [68]): Unable to add DiscoverUM3Action to ultimaker3, as the action is not recognised
2017-01-31 05:19:27,538 - WARNING - .../site-packages/cura/MachineActionManager.py (addFirstStartAction [79]): Unable to add DiscoverUM3Action to ultimaker3, as the action is not recognised
2017-01-31 05:19:27,538 - DEBUG - /usr/lib/cura/plugins/MachineSettingsAction/MachineSettingsAction.py (_onContainerAdded [40]): Not attaching MachineSettingsAction to ultimaker3; Multi-extrusion printers are not supported
2017-01-31 05:19:27,697 - DEBUG - /usr/lib/cura/plugins/MachineSettingsAction/MachineSettingsAction.py (_onContainerAdded [40]): Not attaching MachineSettingsAction to ultimaker2_extended_plus; Machines that use variants are not supported
2017-01-31 05:19:29,405 - DEBUG - .../site-packages/UM/Backend/Backend.py (_onSocketError [190]): Socket was unable to bind to port, increasing port number to 49677
2017-01-31 05:19:29,505 - DEBUG - .../site-packages/UM/Backend/Backend.py (_createSocket [206]): Previous socket existed. Closing that first.
2017-01-31 05:19:29,507 - DEBUG - /usr/lib/cura/plugins/CuraEngineBackend/CuraEngineBackend.py (_terminate [186]): Attempting to kill the engine process
2017-01-31 05:19:29,508 - DEBUG - .../site-packages/UM/Backend/Backend.py (_createSocket [206]): Previous socket existed. Closing that first.
2017-01-31 05:19:29,510 - DEBUG - .../site-packages/UM/Controller.py (setActiveView [80]): Setting active view to SolidView
2017-01-31 05:19:29,525 - DEBUG - .../site-packages/UM/Backend/Backend.py (_onSocketError [190]): Socket was unable to bind to port, increasing port number to 49678
2017-01-31 05:19:29,626 - DEBUG - .../site-packages/UM/Backend/Backend.py (_createSocket [206]): Previous socket existed. Closing that first.
2017-01-31 05:19:29,628 - DEBUG - /usr/lib/cura/plugins/CuraEngineBackend/CuraEngineBackend.py (_terminate [186]): Attempting to kill the engine process
2017-01-31 05:19:29,628 - DEBUG - .../site-packages/UM/Backend/Backend.py (_createSocket [206]): Previous socket existed. Closing that first.
2017-01-31 05:19:29,867 - DEBUG - .../site-packages/UM/Qt/Bindings/Theme.py (load [118]): Loading theme file: /usr/share/cura/resources/themes/cura/theme.json
2017-01-31 05:19:29,883 - DEBUG - .../site-packages/UM/Qt/Bindings/Theme.py (load [118]): Loaded theme /usr/share/cura/resources/themes/cura
QObject::connect: Parentheses expected, signal MainWindow::
QObject::connect: Parentheses expected, signal MainWindow::
QObject::connect: Parentheses expected, signal MainWindow::
2017-01-31 05:19:29,938 - WARNING - .../site-packages/cura/Settings/ContainerManager.py (getContainerMetaDataEntry [171]): Could not get metadata of container  because it was not found.
Segmentation fault (core dumped)
┌[✓ root@Scott [~]
└─> coredumpctl -1 gdb
           PID: 32479 (python3)
           UID: 69069 (david)
           GID: 69069 (david)
        Signal: 11 (SEGV)
     Timestamp: Tue 2017-01-31 05:19:29 EST (3s ago)
  Command Line: python3 /usr/bin/cura
    Executable: /usr/bin/python3.6
 Control Group: /user.slice/user-69069.slice/session-c2.scope
          Unit: session-c2.scope
         Slice: user-69069.slice
       Session: c2
     Owner UID: 69069 (david)
       Boot ID: 2ac8692f2d5c4da89c8dfbf5120ada17
    Machine ID: df3517e3821d4b0aa5d4401915fd80a9
      Hostname: Scott.Blue-Labs.org
       Storage: /var/lib/systemd/coredump/core.python3.69069.2ac8692f2d5c4da89c8dfbf5120ada17.32479.1485857969000000000000.lz4
       Message: Process 32479 (python3) of user 69069 dumped core.
                
                Stack trace of thread 32479:
                #0  0x00007f06b700ee39 _ZNK7QWindow8geometryEv (libQt5Gui.so.5)
                #1  0x00007f06b70147c0 n/a (libQt5Gui.so.5)
                #2  0x00007f06b90bb25b n/a (libQt5Qml.so.5)
                #3  0x00007f06b90bbdd6 _ZNK3QV414QObjectWrapper14getQmlPropertyEP15QQmlContextDataPNS_6StringENS0_12RevisionModeEPbb (libQt5Qml.so.5)
                #4  0x00007f06b90d18ff _ZN3QV47Runtime18method_getPropertyEPNS_15ExecutionEngineERKNS_5ValueEi (libQt5Qml.so.5)
                #5  0x00007f064c63c717 n/a (n/a)

GNU gdb (GDB) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/python3.6...(no debugging symbols found)...done.

warning: core file may not match specified executable file.
[New LWP 32479]
[New LWP 32480]
[New LWP 32487]
[New LWP 32486]
[New LWP 32485]
[New LWP 32510]
[New LWP 32490]
[New LWP 32509]
[New LWP 32481]
[New LWP 32484]
[New LWP 32491]
[New LWP 32492]
[New LWP 32494]
[New LWP 32493]
[New LWP 32497]
[New LWP 32495]
[New LWP 32498]
[New LWP 32488]
[New LWP 32489]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `python3 /usr/bin/cura'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f06b700ee39 in QWindow::geometry() const () from /usr/lib/libQt5Gui.so.5
[Current thread is 1 (Thread 0x7f06c9210400 (LWP 32479))]
(gdb) bt
#0  0x00007f06b700ee39 in QWindow::geometry() const () from /usr/lib/libQt5Gui.so.5
#1  0x00007f06b70147c0 in ?? () from /usr/lib/libQt5Gui.so.5
#2  0x00007f06b90bb25b in ?? () from /usr/lib/libQt5Qml.so.5
#3  0x00007f06b90bbdd6 in QV4::QObjectWrapper::getQmlProperty(QQmlContextData*, QV4::String*, QV4::QObjectWrapper::RevisionMode, bool*, bool) const () from /usr/lib/libQt5Qml.so.5
#4  0x00007f06b90d18ff in QV4::Runtime::method_getProperty(QV4::ExecutionEngine*, QV4::Value const&, int) ()
   from /usr/lib/libQt5Qml.so.5
#5  0x00007f064c63c717 in ?? ()
#6  0x00007f064c63b358 in ?? ()
#7  0x00007f06b9165104 in ?? () from /usr/lib/libQt5Qml.so.5
#8  0x00007f06b9068f93 in ?? () from /usr/lib/libQt5Qml.so.5
#9  0x00007f06b9163aba in QQmlJavaScriptExpression::evaluate(QV4::CallData*, bool*, QV4::Scope&) () from /usr/lib/libQt5Qml.so.5
#10 0x00007f06b916d86b in ?? () from /usr/lib/libQt5Qml.so.5
#11 0x00007f06b916aae9 in QQmlBinding::update(QFlags<QQmlPropertyData::WriteFlag>) () from /usr/lib/libQt5Qml.so.5
#12 0x00007f06b917707e in ?? () from /usr/lib/libQt5Qml.so.5
#13 0x00007f06b90f806e in QQmlComponentPrivate::complete(QQmlEnginePrivate*, QQmlComponentPrivate::ConstructionState*) ()
   from /usr/lib/libQt5Qml.so.5
#14 0x00007f06b90f8137 in QQmlComponentPrivate::completeCreate() () from /usr/lib/libQt5Qml.so.5
#15 0x00007f06b90f7f7a in QQmlComponent::create(QQmlContext*) () from /usr/lib/libQt5Qml.so.5
#16 0x00007f06b916ec83 in QQmlApplicationEnginePrivate::_q_finishLoad(QObject*) () from /usr/lib/libQt5Qml.so.5
#17 0x00007f06b916ee92 in QQmlApplicationEnginePrivate::startLoad(QUrl const&, QByteArray const&, bool) () from /usr/lib/libQt5Qml.so.5
#18 0x00007f06b916eff0 in QQmlApplicationEngine::load(QString const&) () from /usr/lib/libQt5Qml.so.5
#19 0x00007f06b94f2660 in ?? () from /usr/lib/python3.6/site-packages/PyQt5/QtQml.so
#20 0x00007f06c867691f in _PyCFunction_FastCallDict () from /usr/lib/libpython3.6m.so.1.0
#21 0x00007f06c8685a0f in ?? () from /usr/lib/libpython3.6m.so.1.0
#22 0x00007f06c8641d77 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.6m.so.1.0
#23 0x00007f06c868553a in ?? () from /usr/lib/libpython3.6m.so.1.0
#24 0x00007f06c8685af3 in ?? () from /usr/lib/libpython3.6m.so.1.0
#25 0x00007f06c8641d77 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.6m.so.1.0
#26 0x00007f06c868553a in ?? () from /usr/lib/libpython3.6m.so.1.0
#27 0x00007f06c8685af3 in ?? () from /usr/lib/libpython3.6m.so.1.0
#28 0x00007f06c8641d77 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.6m.so.1.0
#29 0x00007f06c8685f47 in PyEval_EvalCodeEx () from /usr/lib/libpython3.6m.so.1.0
#30 0x00007f06c8641a5b in PyEval_EvalCode () from /usr/lib/libpython3.6m.so.1.0
#31 0x00007f06c870adc2 in ?? () from /usr/lib/libpython3.6m.so.1.0
#32 0x00007f06c870d62d in PyRun_FileExFlags () from /usr/lib/libpython3.6m.so.1.0
#33 0x00007f06c870d817 in PyRun_SimpleFileExFlags () from /usr/lib/libpython3.6m.so.1.0
#34 0x00007f06c87026f1 in Py_Main () from /usr/lib/libpython3.6m.so.1.0
#35 0x0000000000400a5d in main ()
(gdb) 
@awhiemstra
Copy link
Contributor

See also my comment here: #1072 (comment)

In short, this is due to a bug in PyQt which does not yet officially support Qt 5.8. There is currently no real known workaround.

@ubitux
Copy link
Contributor

ubitux commented Feb 18, 2017

This crash still happens with PyQt5.8 which is officially released since a few days: https://www.riverbankcomputing.com/software/pyqt/download5

@greyltc
Copy link

greyltc commented Feb 19, 2017

Yeah. It seems like pyqt5.8 didn't fix it. I've rebuilt everything and I'm still getting a segfault:

python3[32422]: segfault at 10000001f ip 00007f964d634e39 sp 00007ffcb95059d0 error 4 in libQt5Gui.so.5.8.0[7f964d535000+522000]
systemd[1]: Started Process Core Dump (PID 32447/UID 0).
systemd-coredump[32448]: Process 32422 (python3) of user 1000 dumped core.
                                                
                                                Stack trace of thread 32422:
                                                #0  0x00007f964d634e39 _ZNK7QWindow8geometryEv (libQt5Gui.so.5)
                                                #1  0x00007f964d63a7c0 n/a (libQt5Gui.so.5)
                                                #2  0x00007f964f6ec25b n/a (libQt5Qml.so.5)
                                                #3  0x00007f964f6ecdd6 _ZNK3QV414QObjectWrapper14getQmlPropertyEP15QQmlContextDataPNS_6StringENS0_12RevisionModeEPbb (libQt5Qml.so.5)
                                                #4  0x00007f964f7028ff _ZN3QV47Runtime18method_getPropertyEPNS_15ExecutionEngineERKNS_5ValueEi (libQt5Qml.so.5)
                                                #5  0x00007f95ebebf717 n/a (n/a)

@awhiemstra
Copy link
Contributor

I have now reported the crash upstream, waiting to see what the reaction is.

@greyltc
Copy link

greyltc commented Feb 20, 2017

@awhiemstra thanks. Can you give a link to your bug report?

@awhiemstra
Copy link
Contributor

There is no bugtracker for PyQt, everything goes through the mailing list. This is ML thread: https://www.riverbankcomputing.com/pipermail/pyqt/2017-February/038875.html

@greyltc
Copy link

greyltc commented Feb 21, 2017

No wonder I couldn't find one!

@ubitux
Copy link
Contributor

ubitux commented Feb 25, 2017

Phil Thompson (PyQt5 dev) fixed the problem: https://www.riverbankcomputing.com/pipermail/pyqt/2017-February/038909.html

So I identified, extracted and tested the patch from the snapshot:

--- a/qpy/QtQml/qpyqml_register_type.cpp    2017-02-23 03:32:51.000000000 +0100
+++ b/qpy/QtQml/qpyqml_register_type.cpp    2017-02-25 03:32:58.000000000 +0100
@@ -124,13 +124,13 @@
 
 #define QPYQML_TYPE_INIT(n) \
     case n##U: \
-        QPyQmlObject##n::staticMetaObject = *mo; \
+        QPyQmlObject##n::staticMetaObject = static_mo; \
         QPyQmlObject##n::attachedPyType = attached; \
         rt->typeId = qRegisterNormalizedMetaType<QPyQmlObject##n *>(ptr_name); \
         rt->listId = qRegisterNormalizedMetaType<QQmlListProperty<QPyQmlObject##n> >(list_name); \
         rt->objectSize = ctor ? sizeof(QPyQmlObject##n) : 0; \
         if (ctor) rt->create = QQmlPrivate::createInto<QPyQmlObject##n>; else rt->create = 0; \
-        rt->metaObject = mo; \
+        rt->metaObject = &QPyQmlObject##n::staticMetaObject; \
         rt->attachedPropertiesFunction = attached_mo ? QPyQmlObject##n::attachedProperties : 0; \
         rt->attachedPropertiesMetaObject = attached_mo; \
         rt->parserStatusCast = is_parser_status ? QQmlPrivate::StaticCastSelector<QPyQmlObject##n,QQmlParserStatus>::cast() : -1; \
@@ -219,7 +219,33 @@
         return 0;
     }
 
-    const QMetaObject *mo = pyqt5_qtqml_get_qmetaobject(py_type);
+    const QMetaObject *orig_mo = pyqt5_qtqml_get_qmetaobject(py_type);
+    QMetaObject static_mo = *orig_mo;
+
+#if QT_VERSION >= 0x050800
+    // Qt v5.8.0 changed the way properties are handled by directly calling a
+    // class's static meta-call (if there was one) directly.  This bypasses the
+    // proxy and calls the static meta-call with a pointer to the proxy rather
+    // than a pointer to the real object.  To work round this we clone the
+    // QMetaObject chain and remove the references to the static meta-call
+    // forcing the earlier behaviour.  This approach may also work with earlier
+    // versions of Qt - but if it ain't broke...
+    static_mo.d.static_metacall = 0;
+
+    QMetaObject *sub_mo = &static_mo;
+
+    // By retaining the QObject static meta-object we don't appear to be a
+    // gadget.
+    for (const QMetaObject *mo = sub_mo->d.superdata; mo != &QObject::staticMetaObject; mo = mo->d.superdata)
+    {
+        QMetaObject *new_mo = new QMetaObject;
+        *new_mo = *mo;
+        new_mo->d.static_metacall = 0;
+
+        sub_mo->d.superdata = new_mo;
+        sub_mo = new_mo;
+    }
+#endif
 
     // See if the type is a parser status.
     bool is_parser_status = PyType_IsSubtype(py_type,
@@ -272,7 +298,7 @@
 
     if (qquickitem_register)
     {
-        sipErrorState estate = qquickitem_register(py_type, mo, ptr_name,
+        sipErrorState estate = qquickitem_register(py_type, orig_mo, ptr_name,
                 list_name, &rt);
 
         if (estate == sipErrorFail)

The issue is fixed for me in Cura with this. I sent a mail to the Archlinux packager so this patch can be included.

Thanks

@greyltc
Copy link

greyltc commented Feb 25, 2017

Cool! I not so keen on waiting, so I put a pyqt5-hotfix package with that patch into the AUR and made the cura package depend on it. 2.4.0 launches without segfault now.

I think this issue can be closed.

@Ghostkeeper
Copy link
Collaborator

We'll upgrade to PyQt 5.8 when we're ready. Until then, Arch users can compile with 5.8 themselves or use our builds with 5.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants