I recently started playing with KiCad. I created a very simple schematic using some sensors and then created a multi layer pcb. Everything appeared to work just fine. I even created a 3D view. I started and completed a different board which seems ok as well. Today I reloaded the first pcb and all of a sudden I get a load error. The error test is:
Error Loading Board.
PARSE_ERROR: Expecting “symbol” in input/source “myfilename”.kicad_pcb.
line 24
offset 8
from path,dsnlexer.cpp: Ecpecting(): line 361
Either post the headers of both kicad_pcb files here… the first 30 lines will suffice or you check them out yourself side by side (with notepad++ for example) it seems the faulty file has got something at line 24 that ticks of the parser.
I managed to fix the problem. It seems that a couple of the Layer names listed in the first few lines
(layers
(0 F.Cu signal)
(1 +12V_Plane power hide)
(2 -12V_Plane power hide)
(31 B.Cu signal)
etc…
did not match the references used way later in the file. I have no idea how that could have happened since I had been working on the pcb, saving and reloading repeatably before this happened. If I changed something with the Layer descriptions then saved (which is possible), there should have been some kind of warning if what I did totally broke the file where it could not be loaded again. Anyway, it looks ok for now.
I have a similar problem with loading my PCB file and here are a few details:
My ubuntu 14 system crashed when I tried to install some new drivers.
I was able to access the file system and get my kicad documents and a backup copy.
I reinstalled everything and reloaded the kicad documents.
When I opened up either the backup or the original, the schematic looked fine (at first glance), but the pcb editor popped up with the parse error listed in this post and one other. I examined the text file, but did not find any blatant oddities. What was exceptionally odd was that some components changed size and orientation. See the photo below. The diodes flipped direction and the resistors grew to the point where they were no longer connected.
Once one uses a component and a footprint in a schematic are they stored locally?
Could the new install have reloaded new component sizes?
And here was the error-
Error loading board.
PARSE_ERROR: Expecting ‘number’ in input/source “/home/mud/src/stairs/aStair.kicad_pcb”, line 63, offset 23
from /build/buildd/kicad-0.20131208+bzr4024/common/dsnlexer.cpp : Expecting() : line 285
Guidance appreciated. Will try the backups, but since both of my copies show similar issues, I tend to think that this is an issue with reloading the software/libraries.
So, I think that I fixed the problem, but I do not exactly know what was wrong. In my haste to reinstall my system, I simply used sudo apt-get install kicad without first adding the new repository. It is likely that this grabbed an old version of kicad as the display changed colors on me in addition to the part size and orientation changes. Reinstalling fixed everything.
My solution was pretty easy.
I looked the .kicad_pcb file with notepad++ and I saw that it is filled with a bunch of ‘null’(it litterally means there is nothing).
In the same folder I found a file with the extension .kicad_pcb-bak.
So I decided to rename the .kicad_pcb-bak to .kicad_pcb and replace the old file. It worked