Unable to load PCB file

Suddenly I am unable to open my board in PCBNEW. It was there this morning, and I closed it. Now it gives me an error message:

Error loading board file
(followed by the path to the file)

Click the Details button, and it responds

Expecting “’)’” in input/source

( followed by the complete path again)

line 1240, offset 5

This PCB was finished and I am about to write the gerber files if I can get it open.

WHY can’t I copy and paste the error messages? There is a lot of potential for errors when you have to copy a message down by hand and retype it in this forum.

A similar situation arises when you need to copy the info from one dialog and enter it in another. Why can’t you have more than one window open at a time?


Bruce Herrick

Agree that it should be possible to copy and paste those messages. Kind of annoying!

How about a screen shot for now?

I did one, but I run two wide screen monitors and a screen shot captures both of them, while the dialog box is small in comparison. There should be a way to capture a small part of the screen, but I don’t know it.

Win+Shift+S on windows 10, cmd+shift+4 on mac.

1 Like

If you are on Winblows (like me) check out Greenshot. It is free, and can even snapshot menus. Here is a capture of all the capture options available (note, the default capture mode is “Region” which I find more useful than full screen):

A good question: https://bugs.launchpad.net/kicad/+bug/1844849

Windows has a program called “Snipping Tool”, although less powerful very useful. And you can also edit screenshots with Paint.

To drag this back to the real problem:

can you share the pcb file? Or at least the content of the line that is pointed out by the error message? (plus maybe a few before and after it)

Did you edit your file with i.e a text editor?
The pcb file seems corrupted…

No. No editing at all. I have no idea as to the meaning of Line 1240, offset 5.


Sure. Where do I send it?

I don’t know of anything with line numbers. Sounds like BASIC.

Thanks - Bruce

I edit screenshots with Paint all the time. What a PITA. I’ll look for the “Snipping tool”.



If you can publish the full design then upload it to some cloud service and post a link to it here. If not then open the pcb file with a text editor and copy the lines pointed out in the error message into a response here.

I am not sure what you mean by a cloud service. I have nothing stored in the cloud, nor any access to it.

I opened the file in Notepad but I don’t see anything that looks like a line number. Now what?

google drive, dropbox, one drive, …

Use a proper editor like notepad++

And alternatively: you can directly go to launchpad and report this as a bug. A file should never be corrupted that way. There you can upload files even as a new user.

Then link to the bugreport here as we can then still try and fix your file. (The devs will most likely not be interested in fixing your file but will use it to figure out what went wrong.)

OK, I installed Notepad++ but the file looks the same as it did in Notepad. No line numbers. I then uploaded the file to Dropbox. Here is the link.

Let me know if you receive it ok.



It might be that you need to activate “show line numbers” in the editors settings. settings->preferences:eiditing display line number.

Your file somehow contains a polygon with a single point.
We definetly want this reported over at launchpad.

Here the fixed file, double check the filled zones.

W1FV Preamp.kicad_pcb (105.0 KB)

1 Like

Bug report created: https://bugs.launchpad.net/kicad/+bug/1844872

Could you give me your full version number (help->about kicad -> copy version number)?

Thank you. The file is now intact.

I know how this happened. I tried to add a cutout within a copper zone. I have done this many times in the past without any problems. This time, when I tried to place text in the middle of the cutout area, the box got significantly larger. I made many attempts to make it smaller without success. I then tried to delete the cutout and start over, but that deleted the entire zone. I experienced this in Eagle once and solved it by dragging the points of the box outside the board outline. Then I could delete it. I tried the same trick here, and well, you saw the result. Thank you for your help.

I have done pretty well so far with KiCad, but still have problems with the libraries. That’s another question for later. Right now I have to get this simple board to the fab house.

I deleted the bad file to replace it with the new one. Do I need to recover it and forward it to launchpad, or have you already done that?

Bruce Herrick

I did that but I don’t know where it copied it to.

My system is Win10 Pro 64 bit

Here’s the complete text file:

Application: pcbnew
Version: (5.1.2)-2, release build
wxWidgets 3.0.4
libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.68.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.61.1
Compiler: GCC 8.2.0 with C++ ABI 1013

Build settings: