当我删除包含ChartView的QML对象时,一切正常。我分配"系列"的那一刻图表中的ID,破坏崩溃。
工作正常:
import QtQuick 2.7
import QtQuick.Controls 2.2
import QtCharts 2.2
ApplicationWindow {
visible: true
width: 640
height: 480
ChartView {
width: 450
height: 450
PieSeries {
PieSlice { label: "eaten"; value: 94.9 }
PieSlice { label: "not yet eaten"; value: 5.1 }
}
}
}
崩溃(请参阅PieSeries中的" id:testId):
import QtQuick 2.7
import QtQuick.Controls 2.2
import QtCharts 2.2
ApplicationWindow {
visible: true
width: 640
height: 480
ChartView {
width: 450
height: 450
PieSeries {
id: testId
PieSlice { label: "eaten"; value: 94.9 }
PieSlice { label: "not yet eaten"; value: 5.1 }
}
}
}
只需启动/退出程序,由于销毁时崩溃,它将无法正常退出。任何ChartView / Series组合都会发生这种情况。
启动 集结ChartTest-Desktop_Qt_5_9_2_MSVC2015_64bit-调试\调试\ ChartTest.exe ... 启用QML调试。只能在安全的环境中使用它。该 程序意外地完成了。这个过程有力地结束了。
堆栈跟踪:
7 QtCharts :: DeclarativePieSeries :: ~DevifiedPieSeries | qtchartsqml2d
8 QQmlPrivate :: QQmlElement ::〜QQmlElement | qqmlprivate.h
9 QQmlPrivate :: QQmlElement ::`标量 删除析构函数' | qtchartsqml2d
10 QV4 :: QObjectWrapper :: destroyObject qv4qobjectwrapper.cpp
11 QV4 :: MemoryManager :: sweep | qv4mm.cpp
12 QV4 :: MemoryManager :: ~MemoryManager | qv4mm.cpp
13 QV4 :: MemoryManager ::`标量删除析构函数' | Qt5Qmld
14 QV4 :: ExecutionEngine :: ~ExecutionEngine | qv4engine.cpp
15 QV4 :: ExecutionEngine ::`标量删除析构函数' | Qt5Qmld