https://bugs.kde.org/show_bug.cgi?id=444484

            Bug ID: 444484
           Summary: Crash in stylechecker (due to stale
                    ReferencedDUChainTopContext)
           Product: kdev-python
           Version: git master
          Platform: Neon Packages
                OS: Linux
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: Language support
          Assignee: m...@svenbrauch.de
          Reporter: jonathan.ver...@matfyz.cz
  Target Milestone: ---

When working on a python project, I occasionally get the following crashes
coming from the stylechecker:


#0  Python::StyleChecking::addSetupErrorToContext(QString const&)
(this=0x55555b4aede0, error="Got invalid size: stdin:5:1:")
    at /home/jonathan/zdroj/clones/kdev-python/pythonstylechecking.cpp:203
#1  0x00007fff319b6f97 in Python::StyleChecking::processOutputStarted()
(this=0x55555b4aede0)
    at /home/jonathan/zdroj/clones/kdev-python/pythonstylechecking.cpp:139
#2  0x00007fff319b91bc in QtPrivate::FunctorCall<QtPrivate::IndexesList<>,
QtPrivate::List<>, void, void (Python::StyleChecking::*)()>::call(void
(Python::StyleChecking::*)(), Python::StyleChecking*, void**)
    (f=(void (Python::StyleChecking::*)(Python::StyleChecking * const))
0x7fff319b6eae <Python::StyleChecking::processOutputStarted()>,
o=0x55555b4aede0, arg=0x7fffffffce90) at
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:152


I only included the first three frames, since the function which crashes is
called in response to a signal (QProcess::readyReadStandardOutput), so the rest
of the trace is not interesting.

The crash is due to `m_stylechecker` being no longer valid at the point. The
only way I see that can happen is due to some problem in the
`kdevpythonsupport/codestyle.py`
script which leads it to output more stuff then expected or take too long
outputting it. That way, the `processOutputStarted` function would read the
output up to the expected size (or up to what it can read in 100ms) and then
set the `m_currentlyChecking` to nullptr. However, when the script outputs some
more after this, `processOutputStarted` is called again, now with
`m_currentlyChecking` null which eventually leads to a crash (note also, that
when its called again, `m_mutex` is probably not held anymore, so there might
be other races).|

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to