On 04/04/15 18:56, Baz Walter wrote:
On 04/04/15 09:23, Phil Thompson wrote:
The current QScintilla snapshot is a release candidate for v2.9. Please
test.

Hello Phil

I'm currently getting segfaults whenever I close a QScintilla widget in
a program that otherwise works fine with the current stable releases.

I don't have a simple test case at the moment, but after opening a blank
editor and then immediately closing it, I get the backtrace below.

This is on Linux (gcc 4.9.2) using all the latest snapshots with the
Python bindings (Python3/Qt5):

Hi Phil

Here's a simple test case that segfaults every time for me after I click the "Test" button:

import sys
from PyQt5 import QtWidgets, Qsci

class Window(QtWidgets.QWidget):
    def __init__(self):
        super().__init__()
        self.editor = Qsci.QsciScintilla(self)
        self.button = QtWidgets.QPushButton('Test', self)
        self.button.clicked.connect(self.handleButton)
        layout = QtWidgets.QVBoxLayout(self)
        layout.addWidget(self.editor)
        layout.addWidget(self.button)

    def handleButton(self):
        self.editor.deleteLater()

if __name__ == "__main__":

    app = QtWidgets.QApplication(sys.argv)
    window = Window()
    window.show()
    app.exec_()


And here's the backtrace:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe83f0700 (LWP 1439)]

Program received signal SIGSEGV, Segmentation fault.
0x00007fffeb690525 in Window::GetPosition() () from /home/usr/opt/snapshot5-3/lib/qt5/lib/libqscintilla2.so.12
(gdb) bt
#0 0x00007fffeb690525 in Window::GetPosition() () from /home/usr/opt/snapshot5-3/lib/qt5/lib/libqscintilla2.so.12 #1 0x00007fffeb690739 in Window::GetClientPosition() () from /home/usr/opt/snapshot5-3/lib/qt5/lib/libqscintilla2.so.12 #2 0x00007fffeb856a23 in Editor::GetClientDrawingRectangle() () from /home/usr/opt/snapshot5-3/lib/qt5/lib/libqscintilla2.so.12 #3 0x00007fffeb857341 in Editor::RectangleFromRange(Range, int) () from /home/usr/opt/snapshot5-3/lib/qt5/lib/libqscintilla2.so.12 #4 0x00007fffeb857877 in Editor::InvalidateRange(int, int) () from /home/usr/opt/snapshot5-3/lib/qt5/lib/libqscintilla2.so.12 #5 0x00007fffeb857e63 in Editor::InvalidateCaret() () from /home/usr/opt/snapshot5-3/lib/qt5/lib/libqscintilla2.so.12 #6 0x00007fffeb692e3f in QsciScintillaQt::timerEvent(QTimerEvent*) () from /home/usr/opt/snapshot5-3/lib/qt5/lib/libqscintilla2.so.12 #7 0x00007ffff551f023 in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5 #8 0x00007ffff5dd4acc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5 #9 0x00007ffff5dd9f10 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5 #10 0x00007ffff65ba79e in sipQApplication::notify(QObject*, QEvent*) () from /home/usr/opt/snapshot5-3/lib/python3.4/site-packages/PyQt5/QtWidgets.so #11 0x00007ffff54edd1b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5 #12 0x00007ffff5544f6d in QTimerInfoList::activateTimers() () from /usr/lib/libQt5Core.so.5
#13 0x00007ffff55453b1 in ?? () from /usr/lib/libQt5Core.so.5
#14 0x00007ffff4a3a71d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#15 0x00007ffff4a3aa08 in ?? () from /usr/lib/libglib-2.0.so.0
#16 0x00007ffff4a3aabc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #17 0x00007ffff5546077 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5 #18 0x00007ffff54eb7b2 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5 #19 0x00007ffff54f318c in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5 #20 0x00007ffff651f38b in meth_QApplication_exec_ () from /home/usr/opt/snapshot5-3/lib/python3.4/site-packages/PyQt5/QtWidgets.so #21 0x00007ffff7a46508 in call_function (oparg=<optimized out>, pp_stack=0x7fffffffe280) at Python/ceval.c:4234 #22 PyEval_EvalFrameEx (f=0x7ffff6b95438, throwflag=<optimized out>) at Python/ceval.c:2836 #23 0x00007ffff7a47793 in PyEval_EvalCodeEx (_co=0x97e2b8, _co@entry=0x7ffff6a8e1e0, globals=0x0, globals@entry=0x7ffff6b92348, locals=0x7fffeb8566d0 <Editor::GetClientRectangle() const>, locals@entry=0x7ffff6b92348, args=0x0, argcount=1, argcount@entry=0, kws=0x2, kws@entry=0x0, kwcount=-156704288, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3585 #24 0x00007ffff7a4783b in PyEval_EvalCode (co=co@entry=0x7ffff6a8e1e0, globals=globals@entry=0x7ffff6b92348, locals=locals@entry=0x7ffff6b92348)
    at Python/ceval.c:773
#25 0x00007ffff7a7061e in run_mod (arena=0x6c8550, flags=0x7fffffffe4e0, locals=0x7ffff6b92348, globals=0x7ffff6b92348, filename=0x7ffff6a85af0,
    mod=0x68bf10) at Python/pythonrun.c:2180
#26 PyRun_FileExFlags (fp=<optimized out>, filename_str=<optimized out>, start=<optimized out>, globals=0x7ffff6b92348, locals=0x7ffff6b92348,
    closeit=1, flags=0x7fffffffe4e0) at Python/pythonrun.c:2133
#27 0x00007ffff7a71a33 in PyRun_SimpleFileExFlags (fp=0x97e2b8, fp@entry=0x6920a0, filename=0x7ffff6b89350 "test_qsci_29.py", closeit=1, flags=0x45504f52505f5445, flags@entry=0x7fffffffe4e0) at Python/pythonrun.c:1606 #28 0x00007ffff7a72833 in PyRun_AnyFileExFlags (fp=fp@entry=0x6920a0, filename=<optimized out>, closeit=closeit@entry=1,
    flags=flags@entry=0x7fffffffe4e0) at Python/pythonrun.c:1292
#29 0x00007ffff7a8cff4 in run_file (p_cf=0x7fffffffe4e0, filename=0x629060 L"test_qsci_29.py", fp=0x6920a0) at Modules/main.c:319 #30 Py_Main (argc=argc@entry=2, argv=argv@entry=0x602010) at Modules/main.c:751 #31 0x0000000000400a81 in main (argc=2, argv=<optimized out>) at ./Modules/python.c:69

_______________________________________________
QScintilla mailing list
[email protected]
http://www.riverbankcomputing.com/mailman/listinfo/qscintilla

Reply via email to