Segmentation Fault when editing a Footprint

Bug #1795281 reported by Leandro Heck
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
Unassigned

Bug Description

I am improving a footprint and I just received a segfault when deleting a line segment.

Last lines of the output running it with GDB:

Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
_int_malloc (av=av@entry=0x7ffff5b4dc40 <main_arena>, bytes=bytes@entry=64) at malloc.c:3675
3675 malloc.c: No such file or directory.
(gdb)

================

Application: kicad
Version: 6.0.0-rc1-unknown-ef6f7e9~84~ubuntu18.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-25-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.58.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Tags: pcbnew
Revision history for this message
Nick Østergaard (nickoe) wrote :

Please type 'bt' in gdb tp get the actual backtrace.

tags: added: pcbnew
Changed in kicad:
importance: Undecided → Critical
milestone: none → 6.0.0-rc1
Revision history for this message
Leandro Heck (leoheck) wrote :

Footprints failing were generated by importing a .dxf file.

I'm working with grids now, so I was replacing multiples segment lines by a single one and round corners to clean the footprint. I am adding the footprint I am editing, attached here. Segments were already replaced using Kicad 5. But the segfault persists in version 6.

Here is the output of the (gdb) bt as requested.

Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
__GI___libc_free (mem=0x55ff59e35de0) at malloc.c:3103
3103 malloc.c: No such file or directory.
(gdb) bt
#0 0x00007ffff57f998d in __GI___libc_free (mem=0x55ff59e35de0) at malloc.c:3103
#1 0x00007fffe088ea52 in () at /usr/lib/kicad-nightly/bin/_pcbnew.kiface
#2 0x00007fffe0e15e1e in () at /usr/lib/kicad-nightly/bin/_pcbnew.kiface
#3 0x00007fffe0e1942d in () at /usr/lib/kicad-nightly/bin/_pcbnew.kiface
#4 0x00007fffe0e1ae90 in () at /usr/lib/kicad-nightly/bin/_pcbnew.kiface
#5 0x00007fffe0e1b153 in () at /usr/lib/kicad-nightly/bin/_pcbnew.kiface
#6 0x00007fffe0b4ee3e in () at /usr/lib/kicad-nightly/bin/_pcbnew.kiface
#7 0x00007fffe084a960 in () at /usr/lib/kicad-nightly/bin/_pcbnew.kiface
#8 0x00007fffe0e1c870 in () at /usr/lib/kicad-nightly/bin/_pcbnew.kiface
#9 0x00007fffe0e7ab41 in make_fcontext () at /usr/lib/kicad-nightly/bin/_pcbnew.kiface
#10 0x0000000000000000 in ()
(gdb)

Revision history for this message
Seth Hillbrand (sethh) wrote :

Can confirm this issue on master. Does not occur with 5.0.1

Changed in kicad:
milestone: 6.0.0-rc1 → 5.1.0
status: New → Triaged
Revision history for this message
Leandro Heck (leoheck) wrote : Re: [Bug 1795281] Re: Segmentation Fault when editing a Footprint

Agree, 5.0.1 is safe! I was using it after I found that version 6.0 had
this problem.

--
Leandro Heck

On Mon, Oct 1, 2018 at 10:30 AM Seth Hillbrand <email address hidden>
wrote:

