Do track locks persist across pcbnew sessions? TL;DR: Yes, but there is a SES import bug

Empirical evidence is no. I saved the PCB with locked tracks and when I open it again, the tracks don’t have the locked property any more. I searched documentation, posts and also the .kicad_pcb file and see no evidence that track locks persist. Amirite?

I have just tried it quickly here on a win10 machine and the tracks remain locked after saving and closing and reopening the file.

Ok, you’re right, the saved file differs, after adding a locked track.

So it looks like something else unlocked them. The only other operation I did was to import a SES file to append tracks. I’ll check to see if that’s what caused it.

Yes indeed, reading in a SES file with additional tracks clears the locks on the existing tracks. Have I found a bug?

Are the tracks unlocked in the specctra session file?

Belay that, I see that some tracks in the SES file have the (type protect) attribute. I suppose those are the imported tracks in the DSN file which were locked by me? Here are two, one with the attribute and one without.

   (wire
      (path B.Cu 4000
        1447800 -965200
        1447800 -1016000
      )
      (type protect)
    )
    (wire
      (path F.Cu 4000
        1506350 -889000
        1625600 -889000
        1676400 -838200
      )
    )

Ok, here’s a small example project that exhibits the problem. It’s a circuit with two 2-pin connectors wired together.

In the PCB file sesbug.kicad_pcb (also in the snapshot sesbug-snap.kicad_pcb), the lower track is locked, but the upper pins are not routed yet. sesbug.dsn is an export of this state. sesbug.ses contains instructions to finish the routing by connecting the upper pins. When imported, this causes the lower track to become unlocked.

Both the .dsn and .ses files contain lock attributes for the lower track, but pcbnew doesn’t restore the lock on the lower track.

sesbug.zip (11.3 KB)

@retiredfeline could you please report this on GitLab? We’ll lose track of it here.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.