KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_constraint_overlay.cpp File Reference

Regression test for the SIGSEGV in KIGFX::VIEW_RTREE::Query reached from a GAL repaint after toggling the constraint overlay off. More...

#include <qa_utils/wx_utils/unit_test_utils.h>
#include <pcbnew_utils/board_test_utils.h>
#include <algorithm>
#include <memory>
#include <set>
#include <board.h>
#include <footprint.h>
#include <math/box2.h>
#include <pcb_shape.h>
#include <settings/settings_manager.h>
#include <view/view.h>
#include <constraints/pcb_constraint.h>
#include <constraints/board_constraint_adapter.h>
#include <constraints/constraint_builder.h>
#include <tools/constraint_overlay.h>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (OverlayRegistersOncePerLayerAndUnregistersFully)
 
 BOOST_AUTO_TEST_CASE (BadgesFanOutAndSelectionToggles)
 
 BOOST_AUTO_TEST_CASE (LayoutDeOverlapsNearbyAnchors)
 
 BOOST_AUTO_TEST_CASE (VisibilityModeAndHoverFilter)
 
 BOOST_AUTO_TEST_CASE (NearestConstrainedShapeUsesCandidatesOnly)
 
 BOOST_AUTO_TEST_CASE (ConstrainedShapeIdsDropsMissingMembers)
 

Detailed Description

Regression test for the SIGSEGV in KIGFX::VIEW_RTREE::Query reached from a GAL repaint after toggling the constraint overlay off.

VIEW::MakeOverlay() already registers the overlay, so the extra VIEW::Add() in CONSTRAINT_OVERLAY's constructor inserted a second R-tree entry that the destructor's single VIEW::Remove() could not reclaim. The leftover entry dangled on the freed VIEW_OVERLAY and was dereferenced on the next redraw.

Definition in file test_constraint_overlay.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/6]

◆ BOOST_AUTO_TEST_CASE() [2/6]

◆ BOOST_AUTO_TEST_CASE() [3/6]

◆ BOOST_AUTO_TEST_CASE() [4/6]

BOOST_AUTO_TEST_CASE ( NearestConstrainedShapeUsesCandidatesOnly )

◆ BOOST_AUTO_TEST_CASE() [5/6]

BOOST_AUTO_TEST_CASE ( OverlayRegistersOncePerLayerAndUnregistersFully )

◆ BOOST_AUTO_TEST_CASE() [6/6]

BOOST_AUTO_TEST_CASE ( VisibilityModeAndHoverFilter )