Pcbnew: Unconnected traces lose netcode on reload/connectivity rebuild

Bug #1673940 reported by Lutz.H
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
High
Unassigned

Bug Description

separated from 1673609
file 1
Load the full track GND and separate the top horizontal wire

See at the separated wire (name is GND)
Save the File.
Close Pcbnew
Open the File.
(see File 3)
See at the separated wire (name is "")

No possibilities to connect to GND again

Tags: pcbnew
Revision history for this message
Lutz.H (lutz-heinisch) wrote :
Lutz.H (lutz-heinisch)
description: updated
Lutz.H (lutz-heinisch)
description: updated
Revision history for this message
Lutz.H (lutz-heinisch) wrote :

May be
When the segments broken

 (segment (start 62.23 44.45) (end 59.055 41.275) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD43))
  (segment (start 59.055 29.845) (end 60.325 28.575) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD48))

in pcb_parser.cpp

does not work well:
 2502  for( token = NextTok(); token != T_RIGHT; token = NextTok() )

2492 TRACK* PCB_PARSER::parseTRACK() throw( IO_ERROR, PARSE_ERROR )
 2493 {
 2494  wxCHECK_MSG( CurTok() == T_segment, NULL,
 2495  wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as TRACK." ) );
 2496
 2497  wxPoint pt;
 2498  T token;
 2499
 2500  std::unique_ptr< TRACK > track( new TRACK( m_board ) );
 2501
 2502  for( token = NextTok(); token != T_RIGHT; token = NextTok() )
 2503  {
 2504  if( token != T_LEFT )
 2505  Expecting( T_LEFT );
 2506
 2507  token = NextTok();
 2508

Revision history for this message
Lutz.H (lutz-heinisch) wrote :

Unfortunately no debugging option here.

Lutz.H (lutz-heinisch)
description: updated
Revision history for this message
Lutz.H (lutz-heinisch) wrote :

 Here the differences: Error is net 0
  first save
  load and second save

  (segment (start 50.165 44.45) (end 62.23 44.45) (width 0.25) (layer F.Cu) (net 1))
  (segment (start 50.165 44.45) (end 62.23 44.45) (width 0.25) (layer F.Cu) (net 1))

  (segment (start 62.23 44.45) (end 59.055 41.275) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD43))
  (segment (start 62.23 44.45) (end 59.055 41.275) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD43))

  (segment (start 59.055 29.845) (end 60.325 28.575) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD48))
  (segment (start 59.055 29.845) (end 60.325 28.575) (width 0.25) (layer F.Cu) (net 0) (tstamp 58CAFD48))

  (segment (start 60.325 28.575) (end 86.36 28.575) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD4A))
  (segment (start 60.325 28.575) (end 86.36 28.575) (width 0.25) (layer F.Cu) (net 0) (tstamp 58CAFD4A))

  (segment (start 86.36 28.575) (end 84.455 30.48) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD4C))
  (segment (start 86.36 28.575) (end 84.455 30.48) (width 0.25) (layer F.Cu) (net 0) (tstamp 58CAFD4C))

  (segment (start 84.455 46.355) (end 101.6 46.355) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD4F))
  (segment (start 84.455 46.355) (end 101.6 46.355) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD4F))

  (segment (start 101.6 46.355) (end 100.965 46.355) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD51))
  (segment (start 101.6 46.355) (end 100.965 46.355) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD51))

Revision history for this message
John Beard (john-j-beard) wrote :

Looks like this is still broken on master. Take a board file with following five segments in the kicad_pcb file, all in net 1 (GND):

  (segment (start 125 85) (end 130 90) (width 1) (layer F.Cu) (net 1))
  (segment (start 100 90) (end 105 85) (width 1) (layer F.Cu) (net 1))
  (segment (start 125 85) (end 105 85) (width 1) (layer F.Cu) (net 1))
  (segment (start 130 90) (end 130 100) (width 1) (layer F.Cu) (net 1))
  (segment (start 100 100) (end 100 90) (width 1) (layer F.Cu) (net 1))

Deleting segments 1 and 2 (diagonal) will leave the third one (y=85) unconnected to the GND net, and airwires will be shown from the two vertical lines (lines 4 and 5). Saving the file now results in what you expect (three segments, all in GND):

  (segment (start 125 85) (end 105 85) (width 1) (layer F.Cu) (net 1))
  (segment (start 130 90) (end 130 100) (width 1) (layer F.Cu) (net 1))
  (segment (start 100 100) (end 100 90) (width 1) (layer F.Cu) (net 1))

The isolated one will drop out of the net if:

* You reload the file
* You regenerate the netlist connectivity, for example by switching to legacy mode

Once the segment has dropped out of the net, the netcode is shown as 0 in the status bar. Undo at this point will not restore the netcode to the track.

Any save from that point on will save (net 0) in the file:

  (segment (start 125 85) (end 105 85) (width 1) (layer F.Cu) (net 0))
  (segment (start 130 90) (end 130 100) (width 1) (layer F.Cu) (net 1))
  (segment (start 100 100) (end 100 90) (width 1) (layer F.Cu) (net 1))

Because the connectivity graph generation causes this, changing (net 0) to (net 1) in the kicad_pcb file also cannot fix this, unless you also add connecting segments and _then_ change the netcode for 0 to 1.

