Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.4
-
None
-
24106d1e1c (qt/qtdatavis3d/dev) 24106d1e1c (qt/tqtc-qtdatavis3d/dev) eadd0d19b0 (qt/qtdatavis3d/6.4) eadd0d19b0 (qt/tqtc-qtdatavis3d/6.4) fbe9947bd6 (qt/qtdatavis3d/6.3) fbe9947bd6 (qt/tqtc-qtdatavis3d/6.3) 24106d1e1c (qt/qtdatavis3d/wip/NG)
-
Team B Foundation Sprint 60
Description
When trying an ubsan build of qtdatavis3d, I get:
qtdatavis3d/src/datavisualization/CMakeFiles/DataVisualization.dir/engine/abstract3dcontroller.cpp.o:(.data.rel+0x5838): undefined reference to `typeinfo for AbstractDeclarative'
Digging into it, I found that AbstractDeclarative is defined only in DataVisualization_Qml_, a separate library that depends on DataVisualization.
It seemed this worked because Abstract3DController only used inline members of AbstractDeclarative, so a normal build doesn't need the class exported.
But an UBSan build requires the type_info, which isn't available, and cannot be made available because of the layering violation.
To fix, AbstractDeclarative needs to be moved to DataVisualization and exported (it can't, being a QQuickItem, so that, in turn, means that the class needs to be split into an interface that can live in DataVisualization and an interface/implementation that has to live in DataVisualizationQml. iow: dependency inversion.