| Summary: | KDevelop crash while editing QML file with custom types | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Robert Voinea <rvoinea> |
| Component: | Language Support: QML/JavaScript | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | Keywords: | drkonqi |
| Priority: | NOR | ||
| Version First Reported In: | 5.2.3 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/kdevelop/6501b35cb64b3737a754d5201314e0b2d71366ff | Version Fixed/Implemented In: | 5.3.0 |
| Sentry Crash Report: | |||
|
Description
Robert Voinea
2018-07-18 15:07:53 UTC
It seems that it does not crash all the time.
See the example below.
The crash occurs when I move the mouse pointer over the "elbow" text.
I have identified two distinct cases when this does not occur:
- If I comment or remove the "when" line
- If I import the plugin with "import MyPlugin 1.0" (instead of "import MyPlugin 1.0 as MyPlugin")
Note:
- Elbow is the data type defined in the plugin.
- Elbow.StyleLeft is an enum
import QtQuick 2.6
import MyPlugin 1.0 as MyPlugin
Item
{
id: container
MyPlugin.Elbow
{
id: elbow
states: [
State
{
name: 'LeftTop'
when: (elbow.style == MyPlugin.Elbow.StyleLeft)
}
]
}
}
Can confirm. Git commit 6501b35cb64b3737a754d5201314e0b2d71366ff by Kevin Funk. Committed on 24/10/2018 at 21:42. Pushed by kfunk into branch '5.3'. duchain: Make htmlIdentifiedType() crash-safe Unfortunately not easy to add a regression test given the current qmljs testing infrastructure. FIXED-IN: 5.3.0 M +17 -7 kdevplatform/language/duchain/navigation/abstractdeclarationnavigationcontext.cpp https://commits.kde.org/kdevelop/6501b35cb64b3737a754d5201314e0b2d71366ff |