Hi all. I have a weird error in KiCad 9.0.3 that I have been unable to solve. I can’t seem to find anything similar searching the tinternet either.
I have several differential nets in this design. However, no matter if I assign a netclass or not to these nets, the ERC throws an error only on the _N lines of the diff pair “Netclass is not defined”.
I’ve tried renaming the nets, redrawing the wires, even changing to +/- instead. Nothing seems to matter.
What’s strange is that I have another differential net that doesn’t have this problem.
This is an error that actually puts the missing netclass name in the error, but clearly something is assigning an empty-string netclass. E.g. usually, it looks like this: “Error: Netclass SOME_NET_CLASS is not defined”.
Can you share the project to see what’s happening? Do your net labels have an empty NetClass field on them too?
I had a look based on your suggestion and I see the problem. It is indeed empty. I’ve attached a picture below. Once I selected one of my netclasses the ERC went away.
What I don’t understand is, why when I assign this net to a netclass manually using either the context menu, or the schematic options, this field does not get allocated. It still remains empty.
Also, that might be a bug? If there is no string in the value field, the erc doesn’t tell you what the actual problem is?
Thank you for confirming my suspicion. It’s slightly confusing how that field got on the net label, as it is only there by default on a directive label. But, in any case, it’s bad UX for an empty net class to get assigned. I’ll add a check for empty net class names when we do that. No need for the project now we know what’s causing it!
This was the ERC check not ignoring empty net class fields, rather than a net class to net assignment issue (which already ignore empty fields). I’ve pushed a fix to v10 and v9.