There is what looks like an actual memory handling error in the code that explains the three last failed assertions as well as the spherical cap not rendering properly.
This is in these excerpts of StelSphereGeometry.cpp and OctahedronPolygon.hpp:
113 //! Get vertices forming triangles filling out the polygon.
114 const QVector<Vec3d>& fillVertices() const
115 {
116 return fillCachedVertexArray;
160 //! Vertex array storing triangles of the polygon (each 3 vertices b eing one triangle).
161 QVector<Vec3d> fillCachedVertexArray;
=> vertices is defined as a reference to a field of a temporary OctahedronPolygon object that gets destroyed right after the definition of 'vertices'
=> in the rest of the SphericalRegion::updateFillVertexBuffer() method it is not legit to use 'vertices', but that's what is done, and why it sometimes crashes
Replacing:
762 const QVector<Vec3d> &vertices = getOctahedronPolygon().fillVertices ();
With:
762 const QVector<Vec3d> vertices = getOctahedronPolygon().fillVertices ();
solves the issue (but that's just to demonstrate the problem, not an optimal solution)
The initial issue of the first assertion that fails in debug mode remains though.
There is what looks like an actual memory handling error in the code that explains the three last failed assertions as well as the spherical cap not rendering properly.
This is in these excerpts of StelSphereGeome try.cpp and OctahedronPolyg on.hpp:
760 void SphericalRegion ::updateFillVer texBuffer( StelRenderer* renderer, const DrawParams& params, bool handleDiscontin uity) lygon() .fillVertices ();
761 {
762 const QVector<Vec3d> &vertices = getOctahedronPo
1337 OctahedronPolygon SphericalCap: :getOctahedronP olygon( ) const on(getClosedOut lineContour( ));
1338 {
1339 if (d>=0)
1340 return OctahedronPolyg
113 //! Get vertices forming triangles filling out the polygon. xArray;
114 const QVector<Vec3d>& fillVertices() const
115 {
116 return fillCachedVerte
160 //! Vertex array storing triangles of the polygon (each 3 vertices b eing one triangle). xArray;
161 QVector<Vec3d> fillCachedVerte
=> vertices is defined as a reference to a field of a temporary OctahedronPolygon object that gets destroyed right after the definition of 'vertices' ::updateFillVer texBuffer( ) method it is not legit to use 'vertices', but that's what is done, and why it sometimes crashes
=> in the rest of the SphericalRegion
Replacing: lygon() .fillVertices (); lygon() .fillVertices ();
762 const QVector<Vec3d> &vertices = getOctahedronPo
With:
762 const QVector<Vec3d> vertices = getOctahedronPo
solves the issue (but that's just to demonstrate the problem, not an optimal solution)
The initial issue of the first assertion that fails in debug mode remains though.