pcbnew fails to open old-stable kicad_pcb

Bug #1796596 reported by Nick Østergaard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Medium
Jeff Young

Bug Description

Trying to open a kicad_pcb from old-stable in the 5.0 branch fails.

The test file is
https://raw.githubusercontent.com/myriadrf/reference-development-kit/master/umyriadrf-7002/v2/KiCAD/uMyriad7002.kicad_pcb

Inspired by the info from http://kicad-pcb.org/help/upgrading/ about the layer names. It looks like some layers are missing in the top of the file.

I manually added below lines to make it load successfully.
(10 Inner10.Cu signal)
(9 Inner9.Cu signal)
(8 Inner8.Cu signal)
(7 Inner7.Cu signal)

The question is: Do we need to implement some, legacy logic to handle these files? Maybe an experimental file healer for know issues?

Application: pcbnew
Version: (5.0.1-dev-152-gf591f8741), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.1 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.4) libssh2/1.8.0 nghttp2/1.33.0
Platform: Linux 4.18.12-arch1-1-ARCH x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.68.0
    OpenCASCADE Technology: 7.3.0
    Curl: 7.61.1
    Compiler: GCC 8.2.1 with C++ ABI 1013

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=OFF
    KICAD_USE_OCC=ON
    KICAD_SPICE=ON

Tags: pcbnew 5.0.0
summary: - pcbnew fails to open ol- stable kicad_pcb
+ pcbnew fails to open old-stable kicad_pcb
description: updated
Revision history for this message
John Beard (john-j-beard) wrote :

Was this PCB affected by https://bugs.launchpad.net/kicad/+bug/893950?

I.e. was the layer count reduced from 12 to 8, but the items on the removed layers remained, and if so, are the "ghost" layers expected?

Revision history for this message
Seth Hillbrand (sethh) wrote :

Looking at https://github.com/myriadrf/reference-development-kit/tree/master/umyriadrf-7002/v2/Manufacturing I think it is safe to say that the board is meant to be 8-layers.

I think the ghost layer data are expected but should not be loaded.

Changed in kicad:
importance: Undecided → Medium
milestone: none → 5.1.0
status: New → Triaged
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

The current situation is not a good solution. I don't think it's a good idea pop up a warning that there are objects on a layer that is no longer defined and then not opening the board. I see one of two possibilities: open the board and warn the user that there are objects on undefined layers or silently remove the objects from undefined layers and load the remainder of the board as is. We need to choose a solution and implement it. My preference would be to warn the user with an option to remove the orphaned objects on save.

Revision history for this message
Seth Hillbrand (sethh) wrote :

@Wayne- I think we may want to give them two options: Remove the objects or add layers to the board to support the objects. This would bring loading inline with the layer change behaviour in pcbnew, i.e. objects are removed by removing their layer.

edit:
Maybe a third option of "Cancel loading"

Revision history for this message
Jeff Young (jeyjey) wrote :

If they took the layer count from 12 to 8 in 5.0 we would have (silently) deleted the objects on the no-longer-present layers, right? So why should we do different when reading in?

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@Jeff, if that is indeed the case then I have no issue with silently removing them. I know we talked about removing orphaned objects when the layer count is reduced but I was not aware that we actually implemented that. This should be confirmed before we silently drop orphaned objects on load.

Revision history for this message
Jeff Young (jeyjey) wrote :

Turns out we do give a warning when deleting layers with something on them, so we should give a warning when opening too.

Jeff Young (jeyjey)
Changed in kicad:
assignee: nobody → Jeff Young (jeyjey)
status: Triaged → In Progress
Jeff Young (jeyjey)
Changed in kicad:
status: In Progress → 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.