> Can confirm this issue on master. Does not occur with 5.0.1
>
> ** Changed in: kicad
> Milestone: 6.0.0-rc1 => 5.1.0
>
> ** Changed in: kicad
> Status: New => Triaged
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1795281
>
> Title:
> Segmentation Fault when editing a Footprint
>
> Status in KiCad:
> Triaged
>
> Bug description:
> I am improving a footprint and I just received a segfault when
> deleting a line segment.
>
>
> Last lines of the output running it with GDB:
>
> Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
> _int_malloc (av=av@entry=0x7ffff5b4dc40 <main_arena>, bytes=bytes@entry=64)
> at malloc.c:3675
> 3675 malloc.c: No such file or directory.
> (gdb)
>
> ================
>
> Application: kicad
> Version: 6.0.0-rc1-unknown-ef6f7e9~84~ubuntu18.04.1, release build
> Libraries:
> wxWidgets 3.0.4
> libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4
> libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
> Platform: Linux 4.15.0-25-generic x86_64, 64 bit, Little endian, wxGTK
> Build Info:
> wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+
> 2.24
> Boost: 1.65.1
> OpenCASCADE Community Edition: 6.9.1
> Curl: 7.58.0
> Compiler: GCC 7.3.0 with C++ ABI 1011
>
> Build settings:
> USE_WX_GRAPHICS_CONTEXT=OFF
> USE_WX_OVERLAY=OFF
> KICAD_SCRIPTING=ON
> KICAD_SCRIPTING_MODULES=ON
> KICAD_SCRIPTING_WXPYTHON=OFF
> KICAD_SCRIPTING_ACTION_MENU=ON
> BUILD_GITHUB_PLUGIN=ON
> KICAD_USE_OCE=ON
> KICAD_USE_OCC=OFF
> KICAD_SPICE=ON
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1795281/+subscriptions
>

Revision history for this message
Jeff Young (jeyjey) wrote :

@Seth, is this GTK-specific (or footprint-specific)? I can't reproduce it on OSX (on master).

Revision history for this message
Seth Hillbrand (sethh) wrote :

I'll have a look

Changed in kicad:
assignee: nobody → Seth Hillbrand (sethh)
Revision history for this message
Seth Hillbrand (sethh) wrote :

Hmmm, does not reproduce anymore. Maybe your recent fix got it?

@Leandro- can you confirm it is fixed for you as well?

Revision history for this message
Jeff Young (jeyjey) wrote :

D'oh. Yes, this is the reading-freed-memory bug. Sorry I didn't recognize it earlier.

Seth Hillbrand (sethh)
Changed in kicad:
assignee: Seth Hillbrand (sethh) → nobody
status: Triaged → Fix Committed
Revision history for this message
Leandro Heck (leoheck) wrote :

I couldn't even answer it. You were fast, awesome guys.

On Mon, Oct 1, 2018, 20:20 Seth Hillbrand <email address hidden>
wrote:

> ** Changed in: kicad
> Assignee: Seth Hillbrand (sethh) => (unassigned)
>
> ** Changed in: kicad
> Status: Triaged => Fix Committed
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1795281
>
> Title:
> Segmentation Fault when editing a Footprint
>
> Status in KiCad:
> Fix Committed
>
> Bug description:
> I am improving a footprint and I just received a segfault when
> deleting a line segment.
>
>
> Last lines of the output running it with GDB:
>
> Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
> _int_malloc (av=av@entry=0x7ffff5b4dc40 <main_arena>, bytes=bytes@entry=64)
> at malloc.c:3675
> 3675 malloc.c: No such file or directory.
> (gdb)
>
> ================
>
> Application: kicad
> Version: 6.0.0-rc1-unknown-ef6f7e9~84~ubuntu18.04.1, release build
> Libraries:
> wxWidgets 3.0.4
> libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4
> libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
> Platform: Linux 4.15.0-25-generic x86_64, 64 bit, Little endian, wxGTK
> Build Info:
> wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+
> 2.24
> Boost: 1.65.1
> OpenCASCADE Community Edition: 6.9.1
> Curl: 7.58.0
> Compiler: GCC 7.3.0 with C++ ABI 1011
>
> Build settings:
> USE_WX_GRAPHICS_CONTEXT=OFF
> USE_WX_OVERLAY=OFF
> KICAD_SCRIPTING=ON
> KICAD_SCRIPTING_MODULES=ON
> KICAD_SCRIPTING_WXPYTHON=OFF
> KICAD_SCRIPTING_ACTION_MENU=ON
> BUILD_GITHUB_PLUGIN=ON
> KICAD_USE_OCE=ON
> KICAD_USE_OCC=OFF
> KICAD_SPICE=ON
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1795281/+subscriptions
>

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.