Summary: | Crash in KateViewInternal::textHintTimeout() | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Alexander Potashev <aspotashev> |
Component: | general | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | kossebau |
Priority: | NOR | ||
Version First Reported In: | 5.4.1 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 5.4.2 | |
Sentry Crash Report: |
Description
Alexander Potashev
2019-08-27 23:24:35 UTC
Seems this crashes in KTextEditor's KateViewInternal::textHintTimeout(), possibly due to pointer to a no longer existing TextHintProvider: ``` QStringList textHints; foreach(KTextEditor::TextHintProvider * const p, m_textHintProviders) { const QString hint = p->textHint(m_view, c); // <- crash line 3169 in 5.59 if (!hint.isEmpty()) { textHints.append(hint); } } ``` https://phabricator.kde.org/source/ktexteditor/browse/master/src/view/kateviewinternal.cpp;v5.59.0$3169 Now KDevelop has a flaw that both TextHintProvider classes are getting passed to TextHintInterface::registerTextHintProvider, but not TextHintInterface::unregisterTextHintProvider once they are deleted, which could be the cause then for a dangling pointer here. From a quick check via lxr.kde.org there are no other candidates in a kdevelop context, so in any case something to improve kdevelop-side. Having a look now myself... Git commit 37d08f752e261f68cc89fd1d0fe6a55b2ee40a22 by Friedrich W. H. Kossebau. Committed on 01/09/2019 at 14:05. Pushed by kossebau into branch '5.4'. Fix crash on text hint being triggered after disabling code browser plugin >From KTextEditor::TextHintInterface::registerTextHintProvider() docs: "When the provider is about to be destroyed, make sure to call unregisterTextHintProvider() to avoid a dangling pointer." (new requirement with KF5) The old code never unregistered in case the ContextBrowserPlugin was deleted (like it happens when disabling the plugin in the settings in a running KDevelop instance). M +10 -0 plugins/contextbrowser/contextbrowser.cpp M +2 -0 plugins/contextbrowser/contextbrowser.h https://invent.kde.org/kde/kdevelop/commit/37d08f752e261f68cc89fd1d0fe6a55b2ee40a22 Git commit 0b4ad38441d6a3ce558102cc1ae329d8553ad025 by Friedrich W. H. Kossebau. Committed on 01/09/2019 at 14:13. Pushed by kossebau into branch '5.4'. all debuggers: fix VariableCollection to unregister as texthinter provider M +15 -0 kdevplatform/debugger/variable/variablecollection.cpp M +3 -0 kdevplatform/debugger/variable/variablecollection.h https://invent.kde.org/kde/kdevelop/commit/0b4ad38441d6a3ce558102cc1ae329d8553ad025 By analysis given in comment #c1 for now I assume this crash only was coinidentally when opening Quick Open. The two commits shall close the hole by which the crash might have entered, so closing this report. Please reopen if you still see such crashes happening with the same backtrace (or otherwise open a new one). |