PCBNew Files Saved WIth "kicad-r7525" Will Not Open

Bug #1659736 reported by Dale Chisholm on 2017-01-27
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KiCad
Medium
Chris Pavlina

Bug Description

A PCB file saved from the nightly build " kicad-r7525.8f82f04-x86_64 " can not be opened.

Attempting to open the file gives the squawk " Error loading board.
Expecting "(" in input/source 'C:\Users\ . . . . \PC_Board.kicad.pcb'
line xxx "

(I investigated the problem by comparing the file saved from R7525 to previous versions of the file saved from other KiCAD builds. I found several instances where the attribute " hide " was added to modules used on the PC board. Replacing the instances of " hide)" with simply ")" produced a file that DID open, but after saving the file again, it would NOT open.)

Application: kicad
Version: (2017-01-25 revision 8f82f04)-makepkg, release build
Libraries: wxWidgets 3.0.2
           libcurl/7.51.0 OpenSSL/1.0.2j zlib/1.2.8 libssh2/1.8.0 nghttp2/1.16.1 librtmp/2.3
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
- Build Info -
wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.62.0
Curl: 7.51.0
KiCad - Compiler: GCC 6.3.0 with C++ ABI 1010
        Settings: USE_WX_GRAPHICS_CONTEXT=OFF
                  USE_WX_OVERLAY=OFF
                  KICAD_SCRIPTING=ON
                  KICAD_SCRIPTING_MODULES=ON
                  KICAD_SCRIPTING_WXPYTHON=ON
                  KICAD_SCRIPTING_ACTION_MENU=OFF
                  BUILD_GITHUB_PLUGIN=ON
                  KICAD_USE_SCH_IO_MANAGER=OFF
                  KICAD_USE_OCE=ON

Chris Pavlina (pavlina-chris) wrote :

The file format was changed without updating the version number. I'll fix that.

Wayne - you know I like to avoid breaking forward compatibility when possible, though it's not strictly our policy not to. Would you accept a patch against stable to backport the ability to read files written like this?

Changed in kicad:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Chris Pavlina (pavlina-chris)
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 3ffc17c27b39568ee8188a46941dfe5540a9b6d5
https://git.launchpad.net/kicad/patch/?id=3ffc17c27b39568ee8188a46941dfe5540a9b6d5

Changed in kicad:
status: Confirmed → Fix Committed

@Chris - I'll make an exception since technically this was a bug that
has existed since the beginning of the s-expr file format. Please go
ahead and backport the fix. Thanks.

On 1/27/2017 6:41 AM, Chris Pavlina wrote:
> The file format was changed without updating the version number. I'll
> fix that.
>
> Wayne - you know I like to avoid breaking forward compatibility when
> possible, though it's not strictly our policy not to. Would you accept a
> patch against stable to backport the ability to read files written like
> this?
>
> ** Changed in: kicad
> Status: New => Confirmed
>
> ** Changed in: kicad
> Importance: Undecided => Medium
>
> ** Changed in: kicad
> Assignee: (unassigned) => Chris Pavlina (pavlina-chris)
>

More annoying: it changes the footprint files, not only the board files.
It certainly will create serious issues with fp libs on Github and stable release.

Perhaps the pcb_parser changes should be applied to the stable next version?

Chris Pavlina (pavlina-chris) wrote :

Eh, you're going to have to wait on that backport. I can't get stable to build on my system anymore.

Wayne Stambaugh (stambaughw) wrote :

Yes we will need to add this change to the stable release and make a new release as soon as possible before there is any broken footprints. I'll ask the library devs not to use nightly builds to create new footprints in the mean time. @JP, would you please make the change to the pcb parser since Chris is having issues building the stable branch? Let me know if you cannot and I will try to get to it this weekend.

No problem. I'll do it.

Wayne Stambaugh (stambaughw) wrote :

@JP, I was looking at Dick's patch that fixed the issue. Please don't remove writing the "hide" token in kicad_plugin.cpp. Only apply the parser fix to pcb_parser.cpp. This way both file formats will work in the stable branch. Removing the "hide" token will make it impossible to make TEXTE_MODULE objects invisible because of the issues with EDA_TEXT. I don't want to backport the EDA_TEXT patch.

Wayne Stambaugh (stambaughw) wrote :

Awesome! Thank you so much JP.

On 1/27/2017 8:30 AM, jean-pierre charras wrote:
> No problem. I'll do it.
>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers