Local labels on a sheet need to be able to connect just to other labels
for intersheet routing. This was mistakenly disallowed to check to for
dangling local labels
A local label that only connects to other labels or hierarchical sheet
pins without any component pin on the same sheet serves no local purpose
and is likely mislabeled. Extend the existing bus-member check to all
local labels so that ercCheckLabels() flags these cases as
ERCE_LABEL_NOT_CONNECTED.
The allPins > 1 guard prevents double-reporting with
ERCE_LABEL_SINGLE_PIN which already covers the allPins == 1 case.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23346
When a net subgraph name-matched a bus candidate, the absorption
condition at processSubGraphs only checked that the outer
connection was not a bus. It did not check whether the candidate
was a bus, so a net could absorb a bus subgraph. Later, when
resolving bus parents through the m_absorbed_by chain, the
absorbed-into subgraph had a net driver connection instead of a
bus, triggering the assertion in matchBusMember.
Add a check that the candidate is also not a bus before allowing
absorption. Also replace the assertion in matchBusMember with a
null return as defense in depth, since all callers already handle
null.
A junction placed at the midpoint of a wire (without the wire being
split) now correctly connects all wires meeting at that point. The
connection graph previously only connected wires at their endpoints,
so a horizontal wire passing through a junction as a midpoint was not
linked to the vertical wire terminating at the junction.
The fix adds a special case in updateItemConnectivity() that, when
processing a junction item, queries GetBusesAndWires() with
aIgnoreEndpoints=true to find wires whose midpoints coincide with the
junction. These wires are added to the connection map at the junction
position, mirroring the existing label-at-wire-midpoint handling.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23143
SCH_PIN::GetLibPin() can return null when a schematic pin has
no backing library pin, but several call sites in the connection
graph and pin code chained GetLibPin()->GetParentSymbol() without
null checks. This caused a SIGSEGV in the ResolveDrivers sort
comparator when opening projects with missing library linkage.
Guard all six call sites so a null GetLibPin() is treated as
"not a power symbol," which is the safe default.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23179
When a jumper pin group contains a pin number that doesn't exist in the
symbol, SCH_SYMBOL::GetPin() returns nullptr. The connection graph code
in updateSymbolConnectivity() pushed these null pointers into a vector
and then dereferenced them in linkPinsInVec()
Skip null pins when building the jumper group connection list. Also add
validation in the symbol properties dialog to reject jumper pin groups
that reference non-existent pin numbers before they can be saved.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23058
StoreImplicitConnection accepted a raw SCH_CONNECTION* and
~CONNECTION_SUBGRAPH always deleted everything in
m_bus_element_connections. A double‑free could happen if that same
pointer was also deleted somewhere else. Make the ownership semantics
more clear. Hopefully this fixes / prevents future issues.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17413
Sort m_global_power_pins before processing in generateGlobalPowerPinSubGraphs()
to ensure deterministic iteration order. This prevents the same schematic from
producing different ERC results on consecutive runs.
The sort key uses sheet path, symbol reference, and pin number for a stable
ordering that does not depend on RTree iteration order.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20012
When a hierarchical bus connects sheets, local labels that are bus members
may only connect to pins through the hierarchy (in other sheets). Previously,
ERC counted pins from all sheets connected through the hierarchy, which masked
labels that lacked local connections.
Now, for local labels that are bus members, we track local pin count separately.
If a bus member label has no local pin connections, it is flagged as unconnected
even if the net has pins in other sheets through the hierarchical bus.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19646
Look to see if, in the same bus, the bus member was renamed. if so,
take the new name unless one of two things:
1) If the current name already matches a different bus member
2) If a different bus updated the neighbor (this preserves the bus name)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18299
Allows multiple, top-level schematic sheets. Records of the sheets are
stored in the project file. All top-level sheets live under a virtual
root sheet in the hierarchy. This virtual root is suppressed for export
and general visibility
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2063
Crossing wires with pathological label in the center are actually
connected for the netlist. This is an ERC error but we should keep
things consistent.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21494
At most, we will have 4 items. Or maybe a few more with stacked pins.
But not enough to thread. The overhead of starting threads and using
mutexes is greater than any savings
If global or local labels are floating -> error
If global or local labels are only connected to one pin -> warning
Rather than forcing two different errors depending on whether the label
is local or global
We reuse the CANDIDATE flag in various places across the codebase,
which is probably incorrect given the original intention for the
flag. Clearing it before use would be a performance hit for incremental
connectivity - and we can't rely on other users of the flag to clear
it for us. So we now use a new flag just for connectivity to avoid
other users trampling on connectivity updates.
Propagating to neighboring connections when not a net will cause an
infinite recursion crash. Use the wxCHECK2 instead of wxASSERT to
prevent this.
Add a bunch of question comments where the use of wxASSERT is questionable.
Now that we are threading things in different frames, we need to watch
that we are not waiting for a process to complete in one frame while
working in another. To accomplish this, we only wait for our own loop
results
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20572
Support explicit jumper symbols, defined either by a
flag that all pins with the same number are connected,
or by explicit groups of jumpered pins
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2558