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

            Bug ID: 439492
           Summary: TextCreator::create() crashes in QSyntaxHighligher.
           Product: kio-extras
           Version: unspecified
          Platform: Compiled Sources
                OS: All
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: Thumbnails and previews
          Assignee: plasma-b...@kde.org
          Reporter: rjvber...@gmail.com
        Depends on: 439491
  Target Milestone: ---

SUMMARY
TextCreator::create() creates a locate instance using
`KSyntaxHighlighting::SyntaxHighlighter syntaxHighlighter;` which leads to a
nullptr dereference in `QSyntaxHighlighter::QSyntaxHighlighter(QObject*)`.

STEPS TO REPRODUCE
1. Open a directory in Dolphin, activate hover-on previews
2. Hover the cursor over a .txt file

OBSERVED RESULT
kdeinit5 crashes because of the nullptr dereference.

EXPECTED RESULT
No crash.

SOFTWARE/OS VERSIONS
Happens on Mac & Linux; as far as I can tell this should happen with the
current Qt5 release and the most recent versions of kio-extras and
KSyntaxHighlighting.

ADDITIONAL INFORMATION
The function should call `KSyntaxHighlighting::SyntaxHighlighter
syntaxHighlighter(&textDocument);` which makes the later call to
`setDocument()` unnecessary.


Referenced Bugs:

https://bugs.kde.org/show_bug.cgi?id=439491
[Bug 439491] SyntaxHighlighter::SyntaxHighlighter(QObject*) should NOT use a
default nullptr
-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to