dmlc / dmlc/decord

Segmentation fault (core dumped) when using with PyQt5 in Linux

Open
#201 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
2.5k
Forks
232
PR merge metrics
No merged PRs in 30d

Description

Running the code below causes **Segmentation Fault** in Linux, but runs without any issue in Windows.

Linux environment:
OS: Ubuntu 20.04 kernel 5.11
CPU: Intel i9 12th gen

The `decord` package, `pyqt5` and `pyqt5-tools` was installed using pip in a clean conda environment.
Just importing decord causes seg fault.

````
import sys
from PyQt5.QtWidgets import QApplication

from decord import VideoReader

from PyQt5.QtWidgets import *
app = QApplication([])
window = QWidget()
layout = QVBoxLayout()
layout.addWidget(QPushButton('Top'))
layout.addWidget(QPushButton('Bottom'))
window.setLayout(layout)
window.show()
app.exec_()
````

Running the program in `valgrind` gives the following output
```
==32688== Process terminating with default action of signal 11 (SIGSEGV)
==32688== Access not within mapped region at address 0x0
==32688== at 0x132043E6: ??? (in /home/sowmen/miniconda3/envs/boltuenv/lib/python3.8/site-packages/decord.libs/libxcb-77222338.so.1.1.0)
==32688== by 0x13203F9A: xcb_send_request_with_fds64 (in /home/sowmen/miniconda3/envs/boltuenv/lib/python3.8/site-packages/decord.libs/libxcb-77222338.so.1.1.0)
==32688== by 0x13204118: xcb_send_request (in /home/sowmen/miniconda3/envs/boltuenv/lib/python3.8/site-packages/decord.libs/libxcb-77222338.so.1.1.0)
==32688== by 0x13212270: xcb_intern_atom (in /home/sowmen/miniconda3/envs/boltuenv/lib/python3.8/site-packages/decord.libs/libxcb-77222338.so.1.1.0)
==32688== by 0x34B198D3: QXcbAtom::initializeAllAtoms(xcb_connection_t*) (in /home/sowmen/miniconda3/envs/boltuenv/lib/python3.8/site-packages/PyQt5/Qt5/lib/libQt5XcbQpa.so.5)
==32688== by 0x34B0BF50: QXcbBasicConnection::QXcbBasicConnection(char const*) (in /home/sowmen/miniconda3/envs/boltuenv/lib/python3.8/site-packages/PyQt5/Qt5/lib/libQt5XcbQpa.so.5)
==32688== by 0x34AE2381: QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) (in /home/sowmen/miniconda3/envs/boltuenv/lib/python3.8/site-packages/PyQt5/Qt5/lib/libQt5XcbQpa.so.5)
==32688== by 0x34AE639B: QXcbIntegration::QXcbIntegration(QStringList const&, int&, char**) (in /home/sowmen/miniconda3/envs/boltuenv/lib/python3.8/site-packages/PyQt5/Qt5/lib/libQt5XcbQpa.so.5)
==32688== by 0x348A271C: QXcbIntegrationPlugin::create(QString const&, QStringList const&, int&, char**) (in /home/sowmen/miniconda3/envs/boltuenv/lib/python3.8/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so)
==32688== by 0x74015AA: QPlatformIntegrationFactory::create(QString const&, QStringList const&, int&, char**, QString const&) (in /home/sowmen/miniconda3/envs/boltuenv/lib/python3.8/site-packages/PyQt5/Qt5/lib/libQt5Gui.so.5)
==32688== by 0x740E1D8: QGuiApplicationPrivate::createPlatformIntegration() (in /home/sowmen/miniconda3/envs/boltuenv/lib/python3.8/site-packages/PyQt5/Qt5/lib/libQt5Gui.so.5)
==32688== by 0x740F2AC: QGuiApplicationPrivate::createEventDispatcher() (in /home/sowmen/miniconda3/envs/boltuenv/lib/python3.8/site-packages/PyQt5/Qt5/lib/libQt5Gui.so.5)
==32688== If you believe this happened as a result of a stack
==32688== overflow in your program's main thread (unlikely but
==32688== possible), you can try to increase the size of the
==32688== main thread stack using the --main-stacksize= flag.
==32688== The main thread stack size used in this run was 8388608.
==32688==
==32688== HEAP SUMMARY:
==32688== in use at exit: 6,836,725 bytes in 6,269 blocks
==32688== total heap usage: 13,801 allocs, 7,532 frees, 22,439,515 bytes allocated
==32688==
==32688== LEAK SUMMARY:
==32688== definitely lost: 160 bytes in 3 blocks
==32688== indirectly lost: 0 bytes in 0 blocks
==32688== possibly lost: 187,800 bytes in 156 blocks
==32688== still reachable: 6,648,765 bytes in 6,110 blocks
==32688== of which reachable via heuristic:
==32688== stdstring : 2,444 bytes in 42 blocks
==32688== suppressed: 0 bytes in 0 blocks
==32688== Rerun with --leak-check=full to see details of leaked memory
==32688==
==32688== Use --track-origins=yes to see where uninitialised values come from
==32688== For lists of detected and suppressed errors, rerun with: -s
==32688== ERROR SUMMARY: 2804 errors from 159 contexts (suppressed: 22 from 2)
Segmentation fault (core dumped)
```
The error occurs from `libxcb-77222338.so.1.1.0` package. But I have no idea how to proceed further than this.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.