Can't open boards designed with nightly in stable (5.1.4)

Can you open the file with notepad++ or similar and see what the lines around there say?

What version was used to create the project

  1. Create an new project in 5.1.4
  2. Drop in a symbol with a footprint, open pcbnew and
  3. Run pcbnew, import the schematic and save the pcb
  4. Open the *.kicad_pcb with an editor (like notepad, notepad++ etc) in the new project you created
  5. Copy the first line, the open the *.kicad_pcb from the original project and replace the first line with the copied text
  6. delete the line max_error line (there is only 1 line)
  7. delete the entire “defaults” section
1 Like

Nightly builds deviated from the old file format long time (several months) ago. See Post-v5 new features and development news.

The nightly builds should always be able to open old files - if not, it’s a serious bug. But they always write new information there when saving the file. Going back and forth isn’t a good option. I don’t understand what you mean by

What exactly you want to do, just go back to the stable version or what?

Nightly sometimes can not open files by older nightlies. Or not correctly at least. This happens if something bad got through in some version like the wrong interpretation of the 3d model offset parameter sometime during v5 development

Disclaimer: I only know it was between offset and at parameter, i could have these two confused but the core problem stays the same:

The offset parameter is in inches. The devs found this odd and changed it to mean mm -> created problems with old files as kicad could not know what the parameter meant. Solution: introduce new parameter “at” which is in mm and keep old offset parameter in inches. But there were a few nightly versions that saved offset in mm -> hence no other versions will ever read the file the same way, not older ones but also not newer ones!

This is why it is never a good idea to run nighlties for production. Use it to help develop kicad and be aware that it can bite you. If you use it for production then at least do not update in the middle of a project. (If you can not help it then at least backup before the update)

1 Like

Hello guys!
Thanks for all your replies.I’m a bit in a hurry now, so I will continue with the version I was using to make
these files. By the way, is there a way to have 2 concurrent versions?
NB: I’m aware that the older version would always refuse to directly open newer files, but in some cases
it would be useful.
Thanks,
Pascal

I forget what OS you run, but if you are on Windows, check out this thread from the FAQ:

On ubuntu it is even easier. Just install both. The package takes care of the rest. Not sure how it is in other distros.

Not so fast - there are quite many packages to choose from. The packages must have different names or locations for the same files, otherwise one package must replace the other. Jsreynaud has nightly packages for that purpose: https://launchpad.net/~js-reynaud/+archive/ubuntu/kicad-dev-nightly. As far as I can see it even separates the configuration directories.

The stable version would be installed from https://launchpad.net/~js-reynaud/+archive/ubuntu/kicad-5.1.

I am not aware of any ubuntu nightly package that is not made this way.

https://launchpad.net/~js-reynaud/+archive/ubuntu/ppa-kicad (see also https://launchpad.net/~js-reynaud)

Why does this still exist? This just confuses users. Well luckily (hopefully) it is not referenced on the website so it should be quite hard to stumble across it.

Hello!

I got more time to try to find the solution today.
@hyiger (details 1 … 7)
That’s what I tried to do last time.
After complaining that the version is newer than blah blah, I replaced the first line with a fresh file.
I got this message:

KicadBug01

Then I tried to delete line 67, the max error stuff.

I got this:

KicadBug02

Then, looking at what was at line 67, I got a block strting with (defaults

And I get almost the same message, offset 7 instead of 6.

KicadBug03

Is there a way to correct the problem?

I was using kicad-r13955.c7fc54b34-x86_64 which can open the files.

Thanks!

Pascal

Hello again!

I opened the old and new formats and in fact if you want to open an uncompatible file with 5.1.4,
the first line is not enough.
Copy everything from the line “(page A4)” until the line with “(net 0 “”)”. And it works.
I didn’t try to copy everything before the net definition lines, I’ll try that now with a real project
and post the results. Stay tuned.

Pascal

Just a heads up: zone handling changed quite significantly in nightly. Meaning opening it in earlier versions will mean zones might look different now. There is no backport available. See mailing list for details.

In other words: Mixing nightly and stable is not suggested. Backporting once should not be a problem if you get it done (manually fixing all reported file format errors). Just be aware that you need to refill zones and run DRC.

2 Likes

Hello Rene!

Thanks for the info.
However, I’m stuck. I have downloaded a nightly build because it corrected some kind of bug, I don’t
remember which one. But now I have produced some boards, and I need to restore them, so I don’t have
choice but mixing files using a text edifor. That said, I don’t mix that much since now I copy a large
part of the file up to the net definitions. I found out that I need to leave the “(general” part, but beside
this I copy a large block. I also noticed that the syntax has changed, it needs less “” than it did before.

So to summarize:

  1. Make a PCB with a single part with 5.1.4
  2. From the old file, copy the “(general” block at the beginning.
  3. Copy all from the new file until the nets
  4. Replace all in the old file until the nets with what you copied in (3).
  5. Replace the “(general” block with what you have saved in (2).

And that should work.

Pascal

There may be cases where " wasn’t needed but optional and older versions write them, but newer versions don’t write them. They may still be compatible.

I confirmed that my instructions are accurate (but maybe not clear). I took an existing 5.1.4 project, opened the PCB file with pcbnew from the latest nightly build (in my case kicad-nightly-20190830-154600-63a85e203-10_14.dmg), saved it, changed the first line back to: (kicad_pcb (version 20171130) (host pcbnew “(5.1.4-0-10_14)”) and then removed the lines with (max_error 0.005) and the ENTIRE section afterwards starting with (defaults. I was then able to open it again in 5.1.4. See the image for details. This should work for you.

image

Hello!

Thanks for your reply. Yes, that makes sense. I copied a lot more than that, but maybe it works
with the strict minimum. As there were many different syntax details that were changed, as the
quotes (see above), I choosed to change the whole first section.

Thanks!

Pascal

Quotes were always supprted. The were just never generated unless necessary. This was discovered to be error prone. The next version will therefore always generate quotes.

Thank you! Your post helped me.