No footprint libraries in CvPCB

Bug #1271161 reported by marus25
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Unassigned

Bug Description

Build: BZR 4627 (built using install-kicad.sh script)
OS: Kubuntu 13.10

When starting CvPcb I get the following configuration error: "No PCB footprint libraries are listing in the current footprint library table." and no footprints will show up as being available (despite the fact that the various libraries are listed on the left side.)

There are actually many libraries listed in the footprint library table if I go to Preferences -> Library Table. If I make any changes on the library tables settings (add or delete a row, or even move a row up or down) and then click ok CvPCB will freeze for about 3 seconds and then footprints will start appearing.

Revision history for this message
madworm (madworm-de-inkscape) wrote :

Same here.

Revision history for this message
madworm (madworm-de-inkscape) wrote :

I should add this only happens on my system if the project-specific fp-lib-table is empty or non existent.

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote : Re: [Bug 1271161] [NEW] No footprint libraries in CvPCB

On 01/21/2014 06:42 AM, marus25 wrote:
> Public bug reported:
>
> Build: BZR 4627 (built using install-kicad.sh script)
> OS: Kubuntu 13.10
>
> When starting CvPcb I get the following configuration error: "No PCB
> footprint libraries are listing in the current footprint library table."
> and no footprints will show up as being available (despite the fact that
> the various libraries are listed on the left side.)
>
> There are actually many libraries listed in the footprint library table
> if I go to Preferences -> Library Table. If I make any changes on the
> library tables settings (add or delete a row, or even move a row up or
> down) and then click ok CvPCB will freeze for about 3 seconds and then
> footprints will start appearing.
>
> ** Affects: kicad
> Importance: Undecided
> Status: New

Revision 4620 was in response to a bug similar to this. Someone with the time and
expertise could see what was changed in that commit, and it will at least get you close to
the place in the code where one should be looking for this current issue.

Revision history for this message
marus25 (maball) wrote :

I hadn't noticed that; but yes, it only happens if the project-specific fp-lib-table is empty or non-existent. But under normal circumstances that will be non-existent with a new project, and I would think for may, probably most, projects for their entire lifespan (I know I've certainly done projects without having footprints specific to the project; and even if I have to create a footprint for a project I tend to put it in a global library as if I start using a part it is likely I will use it again in other projects in the future).

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote : Re: [Bug 1271161] Re: No footprint libraries in CvPCB

On 01/21/2014 08:54 AM, marus25 wrote:
> I hadn't noticed that; but yes, it only happens if the project-specific
> fp-lib-table is empty or non-existent. But under normal circumstances
> that will be non-existent with a new project, and I would think for may,
> probably most, projects for their entire lifespan (I know I've certainly
> done projects without having footprints specific to the project; and
> even if I have to create a footprint for a project I tend to put it in a
> global library as if I start using a part it is likely I will use it
> again in other projects in the future).
>

Its a bug. Easy to fix.

The tables are stacked, project specific on top of the global. The test being done only
tests the count in the project specific table.

One wonders why any tests must be done. Assuming there are two tables is probably a bad
choice two, because when you add that third one you have a problem. Also, the GetCount()
function should not return the sum of both tables.

However maybe a new function is needed that does the summing of fall back table entry
counts. Something like:

int FP_LIB_TABLE::GetTotalCount()
{
   // sum my count plus all fall back tables.
}

And use that at the problem site.

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote :

On 01/21/2014 09:05 AM, Dick Hollenbeck wrote:
> On 01/21/2014 08:54 AM, marus25 wrote:
>> I hadn't noticed that; but yes, it only happens if the project-specific
>> fp-lib-table is empty or non-existent. But under normal circumstances
>> that will be non-existent with a new project, and I would think for may,
>> probably most, projects for their entire lifespan (I know I've certainly
>> done projects without having footprints specific to the project; and
>> even if I have to create a footprint for a project I tend to put it in a
>> global library as if I start using a part it is likely I will use it
>> again in other projects in the future).
>>
>
> Its a bug. Easy to fix.
>
> The tables are stacked, project specific on top of the global. The test being done only
> tests the count in the project specific table.
>
> One wonders why any tests must be done. Assuming there are two tables is probably a bad
> choice two, because when you add that third one you have a problem. Also, the GetCount()
> function should not return the sum of both tables.
>
> However maybe a new function is needed that does the summing of fall back table entry
> counts. Something like:
>
> int FP_LIB_TABLE::GetTotalCount()
> {
> // sum my count plus all fall back tables.
> }
>
>

To be technically accurate the aggregate table "size" may be less than the sum of all ROWs
in both tables, because of precedence masking.

The count of entries returned by

   FP_LIB_TABLE::GetLogicalLibs()

is the accurate count.

Patch attached.

Changed in kicad:
status: New → Fix Committed
Revision history for this message
marus25 (maball) wrote :

Well, I just rebuilt with the latest changes; seems to have fixed the issue.

Revision history for this message
Frank Somers (somersf) wrote :

I got this on a fresh (first) install on OSX. Build: (2014-02-26 BZR 4721)-product on Macintosh.

Created a brand new project, added schematic, netlist, and went to add footprints by launching CvPcb.

Revision history for this message
Frank Somers (somersf) wrote :

Additional info to comment #8 (pity I can't edit comments):

More specifically, I have no libraries listed in Preferences / Library tables.
I don't get libraries appearing if I try the suggested work-arounds of adding a row to the table in either global or Project specific libraries.

I suspect that there are simply files missing from the (OSX) binary distribution, as I separately discovered that the default template files were also missing (they go in ~/Library/Application\ Support/kicad/template, including kicad.pro and several .kicad_wks files)

Revision history for this message
Frank Somers (somersf) wrote :

Additional info to comment #8, #9

It seems the root cause of the particular issue I'm seeing, is that the fp-lib-table file (on OSX its in ~/Library/Preferences/fp-lib-table) is not pre-populated with the default modules on a fresh installation.

I located an explanation and a mini-script to generate an fp-lib-table file on the EEVBlog forum here:
http://www.eevblog.com/forum/open-source-kicad-geda/kicad-library-table-generator/

Perhaps this all works seamlessly for those that are upgrading binaries, but its been a bit of a pain for a new user to KiCad.

Perhaps you might also be concerned to note that on the forum page listed above, I see that 2 users just defected to diptrace more-or-less on the strength of this issue.

Revision history for this message
Kustaa Nyholm (kustaa-nyholm) wrote :

I'm a new user and have been banging my head on this on Mac OS X (with build 2014-02-26 BZR 4721) like Frank Somers.

Very, very frustrating.

Is there a workaround how to get libraries working on Mac OS X?

Jon Neal (reportingsjr)
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.