eeschema undo: corrupted schematic when undoing hierarchical pin operations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KiCad |
Fix Committed
|
Critical
|
Jeff Young |
Bug Description
When undoing some operations on hierarchical pin of a sheet, some lines from buses from another page appear on the sheet then, exiting eeschema it segfaults.
To reproduce:
-Open the attached project.
-"Import a hierarchical sheet pin" from the sheet in the main page, import all five of them.
-Undo once. See the whole sheet when undoing: some bus lines appear (in the same position as they hare in the child sheet).
May be is related to bug Bug #1844620, where the problem was also on the undo system, but this is just an hypothesis.
Tested on master branch, commit d17cef95fde0318
Stable version seems to not have the issue (tested on 5.1.2 and 5.1.4)
I've seen this issue also some months ago, but I was not able to reproduce it in a deterministic way, but on this project seems to be deterministic (on my machine).
Application: Eeschema
Version: (5.99.0-
Libraries:
wxWidgets 3.0.2
libcurl/7.52.1 GnuTLS/3.5.8 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:
Build date: Oct 1 2019 19:07:40
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
Note: The build is "dirty" since I'm using a patch that shows a better netname in pcbnew, so the code of eeschema is "clean" (patch from wishlist bug #1842906).
Changed in kicad: | |
assignee: | nobody → Jeff Young (jeyjey) |
importance: | High → Critical |
status: | Triaged → In Progress |
After the first undo (and having those two bus lines on the sheet), if you exit eeschema you get a segfault (don't save exiting):
gdb output:
Thread 1 "kicad" received signal SIGSEGV, Segmentation fault. ITEMS_LIST: :ClearListAndDe leteItems( ) () from /home/dinoghi/ SANDBOXKICAD5/ usr/bin/ _eeschema. kiface :ClearUndoORRed oList(UNDO_ REDO_CONTAINER& , int) () from /home/dinoghi/ SANDBOXKICAD5/ usr/bin/ _eeschema. kiface :~SCH_SCREEN( ) () from /home/dinoghi/ SANDBOXKICAD5/ usr/bin/ _eeschema. kiface :~SCH_SHEET( ) () from /home/dinoghi/ SANDBOXKICAD5/ usr/bin/ _eeschema. kiface FRAME:: ~SCH_EDIT_ FRAME() () from /home/dinoghi/ SANDBOXKICAD5/ usr/bin/ _eeschema. kiface FRAME:: ~SCH_EDIT_ FRAME() () from /home/dinoghi/ SANDBOXKICAD5/ usr/bin/ _eeschema. kiface e::DeletePendin gObjects( ) () from /usr/lib/ x86_64- linux-gnu/ libwx_baseu- 3.0.so. 0 e::ProcessIdle( ) () from /usr/lib/ x86_64- linux-gnu/ libwx_baseu- 3.0.so. 0 :ProcessIdle( ) () from /usr/lib/ x86_64- linux-gnu/ libwx_gtk2u_ core-3. 0.so.0 x86_64- linux-gnu/ libwx_gtk2u_ core-3. 0.so.0 x86_64- linux-gnu/ libwx_gtk2u_ core-3. 0.so.0 context_ dispatch () from /lib/x86_ 64-linux- gnu/libglib- 2.0.so. 0 64-linux- gnu/libglib- 2.0.so. 0 64-linux- gnu/libglib- 2.0.so. 0 x86_64- linux-gnu/ libgtk- x11-2.0. so.0 :DoRun( ) () from /usr/lib/ x86_64- linux-gnu/ libwx_gtk2u_ core-3. 0.so.0 ::Run() () from /usr/lib/ x86_64- linux-gnu/ libwx_baseu- 3.0.so. 0 e::MainLoop( ) () from /usr/lib/ x86_64- linux-gnu/ libwx_baseu- 3.0.so. 0 x86_64- linux-gnu/ libwx_baseu- 3.0.so. 0 af540, argc=1, argv=0x7fffffff e178, init=<optimized out>, fini=<optimized out>, fini=<optimized out>, stack_end= 0x7fffffffe168) at ../csu/ libc-start. c:291
0x0000000000000151 in ?? ()
(gdb) backtrace
#0 0x0000000000000151 in ?? ()
#1 0x00007fffe13453c9 in PICKED_
#2 0x00007fffe10e8358 in SCH_SCREEN:
#3 0x00007fffe10ead7f in SCH_SCREEN:
#4 0x00007fffe10efaee in SCH_SHEET:
#5 0x00007fffe11167b2 in SCH_EDIT_
#6 0x00007fffe1116ab9 in SCH_EDIT_
#7 0x00007ffff6344732 in wxAppConsoleBas
#8 0x00007ffff63447b1 in wxAppConsoleBas
#9 0x00007ffff6d15191 in wxAppBase:
#10 0x00007ffff6c21e16 in wxApp::DoIdle() () from /usr/lib/
#11 0x00007ffff6c21ef3 in ?? () from /usr/lib/
#12 0x00007ffff21ad6aa in g_main_
#13 0x00007ffff21ada60 in ?? () from /lib/x86_
#14 0x00007ffff21add82 in g_main_loop_run () from /lib/x86_
#15 0x00007ffff325e3b7 in gtk_main () from /usr/lib/
#16 0x00007ffff6c41e65 in wxGUIEventLoop:
#17 0x00007ffff638627b in wxEventLoopBase
#18 0x00007ffff634b776 in wxAppConsoleBas
#19 0x00005555555d3536 in ?? ()
#20 0x00007ffff63d7cd0 in wxEntry(int&, wchar_t**) () from /usr/lib/
#21 0x00005555555af568 in ?? ()
#22 0x00007ffff37982e1 in __libc_start_main (main=0x5555555
rtld_
#23 0x00005555555bac8a in _start ()