Summary: | creating second new file crashes [KDevelop::IDocumentController::textDocumentCreated] | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Rolf Eike Beer <kde> |
Component: | general | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | igorkuo |
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/kdevelop/kdevelop/-/commit/b3f651be72550196659ce46b5414efb0484f8e4c | Version Fixed In: | 5.13.231200 |
Sentry Crash Report: |
Description
Rolf Eike Beer
2023-04-17 05:16:05 UTC
Cannot reproduce in an existing session or in a new session. Some configuration, filename, etc. is probably necessary to reproduce the bug. I can easily reproduce this. Please tell me what information I should look for. Try in a new KDevelop session. Save under different filenames, extensions, on different disks. Try as a different user as some configuration can be the culprit. Is this a very recent regression? In KDevelop or its dependency? Just reproduced the assertion failure. There is probably no crash with assertions disabled. I'll try to fix it. A possibly relevant merge request was started @ https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/457 Git commit b3f651be72550196659ce46b5414efb0484f8e4c by Igor Kushnir. Committed on 15/09/2023 at 13:41. Pushed by igorkushnir into branch 'master'. problemreporter: handle text document URL changes A text document's URL can be changed when: 1) a new Untitled document is saved; 2) an open document is saved under a different name (File=>Save As...). ProblemReporterPlugin does not listen to IDocumentController::documentUrlChanged signal, and therefore keeps referencing text documents by stale URLs. So when a document is renamed, then another document is created or opened at its previous URL, the assertion Q_ASSERT(!m_visualizers.contains(documentUrl)) in ProblemReporterPlugin::textDocumentCreated() fails. Another consequence is that inline problem notes never appear in the renamed document. Replace the URL key of the renamed document's visualizer and remove the obsolete URL from m_reHighlightNeeded set. When the default problem scope "Current Document" is selected, an active document is not highlighted right after it is renamed. The user has to activate another document, then go back to the renamed one for the highlighting to appear. This is a consequence of another missing connection to the documentUrlChanged signal in ProblemModel. Will be addressed in a subsequent commit. FIXED-IN: 5.13.231200 M +5 -0 plugins/problemreporter/problemhighlighter.h M +36 -0 plugins/problemreporter/problemreporterplugin.cpp M +1 -0 plugins/problemreporter/problemreporterplugin.h https://invent.kde.org/kdevelop/kdevelop/-/commit/b3f651be72550196659ce46b5414efb0484f8e4c |