Thus, I think this is a High priority bug, as there is potential to lose a routed track. There is a workaround (reconnect the trace and then manually change the netcode in the file and reload) but it would be pretty hard to do that usefully on a large PCB.

Changed in kicad:
status: New → Confirmed
importance: Undecided → High
summary: - Rename NET to "" during laod in Pcbnew
+ Unconnected traces lose netcode on reload/connectivity rebuild
summary: - Unconnected traces lose netcode on reload/connectivity rebuild
+ Pcbnew: Unconnected traces lose netcode on reload/connectivity rebuild
tags: added: pcbnew
Revision history for this message
Shtykau Roman (shtram) wrote :

Can't reproduce bug on my Win7 x64. It seems like to be fixed.

Revision history for this message
Lutz.H (lutz-heinisch) wrote : AW: [Bug 1673940] Re: Pcbnew: Unconnected traces lose netcode onreload/connectivity rebuild

Hallo Roman,

the wrong behavier still with Version 4.0.7.

  The Name of the Segment will be (net 0), it should be (net 1) as saved.

1. : the File is correct saved: (Filename edited)
start_then Picture.delete.kicad_pcb

  (segment (start 50.165 44.45) (end 62.23 44.45) (width 0.25) (layer F.Cu) (net 1))
  (segment (start 62.23 44.45) (end 59.055 41.275) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD43))
  (segment (start 59.055 29.845) (end 60.325 28.575) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD48))
  (segment (start 60.325 28.575) (end 86.36 28.575) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD4A))
  (segment (start 86.36 28.575) (end 84.455 30.48) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD4C))
  (segment (start 84.455 46.355) (end 101.6 46.355) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD4F))
  (segment (start 101.6 46.355) (end 100.965 46.355) (width 0.25) (layer F.Cu) (net 1) (tstamp 58CAFD51))

)

2. : then I load the File to Kicad !!! Here is thebug !!!
    see AfterloadFile.png the Segments on the top are separate

3.I do something
   See AfterloadFile.png

4. I save the File to see wat is wrong

delete.kicad_pcb

  (segment (start 59.055 29.845) (end 60.325 28.575) (width 0.25) (layer F.Cu) (net 0) (tstamp 58CAFD48))
  (segment (start 60.325 28.575) (end 86.36 28.575) (width 0.25) (layer F.Cu) (net 0) (tstamp 58CAFD4A))
  (segment (start 50.165 44.45) (end 62.23 44.45) (width 0.25) (layer F.Cu) (net 1))

now ther you can see: there are Segments with the Name (net 0)

Lutz

Von: Shtykau Roman
Gesendet: Montag, 23. Oktober 2017 22:53
An: <email address hidden>
Betreff: [Bug 1673940] Re: Pcbnew: Unconnected traces lose netcode onreload/connectivity rebuild

Can't reproduce bug on my Win7 x64. It seems like to be fixed.

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1673940

Title:
  Pcbnew: Unconnected traces lose netcode on reload/connectivity rebuild

Status in KiCad:
  Confirmed

Bug description:
  separated from 1673609
  file 1
  Load the full track GND and separate the top horizontal wire

  See at the separated wire (name is GND)
  Save the File.
  Close Pcbnew
  Open the File.
  (see File 3)
  See at the separated wire (name is "")

  No possibilities to connect to GND again

To manage notifications about this bug go to:
https://bugs.launchpad.net/kicad/+bug/1673940/+subscriptions

Revision history for this message
Lutz.H (lutz-heinisch) wrote :

Bug reproduced with KiCad 4.0.7.

Revision history for this message
Lutz.H (lutz-heinisch) wrote :

Hallo Roman,
here is a other document.

Hope you can reproduce the bug with this documents.

Lutz

Von: Shtykau Roman
Gesendet: Montag, 23. Oktober 2017 22:53
An: <email address hidden>
Betreff: [Bug 1673940] Re: Pcbnew: Unconnected traces lose netcode onreload/connectivity rebuild

Can't reproduce bug on my Win7 x64. It seems like to be fixed.

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1673940

Title:
  Pcbnew: Unconnected traces lose netcode on reload/connectivity rebuild

Status in KiCad:
  Confirmed

Bug description:
  separated from 1673609
  file 1
  Load the full track GND and separate the top horizontal wire

  See at the separated wire (name is GND)
  Save the File.
  Close Pcbnew
  Open the File.
  (see File 3)
  See at the separated wire (name is "")

  No possibilities to connect to GND again

To manage notifications about this bug go to:
https://bugs.launchpad.net/kicad/+bug/1673940/+subscriptions

Revision history for this message
Nick Østergaard (nickoe) wrote :

I think this was fixed with the recent patches to master that changed the netlist behaivor. I don't remember the commits right now.

So this is the expected behaviour in the 4.0 seres.

Revision history for this message
Lutz.H (lutz-heinisch) wrote :

Was fixed at kicad-r8510.dddaa7e69-x86_64.exe

Revision history for this message
Lutz.H (lutz-heinisch) wrote :

Set Status in KiCad to
fixed

Shtykau Roman (shtram)
Changed in kicad:
status: Confirmed → Fix Released
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

"Fix Release" is when the fix is available in a stable release of KiCad. Other wise the status should be "Fix Committed".

Changed in kicad:
status: Fix Released → Fix Committed
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.