eeschema segfault on block select (2)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KiCad |
Fix Committed
|
Undecided
|
Jeff Young |
Bug Description
Sometimes doing a multiple selection eeschema crashes. The behaviour seems not-fully deterministic and depends on what I select on which schematic, so I suspect something related to memory management. Today it crashes every time on the same selection, so it is somewhat reproducible and I get:
From gdb:
Thread 1 "kicad" received signal SIGSEGV, Segmentation fault.
0x00007ffff42db930 in __dynamic_cast () from /usr/lib/
(gdb) backtrace
#0 0x00007ffff42db930 in __dynamic_cast () from /usr/lib/
#1 0x00007fffe0d455c1 in EE_SELECTION_
from /home/dinoghi/
#2 0x00007fffe0d4675c in EE_SELECTION_
from /home/dinoghi/
#3 0x00007fffe0f83f60 in COROUTINE<int, TOOL_EVENT const&>
from /home/dinoghi/
#4 0x00005555556d4b71 in make_fcontext ()
#5 0x0000000000000000 in ?? ()
using valgrind and starting eeschema on the same project
==27900== Memcheck, a memory error detector
==27900== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==27900== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info
==27900== Command: /home/dinoghi/
==27900==
==27900== Conditional jump or move depends on uninitialised value(s)
==27900== at 0x4C32EA6: rawmemchr (vg_replace_
==27900== by 0x91713C1: _IO_str_
==27900== by 0x9164B96: vsscanf (iovsscanf.c:40)
==27900== by 0x915F306: sscanf (sscanf.c:32)
==27900== by 0xE5E7E4A: ??? (in /usr/lib/
==27900== by 0xE5E8182: ??? (in /usr/lib/
==27900== by 0xE5EBBF8: drmGetDevice (in /usr/lib/
==27900== by 0x7A952D6: ??? (in /usr/lib/
==27900== by 0x7A94694: ??? (in /usr/lib/
==27900== by 0x7A68988: ??? (in /usr/lib/
==27900== by 0x7A63F10: glXQueryVersion (in /usr/lib/
==27900== by 0x4E47556: wxGLCanvasX11:
***Here eeschema is launched****
==27900==
==27900== Conditional jump or move depends on uninitialised value(s)
==27900== at 0x17A1A259: ??? (in /usr/lib/
==27900== by 0x17A1B047: ??? (in /usr/lib/
==27900== by 0x17A1B0F2: ??? (in /usr/lib/
==27900== by 0x17A17E09: ??? (in /usr/lib/
==27900== by 0x17A18F9A: ??? (in /usr/lib/
==27900== by 0x960B552: ??? (in /usr/lib/
==27900== by 0x95CB7BB: ??? (in /usr/lib/
==27900== by 0x9DA7ECE: g_closure_invoke (in /usr/lib/
==27900== by 0x9DBA37C: ??? (in /usr/lib/
==27900== by 0x9DC267E: g_signal_
==27900== by 0x9DC2FBE: g_signal_emit (in /usr/lib/
==27900== by 0x96E38AB: ??? (in /usr/lib/
==27900==
***Here the selection is done, selecting some wires, hierarchical pins and hierarchical labels. On gdb crashes here.***
==27900== Invalid read of size 8
==27900== at 0x1E4EB5A0: EE_SELECTION_
==27900== by 0x1E4EC75B: EE_SELECTION_
==27900== by 0x1E729F5F: COROUTINE<int, TOOL_EVENT const&>
==27900== by 0x288B70: make_fcontext (in /home/dinoghi/
==27900== Address 0x213c7870 is 16 bytes inside a block of size 1,024 free'd
==27900== at 0x4C2D2DB: operator delete(void*) (vg_replace_
==27900== by 0x1E4EDF21: void std::vector<
==27900== by 0x1E4EB648: EE_SELECTION_
==27900== by 0x1E4EC75B: EE_SELECTION_
==27900== by 0x1E729F5F: COROUTINE<int, TOOL_EVENT const&>
==27900== by 0x288B70: make_fcontext (in /home/dinoghi/
==27900== Block was alloc'd at
==27900== at 0x4C2C21F: operator new(unsigned long) (vg_replace_
==27900== by 0x1E4EDEAC: void std::vector<
==27900== by 0x1E6F41C1: bool RTree<KIGFX:
==27900== by 0x1E6F40ED: bool RTree<KIGFX:
==27900== by 0x1E6ECF9D: KIGFX::
==27900== by 0x1E4EB584: EE_SELECTION_
==27900== by 0x1E4EC75B: EE_SELECTION_
==27900== by 0x1E729F5F: COROUTINE<int, TOOL_EVENT const&>
==27900== by 0x288B70: make_fcontext (in /home/dinoghi/
==27900==
==27900== Invalid read of size 4
==27900== at 0x1E4EB5E2: EE_SELECTION_
==27900== by 0x1E4EC75B: EE_SELECTION_
==27900== by 0x1E729F5F: COROUTINE<int, TOOL_EVENT const&>
==27900== by 0x288B70: make_fcontext (in /home/dinoghi/
==27900== Address 0x213c7878 is 24 bytes inside a block of size 1,024 free'd
==27900== at 0x4C2D2DB: operator delete(void*) (vg_replace_
==27900== by 0x1E4EDF21: void std::vector<
==27900== by 0x1E4EB648: EE_SELECTION_
==27900== by 0x1E4EC75B: EE_SELECTION_
==27900== by 0x1E729F5F: COROUTINE<int, TOOL_EVENT const&>
==27900== by 0x288B70: make_fcontext (in /home/dinoghi/
==27900== Block was alloc'd at
==27900== at 0x4C2C21F: operator new(unsigned long) (vg_replace_
==27900== by 0x1E4EDEAC: void std::vector<
==27900== by 0x1E6F41C1: bool RTree<KIGFX:
==27900== by 0x1E6F40ED: bool RTree<KIGFX:
==27900== by 0x1E6ECF9D: KIGFX::
==27900== by 0x1E4EB584: EE_SELECTION_
==27900== by 0x1E4EC75B: EE_SELECTION_
==27900== by 0x1E729F5F: COROUTINE<int, TOOL_EVENT const&>
==27900== by 0x288B70: make_fcontext (in /home/dinoghi/
==27900==
*******
I tested this after a make clean, make -j7, so it should not be a dirty build .
Then closing eeschema and exiting
==27900== Process terminating with default action of signal 2 (SIGINT)
==27900== at 0x91DA8BD: ??? (syscall-
==27900== by 0xA7E59F5: ??? (in /lib/x86_
==27900== by 0xA7E5D81: g_main_loop_run (in /lib/x86_
==27900== by 0x95C93B6: gtk_main (in /usr/lib/
==27900== by 0x5C35E64: wxGUIEventLoop:
==27900== by 0x654827A: wxEventLoopBase
==27900== by 0x650D775: wxAppConsoleBas
==27900== by 0x1874F5: ??? (in /home/dinoghi/
==27900== by 0x6599CCF: wxEntry(int&, wchar_t**) (in /usr/lib/
==27900== by 0x163527: ??? (in /home/dinoghi/
==27900== by 0x911B2E0: (below main) (libc-start.c:291)
==27900==
==27900== HEAP SUMMARY:
==27900== in use at exit: 114,475,083 bytes in 286,457 blocks
==27900== total heap usage: 13,226,066 allocs, 12,939,609 frees, 24,634,071,740 bytes allocated
==27900==
==27900== LEAK SUMMARY:
==27900== definitely lost: 67,745,509 bytes in 1,825 blocks
==27900== indirectly lost: 381,369 bytes in 9,400 blocks
==27900== possibly lost: 1,197,853 bytes in 4,387 blocks
==27900== still reachable: 44,787,280 bytes in 268,178 blocks
==27900== of which reachable via heuristic:
==27900== length64 : 8,880 bytes in 135 blocks
==27900== newarray : 644,472 bytes in 864 blocks
==27900== suppressed: 0 bytes in 0 blocks
==27900== Rerun with --leak-check=full to see details of leaked memory
==27900==
==27900== For counts of detected and suppressed errors, rerun with: -v
==27900== Use --track-origins=yes to see where uninitialised values come from
==27900== ERROR SUMMARY: 275 errors from 5 contexts (suppressed: 0 from 0)
Cheers,
Dino.
-------
-------
Application: Eeschema
Version: (5.99.0-
Libraries:
wxWidgets 3.0.2
libcurl/7.52.1 OpenSSL/1.0.2s zlib/1.2.8 libidn2/0.16 libpsl/0.17.0 (+libidn2/0.16) libssh2/1.7.0 nghttp2/1.18.1 librtmp/2.3
Platform: Linux 4.9.0-8-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.2 (wchar_t,wx containers,
Boost: 1.69.0
OpenCASCADE Community Edition: 6.8.0
Curl: 7.52.1
Compiler: GCC 6.3.0 with C++ ABI 1010
Build settings:
KICAD_
KICAD_
KICAD_
KICAD_
KICAD_
KICAD_
BUILD_
KICAD_
KICAD_
KICAD_SPICE=ON
summary: |
- eeschema segfault on multiple selection + eeschema segfault on block select (2) |
Changed in kicad: | |
milestone: | none → 6.0.0-rc1 |
Note: selecting the same items in another way does not trigger the segfault (i.e.: instead of selecting with a single block, select using smaller blocks with ctrl pressed does not trigger the segfault)