Mon, 03/18/2024 - 19:00
Forums:
The next code
Handle(Geom_Plane) hRefPlane0; hRefPlane0 = new Geom_Plane(gp_Pnt(0, 0, 0), gpDirRef); Handle(AIS_Plane) hRefbottomPlane = new AIS_Plane(hRefPlane0); hRefbottomPlane->SetSize(500.0, 500.0); hRefbottomPlane->SetColor(Quantity_NOC_LAWNGREEN); aShapes.Append(hRefbottomPlane);
worked in 7.5 but crashes in 7.8.
This happens in SetSize, where in 7.5 the line PA = myDrawer->PlaneAspect(); gives a valid address, in 7.8 it gets a nullptr.
In the next lines the (AIS_Plane_cxx lines 344 to 350) PA is also not created with the result that the line 353 (PA->SetPlaneLength(aXLength,aYLength);) is executed with a null pointer.
Looking at Mantis (0032704) i see this was changed in 7.7.
I don't find anything back in the 7.7 release notes, so is this a bug?
Tue, 03/19/2024 - 08:52
Indeed, the code within
AIS_Plane::SetSize()
andAIS_Plane::SetColor()
looks outdated and broken.Calling
Prs3d_Drawer::SetOwnDatumAspects()
should help.Tue, 03/19/2024 - 14:19
Thanks!