Unexpected stackup in input/source

I generated a number of designs in a nightly build last November 2019. This was 5.99. I

newer versions of Kicad open the projects but the pcbnew file will not open. Error reported is saying it could not be opened becasue the version I am running is newer. I am guessing this is becuase the version is called 5.99, however it says I need a version newer than 11/23/19. I don;t think this is the issue, the full error text is:
Unexpected “stackup” in input/source “c:\User…” line 38,offset 6.

Any idea how to recover these pcbnew files? The schematic and libraries are fine, just can’t open pcbnew. I have tried several release version , but all have the same error

The file format of the unstable development version 5.99 has been volatile and you may have hit a point where it wasn’t forward or backward compatible. The situation is considerably better now, but there’s no automatic mechanism to recover your files. You have to compare your file with a file made with newer nightly builds. You can see in the message where the problem is. Find a comparable section in a newer file and change your older file manually to resemble the newer one. They are human readable. It’s possible that you can just delete the whole “stackup” section.

If you don’t succeed you could attach a file here, someone could look at it.

(No need to remind to keep backup copies!)

eelik, thanks for the advice. I hoped that it was an easy stackup change in the formatiing and by pasting the newer Kicad version of a 4 layer file for the stackup would work. But no luck. More issues come up. Without the details about the difference between this nightly and release version I think its pretty hopeless. At lease the schematic and library files are still good. I have several projects with this issue, but I think I will be redesigning the boards. Plus who doesn’t have stuff to improve in a layout. Nothing like starting over. I think I will stick with release versions in the future.

Is there some way to get the KiCad version back with which you made that PCB?

If you have (or can make) the Gerber files, then you can back-export that from gerbview to Pcbnew. This does need cleanup, as there is no concept of “footprints” in Gerber files but it does give you most of the info back:

  • Board outline / mounting holes.
  • Tracks.
  • Footprint locations (implicit via track ends, put new footprints on them).

For the footprints you use the normal [F8] from Eeschema go get all new footprints, and you put them back on the right places by dragging a pad of a footprint to an endpoint of a track.

If you go this way, then think about the use of layers. For example, do not put the silkscreen layer from the gerber on the silkscreen of the PCB, but put it on a user layer so you can use it as a reminder of where to put the silkscreen of the newly created footprints.

Maybe you also want to do the back-export of copper layers to Pcbnew on different copper layers (KiCad goes upto 32), and then move the tracks you want to the right layers. That is probably easier and less error prone then putting them on the right copper layer and then delete the remnants of the old pads.

It’s not an ideal solution, but better then nothing. (Unless the first PCB was badly designed, in that case simply re-creating it is probably better)

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