BoM crashes KiCad

Hello,

Just installed the latest stable version today and began following the tutorial.

I got all the way to generating the BoM, and everything just freezes. Then KiCad hijacked the system and I had to perform a hard shutdown twice to get the program to quit.

I’m on a MacBook Pro, OS Ver. 10.13.5…anyone else have this issue?

Thanks.

Did you generate the bom from eeschema or pcb_new? If you used eeschema which script? (Did you even as far as selecting the script? )
-How to create a bill of materials (BOM)?

Hi,

Thanks for the reply.

I followed the link you provided and followed the instructions, choosing the “html grouped by value”, as suggested. I double-clicked on that, and a new window popped up showing me my selection; as soon as I clicked “OK”, the window went away, and KiCad froze up again.

I can still do other things on the computer, but I’ll have to do another hard shutdown in order to get KiCad to quit.

This was done from within eeschema, as were the other attempts.

Is an xml file created in the project directory? Is it finished or does it seem like the generation ended sometime in the middle? (the last entry of an xml file is always the closing tag of the first opening tag. For a kicad bom xml it is )

If the xml file is generated fully:
Is a html file created? Is the generation finished? (does it end with )

No, there’s no xml file. There’s the library folder, the pcb file, one .net, one .sch, and two .lib files.

Can you try with a minimal project? (simply add a single resistor to a new project and test if you get the same problem)

Ok, tried your suggestion and it still freezes. I suppose I can try reinstalling from scratch, but I don’t think that’s the problem.

Maybe I should try the previous version?

I would suggest you head over to the bugtracker.

You might also want to include the full version information help->about->copy version info

1 Like

Thanks Rene, I’m going to roll back to v4 and see if that works.

I did check out the bugtracker, but I’d rather see if a previous version works first. If it doesn’t, I’ll reinstall v5 and then post the details over there.

I try to update my script to generate the BOM from sch directly. Your file may be interesting for my test case :slight_smile:

Ok, I’m obviously doing something wrong with the install, I think.

I trashed v5 and installed v4, and now I can’t get CvPcb to populate the right hand window with the components. So, I got farther in v5 than v4, lol.

In v5, the right pane in CvPcb wasn’t populated with components until I clicked the Project Specific Libraries tab in the configure footprints settings (the Global tab was populated with paths, but the component names wouldn’t show up in the right pane). I was able to manually populate the right window after some trial and error, individually copying the paths to the Project Specific Libraries.

But now, I can’t seem to manually enter the paths into the Project Specific tab.

So, I’m now reading the CvPcb manual, which I don’t mind but…

…I’ve been explicitly following the tutorial, and it should, well, just work, right?

Edit: FWIW, there were a lot of IO errors when I generated the net list*, but the tutorial said to ignore them and just click OK…

*sorry, I meant when I clicked on Run CvPcb

Oh, I’m happy to copy and paste anything you want to test, lol.

So I just have some time to add bom2csv.py feature. It now show be able to port BOM to/form top sch file.

  • bom_plugins/bom2csv.py XXX YYY - Where XXX is input file .xml or top .sch file. YYY is the output CSV BOM file]
  • bom_pligins/bom2sch.py YYY [XXX] - YYY is the input CSV BOM file, XXX is output file top .sch file.

So I’m interesting to see if you can run bom2csv.py YOUR_ROOT_SCH_FILE.sch A_BOM.csv.

I somehow missed this post of yours. What is the error text you get when running cvpcb?

Ok, I’ve had some time to attack this again, and the program is mostly working. I can skip the BoM and pretty much do everything else without problems. As an experiment, I copied and pasted the command which KiCad is supposed to do automatically, but wouldn’t (I manually added .csv). I didn’t try to add any plugins, but simply pasted the command and clicked “Generate”…and this is what was returned:

Run command:
xsltproc -o “/Users/richardrusso/Documents/tutorial1/tutorial1.csv” “/home//kicad/eeschema/plugins/bom2csv.xsl” “/Users/richardrusso/Documents/tutorial1/tutorial1.xml”

Command error. Return code 4
Error messages:
warning: failed to load external entity “/home//kicad/eeschema/plugins/bom2csv.xsl”
cannot parse /home//kicad/eeschema/plugins/bom2csv.xsl

If I try to actually load the plugin, the program will freeze.

You can try run my script under linux which should be (NOT from KICAD):
python bom2csv.py XXX YYY

Or under eeschema -> Bill Of Material (I expect it will be crash the same way):
python "bom2csv.py" "%I" "%O"

Before doing any of this you need to download my code into some where in your local machine. If it work, you don’t have to manually do any BOM at least until KiCad fix this crash issue.

Check your command. It points to the file that is reported as missing.

I would suggest you work through a tutorial before you try to fix the problem by trial and error. One such tutorial is found in the forum FAQ: How to create a bill of materials (BOM)? (already linked above but again for convenience)


If you really want to get your command running then you need to fix the command. Right now it is:

xsltproc -o “/Users/richardrusso/Documents/tutorial1/tutorial1.csv” “/home//kicad/eeschema/plugins/bom2csv.xsl” “/Users/richardrusso/Documents/tutorial1/tutorial1.xml”

The meaning of the single sections is (see: http://xmlsoft.org/XSLT/xsltproc.html):

xsltproc -o [output file] [stylesheet] [input file]

The problem with your command is that the stylesheet file does not exist in the place where you point the command. I would assume that the correct file is found somewhere in the kicad system directory instead of under home. (possibly in the plugins folder)

1 Like

Hi guys,

Thanks for all the help. The BoM generates just fine when run via Pcbnew. Since everything else in KiCad seems to work, I’ll just avoid generating it in Eeschema.

There may come a time when I’d like a fancier BoM, but for now, I’m happy to just have a working program. Since I’m just a hobbyist, what I’d rather not spend what little spare time I have jumping through code hoops.

I’ll try to revisit the issue later on, since I know it’s important for the devs to be able to work out the bugs.

Thank you all again, great community here.

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