Component select dialog footprint list issue.

Bug #1676220 reported by Wayne Stambaugh
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Medium
Chris Pavlina

Bug Description

The new component select dialog only shows the footprints with the same number of pins from the first footprint library in the footprint library table. All subsequent footprint libraries are ignored. To reproduce, do the following:

1) Type CP into the component filter control.
2) Select the CP1_Small component (any two pin component seems to have the same behavior).
3) Select the footprint select drop down.

Attached are the component library, fp-lib-table, and a screen shot of the issue.

Application: kicad
Version: (2017-03-26 revision 0f0cb64a6)-master, release build
Libraries: wxWidgets 3.0.2
           libcurl/7.53.1 OpenSSL/1.0.2k zlib/1.2.11 libssh2/1.8.0 nghttp2/1.19.0 librtmp/2.3
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
- Build Info -
wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.60.0
Curl: 7.53.1
KiCad - Compiler: GCC 6.3.0 with C++ ABI 1010
        Settings: USE_WX_GRAPHICS_CONTEXT=OFF
                  USE_WX_OVERLAY=OFF
                  KICAD_SCRIPTING=ON
                  KICAD_SCRIPTING_MODULES=ON
                  KICAD_SCRIPTING_WXPYTHON=ON
                  KICAD_SCRIPTING_ACTION_MENU=OFF
                  BUILD_GITHUB_PLUGIN=ON
                  KICAD_USE_OCE=ON

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Here is the fp-lib-table file.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Here is the image of the dialog showing the error.

Changed in kicad:
assignee: nobody → Chris Pavlina (pavlina-chris)
Changed in kicad:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Okay, I *really* cannot reproduce this no matter what I try. Would you be able to do a little bit of debugging assistance for me?

Run KiCad in a debugger, and set breakpoints on the following:

- FOOTPRINT_SELECT_WIDGET::FilterByFootprintFilters
- FOOTPRINT_SELECT_WIDGET::UpdateList

These should run with every keypress, so you may want to set them *after* narrowing down the list, just before you click CP1_Small.

If and when FilterByFootprintFilters runs, print out the value of aFilters.

When UpdateList runs, get a backtrace. In the backtrace, find the frame containing DIALOG_CHOOSE_COMPONENT::PopulateFootprintSelector. Pop up to that frame and print aAlias. Give me both the backtrace and the value of aAlias.

Thank you!

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Also, if both of these breakpoints never fire, set a third breakpoint on DIALOG_CHOOSE_COMPONENT::PopulateFootprintSelector and print out m_fp_sel_ctrl.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1676220] Re: Component select dialog footprint list issue.

On 3/26/2017 8:03 PM, Chris Pavlina wrote:
> Also, if both of these breakpoints never fire, set a third breakpoint on
> DIALOG_CHOOSE_COMPONENT::PopulateFootprintSelector and print out
> m_fp_sel_ctrl.
>

I just noticed that not all of the footprints from the
Air_Coils_SML_NEOSID library are shown. They should be as they all are
two pin footprints. Is it possible that because there is no scrollbar
in the drop down list that all of the footprints are actually in the
list but I cannot view them? I'll take a look at this tonight when I
get home.

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Yes, this is on my to-fix list. I limited the number of footprints because the thing would pretty much explode if for some reason it tried to list all six thousand some components, and never increased the limit from - I think - ten.

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Okay, the limit on footprint count in the list has been increased.

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Can anyone else repro this? I think Wayne's pretty busy, so if someone else can, feel free to jump in with the same test I asked Wayne for.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@Chris, increasing the footprint pin match count somewhat resolved the
issue. I can see a lot more footprint matches now but not all of them.
I can see users being confused when they don't see all of the footprints
they expect. This is most likely only going to be an issue with certain
pin counts. Two seems to be the pin count with the greatest number of
potential footprints. Given that this covers most resistors and
capacitors, it may be problematic.

I tested some symbols with other pin counts to test my theory. When I
select any of the 3 pin PNP/NPN transistor symbols from the device
library, the footprint list is empty. I would expect the footprint list
to contain every 3 pin footprint. When I select the 2N2219 or 2N3055
symbols from the transistor library, I get the correct default footprint
along with all of the 3 pin footprints in the footprint list. There is
definitely something odd happening with the footprint pin count filtering.

On 3/30/2017 6:59 PM, Chris Pavlina wrote:
> Can anyone else repro this? I think Wayne's pretty busy, so if someone
> else can, feel free to jump in with the same test I asked Wayne for.
>

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Yeah, but it shouldn't *only* filter on pin count. It's behaving really strangely for you, I see none of this behavior. I'd really appreciate that debugger output :)

tags: added: componentchooser
Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Wayne, any updates?

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

I haven't done any testing recently because in recent builds it appears
that the footprint selection combobox has been removed from the
component selector dialog. Did you do this?

On 4/10/2017 8:30 AM, Chris Pavlina wrote:
> Wayne, any updates?
>

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

No! I haven't touched KiCad in a while, I've been busy with other things.

Revision history for this message
jean-pierre charras (jp-charras) wrote :

Looks like:
"Revision: 0a8a659ff7d54a3600095bdb87ca14cbb9f52065
Author: Maciej Suminski <email address hidden>
Date: 31/03/2017 17:15:09
Message:
Fix component chooser dialog crash if there are no FPs available"

has incorrectly fixed this bug.

Revision history for this message
Maciej Suminski (orsonmmz) wrote :

I will check it again, sorry for the problem.

Revision history for this message
Maciej Suminski (orsonmmz) wrote :

Indeed the footprint selection combobox was removed by the commit. I reverted it and I could not reproduce the crash, so the problem might have been specific to my configuration and my solution was not correct.

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Thanks. I should be back to working on this in a day or two.

On Apr 13, 2017 5:11 AM, "Maciej Sumiński" <email address hidden>
wrote:

> Indeed the footprint selection combobox was removed by the commit. I
> reverted it and I could not reproduce the crash, so the problem might
> have been specific to my configuration and my solution was not correct.
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1676220
>
> Title:
> Component select dialog footprint list issue.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1676220/+subscriptions
>

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

A day or two is very long here.

Wayne, bug still present? I still can't repro. If you could run the diagnostic steps listed in #4 that'd be great.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

It appears to have been resolved. I'm not exactly sure when and how but the behavior does seem correct now. It seems that this bug report can be tagged as fixed.

Changed in kicad:
status: Triaged → Fix Committed
Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Nice. I'm glad to see that as it looked like a tricky one. I spent a few hours yesterday just reading the filter code very carefully to see if I could find anything unintended and everything looks proper to me...

If you ever do manage to reproduce this again, I'd love a core dump - no need to wait for any specific moment, just fire up gdb and extract a dump while it's exhibiting the issue, and send it to me ideally along with the actual executables - I'd happily dig into that. This one floored me for a while.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

On 7/17/2017 1:15 PM, Chris Pavlina wrote:
> Nice. I'm glad to see that as it looked like a tricky one. I spent a few
> hours yesterday just reading the filter code very carefully to see if I
> could find anything unintended and everything looks proper to me...
>
> If you ever do manage to reproduce this again, I'd love a core dump - no
> need to wait for any specific moment, just fire up gdb and extract a
> dump while it's exhibiting the issue, and send it to me ideally along
> with the actual executables - I'd happily dig into that. This one
> floored me for a while.
>

Will do!

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.