pcbnew segfault reading netlist

Bug #1705455 reported by hauptmech
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Maciej Suminski

Bug Description

When reading a netlist pcbnew is segfaulting.

gdb catches the following error:
0x00007fffdf2e444b in CONNECTIVITY_DATA::GetPadCount(int) const () from /usr/local/bin/_pcbnew.kiface

Tried two recent builds, details below. Dry run of netlist read attached.

Application: kicad
Version: (2017-07-10 revision 2a301d588)-master, release build
Libraries: wxWidgets 3.0.3
           libcurl/7.54.1 OpenSSL/1.1.0f zlib/1.2.11 libpsl/0.17.0 (+libicu/59.1) libssh2/1.8.0 nghttp2/1.23.1
Platform: Linux 4.9.20-rt16-1-rt x86_64, 64 bit, Little endian, wxGTK
- Build Info -
wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.64.0
Curl: 7.54.1
KiCad - Compiler: GCC 7.1.1 with C++ ABI 1011
        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=ON
                  BUILD_GITHUB_PLUGIN=ON
                  KICAD_USE_OCE=OFF

Application: kicad
Version: (2017-07-19 revision c78a2ba4f)-master, release build
Libraries: wxWidgets 3.0.3
           libcurl/7.54.1 OpenSSL/1.1.0f zlib/1.2.11 libpsl/0.17.0 (+libicu/59.1) libssh2/1.8.0 nghttp2/1.23.1
Platform: Linux 4.9.20-rt16-1-rt x86_64, 64 bit, Little endian, wxGTK
- Build Info -
wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.64.0
Curl: 7.54.1
KiCad - Compiler: GCC 7.1.1 with C++ ABI 1011
        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=ON
                  BUILD_GITHUB_PLUGIN=ON
                  KICAD_USE_OCE=OFF

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

Would it be possible to get the files that would allow us to reproduce the crash?

Revision history for this message
hauptmech (hauptmech) wrote : Re: [Bug 1705455] Re: pcbnew segfault reading netlist

Not that easy at the moment. It's possible I committed just before the
crash but it would take too much time right now to try to reproduce it.

My workaround was to load the netlist twice, once to delete extra
footprints, and once to exchange changed footprints. The latter first I
think.

-hauptmech

On 20/07/17 23:43, Maciej Sumiński wrote:
> Would it be possible to get the files that would allow us to reproduce
> the crash?
>

Revision history for this message
hauptmech (hauptmech) wrote :

Encountered the crash again. It is caused by deleting extra footprints.

On 20/07/17 23:43, Maciej Sumiński wrote:
> Would it be possible to get the files that would allow us to reproduce
> the crash?
>

Revision history for this message
hauptmech (hauptmech) wrote :

Deleting the extra footprints by hand worked. Attached are the modules that
were deleted (and corresponding netlist) in case there are hints in the
module contents.

diff --git a/eda/v1/FTComms.kicad_pcb b/eda/v1/FTComms.kicad_pcb
index c165453..69905b1 100644
--- a/eda/v1/FTComms.kicad_pcb
+++ b/eda/v1/FTComms.kicad_pcb
@@ -11525,45 +11525,6 @@
       (net 393 "Net-(TP24-Pad1)"))
   )

- (module modules:TP_SMD1MMCIRCLE (layer F.Cu) (tedit 0) (tstamp 597070C4)
- (at 156.556984 109.211491)
- (path /59420173/597093AB)
- (fp_text reference TP26 (at 0 0) (layer F.SilkS)
- (effects (font (thickness 0.15)))
- )
- (fp_text value TESTPOINT (at 0 0) (layer F.SilkS)
- (effects (font (thickness 0.15)))
- )
- (pad 1 smd circle (at 0 0) (size 1.016 1.016) (layers F.Cu F.Paste
F.Mask)
- (net 73 /external/JTAG_TRSTn))
- )
-
- (module modules:TP_SMD1MMCIRCLE (layer F.Cu) (tedit 0) (tstamp 597070C9)
- (at 156.556984 111.891491)
- (path /59420173/597095D0)
- (fp_text reference TP27 (at 0 0) (layer F.SilkS)
- (effects (font (thickness 0.15)))
- )
- (fp_text value TESTPOINT (at 0 0) (layer F.SilkS)
- (effects (font (thickness 0.15)))
- )
- (pad 1 smd circle (at 0 0) (size 1.016 1.016) (layers F.Cu F.Paste
F.Mask)
- (net 76 /external/JTAG_EMU0))
- )
-
- (module modules:TP_SMD1MMCIRCLE (layer F.Cu) (tedit 0) (tstamp 597070CE)
- (at 156.556984 114.571491)
- (path /59420173/59709620)
- (fp_text reference TP28 (at 0 0) (layer F.SilkS)
- (effects (font (thickness 0.15)))
- )
- (fp_text value TESTPOINT (at 0 0) (layer F.SilkS)
- (effects (font (thickness 0.15)))
- )
- (pad 1 smd circle (at 0 0) (size 1.016 1.016) (layers F.Cu F.Paste
F.Mask)
- (net 77 /external/JTAG_EMU1))
- )
-
   (module checked:SM-7351-CAP-0603 (layer F.Cu) (tedit 59530621) (tstamp
59709E1E)
     (at 70.716583 27.231301)
     (path /59420173/59733D6B)

Diff for netlist

@@ -1810,24 +1822,6 @@
       (libsource (lib device) (part R_Small))
       (sheetpath (names /external/) (tstamps /59420173/))
       (tstamp 597086E6))
- (comp (ref TP26)
- (value TESTPOINT)
- (footprint modules:TP_SMD1MMCIRCLE)
- (libsource (lib FTComms) (part TESTPOINT))
- (sheetpath (names /external/) (tstamps /59420173/))
- (tstamp 597093AB))
- (comp (ref TP27)
- (value TESTPOINT)
- (footprint modules:TP_SMD1MMCIRCLE)
- (libsource (lib FTComms) (part TESTPOINT))
- (sheetpath (names /external/) (tstamps /59420173/))
- (tstamp 597095D0))
- (comp (ref TP28)
- (value TESTPOINT)
- (footprint modules:TP_SMD1MMCIRCLE)
- (libsource (lib FTComms) (part TESTPOINT))
- (sheetpath (names /external/) (tstamps /59420173/))
- (tstamp 59709620))
     (comp (ref C206)
       (value "1uF 16V 10% X7R")
       (footprint checked:SM-7351-CAP-0603)

On Fri, Jul 21, 2017 at 7:39 PM, hauptmech <email address hidden> wrote:

> Encountered the crash again. It is caused by deleting extra footprints.
>
> On 20/07/17 23:43, Maciej Sumiński wrote:
>
>> Would it be possible to get the files that would allow us to reproduce
>> the crash?
>>
>>
>

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

There must be something more. I have just created a simple design to reproduce the crash and deleting extra footprint does not cause any problems, neither when updating by reloading netlist nor when using the single-click update.

If you cannot post the design publicly, may I receive it privately? It is hard to fix a problem when one cannot observe it.

Changed in kicad:
assignee: nobody → Maciej Sumiński (orsonmmz)
status: New → In Progress
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 6f8f6f18f60e721cf91ed7abe73c7d9617dd7b92
https://git.launchpad.net/kicad/patch/?id=6f8f6f18f60e721cf91ed7abe73c7d9617dd7b92

Changed in kicad:
status: In Progress → Fix Committed
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

Bug attachments

Remote bug watches

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