kicad crash when search window is closed

Bug #1498997 reported by Felix Vollmer
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
High
Wayne Stambaugh

Bug Description

EEschema causes a seg fault for me, if I

1. add a new component to a schematic (I used ICM7209)
2. search for that component ("U?") (leave search window open!)
3. edit component, add new field with some value (like "Feld4", "test"), OK
4. Close search window
5. KiCad crashes for me

I'm using 4.0.0-0rc1.201509221601+6188~32~ubuntu15.04.1 from the ppa with ubuntu 15.04.

Here a backtrace (the debug symbols from "kicad-dbg" didn't work for me):

#0 0x00007ffff4d55766 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#1 0x00007fffd3adf718 in SCH_FIND_COLLECTOR::GetText (this=this@entry=0xc537f8)
    at /build/kicad-nW1Y8r/kicad-4.0.0/kicad/eeschema/sch_collectors.cpp:435
#2 0x00007fffd3a2d6b3 in SCH_EDIT_FRAME::updateFindReplaceView (this=this@entry=0xc52f20, aEvent=...)
    at /build/kicad-nW1Y8r/kicad-4.0.0/kicad/eeschema/find.cpp:463
#3 0x00007fffd3a2ef1b in SCH_EDIT_FRAME::OnFindSchematicItem (this=this@entry=0xc52f20, aEvent=...)
    at /build/kicad-nW1Y8r/kicad-4.0.0/kicad/eeschema/find.cpp:346
#4 0x00007fffd3b25770 in SCH_EDIT_FRAME::OnFindDialogClose (this=0xc52f20, event=...)
    at /build/kicad-nW1Y8r/kicad-4.0.0/kicad/eeschema/schframe.cpp:886
#5 0x00007ffff670871e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
    () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#6 0x00007ffff68a3f08 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#7 0x00007ffff68a400b in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#8 0x00007ffff68a43b8 in wxEvtHandler::TryHereOnly(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#9 0x00007fffd3bbb73c in EDA_BASE_FRAME::ProcessEvent (this=0xc52f20, aEvent=...)
    at /build/kicad-nW1Y8r/kicad-4.0.0/kicad/common/basicframe.cpp:164
#10 0x00007ffff68a41c3 in wxEvtHandler::DoTryChain(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#11 0x00007ffff68a44a5 in wxEvtHandler::ProcessEvent(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#12 0x00007fffd3a0533c in DIALOG_SCH_FIND::SendEvent (this=0x27f77b0, aEventType=<optimized out>)
    at /build/kicad-nW1Y8r/kicad-4.0.0/kicad/eeschema/dialogs/dialog_schematic_find.cpp:249
#13 0x00007ffff670871e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
    () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#14 0x00007ffff68a3f08 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#15 0x00007ffff68a42f6 in wxEvtHandler::SearchDynamicEventTable(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#16 0x00007ffff68a437e in wxEvtHandler::TryHereOnly(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#17 0x00007ffff68a4443 in wxEvtHandler::ProcessEventLocally(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#18 0x00007ffff68a44a5 in wxEvtHandler::ProcessEvent(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#19 0x00007ffff68a4217 in wxEvtHandler::SafelyProcessEvent(wxEvent&) ()
   from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#20 0x00007ffff7019dd7 in wxWindowBase::Close(bool) ()
   from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#21 0x00007ffff6df8114 in ?? () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#22 0x00007ffff5376d1f in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#23 0x00007ffff4d4c2d5 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007ffff4d5e03c in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#25 0x00007ffff4d661a5 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#26 0x00007ffff4d668ff in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#27 0x00007ffff548e61c in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#28 0x00007ffff5375a41 in gtk_main_do_event () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#29 0x00007ffff4fe8bac in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#30 0x00007ffff4606c3d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007ffff4606f20 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007ffff4607242 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007ffff5374857 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#34 0x00007ffff6dd9745 in wxGUIEventLoop::DoRun() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#35 0x00007ffff674e750 in wxEventLoopBase::Run() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#36 0x00007ffff670aa46 in wxAppConsoleBase::MainLoop() () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#37 0x00000000004427c9 in ?? ()
#38 0x00007ffff67a5660 in wxEntry(int&, wchar_t**) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#39 0x0000000000421a6e in ?? ()
#40 0x00007ffff58afa40 in __libc_start_main (main=0x421a40, argc=1, argv=0x7fffffffdb28,
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdb18)
    at libc-start.c:289
#41 0x0000000000425fd9 in _start ()

Related branches

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :
Download full text (9.9 KiB)

I can confirm this. It does not happen in *every* case, but happened for me on a new document.

Don't have time to go fixing this at the moment, but here is a backtrace with more info:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000021 in ?? ()
(gdb) bt full
#0 0x0000000000000021 in ?? ()
No symbol table info available.
#1 0x00007fffe72dd3c4 in SCH_FIND_COLLECTOR::GetText (this=0x7af1b8) at /home/cmp/git/kicad/eeschema/sch_collectors.cpp:433
        data = {m_position = {x = 5525, y = 4028}, m_sheetPath = {static npos = 18446744073709551615, m_impl = L"/", m_convertedToChar = {m_str = 0x0, m_len = 140737073960963}}, m_parent = 0x1763790}
        foundItem = 0x154c110
        msg = {static npos = 18446744073709551615, m_impl = L"", m_convertedToChar = {m_str = 0x0, m_len = 140737488340680}}
#2 0x00007fffe7241ad4 in SCH_EDIT_FRAME::updateFindReplaceView (this=0x7ae8e0, aEvent=...) at /home/cmp/git/kicad/eeschema/find.cpp:430
        sheet = 0x7fffffffc680
        item = 0x380
        msg = {static npos = 18446744073709551615, m_impl = L"", m_convertedToChar = {m_str = 0x0, m_len = 140737070429452}}
        schematic = {m_list = 0x737120, m_count = 1, m_index = 1, m_isRootSheet = true, m_currList = {m_sheets = {0x8371e0, 0x0 <repeats 31 times>}, m_numSheets = 0}}
        data = {m_position = {x = 5525, y = 4028}, m_sheetPath = {static npos = 18446744073709551615, m_impl = L"/", m_convertedToChar = {m_str = 0x0, m_len = 0}}, m_parent = 0x1763790}
        warpCursor = true
#3 0x00007fffe72417cb in SCH_EDIT_FRAME::OnFindSchematicItem (this=0x7ae8e0, aEvent=...) at /home/cmp/git/kicad/eeschema/find.cpp:346
        itemPosition = {x = 0, y = 0}
        schematic = {m_list = 0x831990, m_count = 1, m_index = 1, m_isRootSheet = true, m_currList = {m_sheets = {0x8371e0, 0x0 <repeats 31 times>}, m_numSheets = 0}}
        msg = {static npos = 18446744073709551615, m_impl = L"", m_convertedToChar = {m_str = 0x0, m_len = 9806416}}
        searchCriteria = {<wxFindReplaceData> = {<wxObject> = {<No data fields>}, m_Flags = 2227, m_FindWhat = {static npos = 18446744073709551615, m_impl = L"U?A", m_convertedToChar = {m_str = 0x0, m_len = 0}}, m_ReplaceWith = {
              static npos = 18446744073709551615, m_impl = L"", m_convertedToChar = {m_str = 0x0, m_len = 0}}}, <No data fields>}
        data = {m_position = {x = -1, y = -1}, m_sheetPath = {static npos = 18446744073709551615, m_impl = L"", m_convertedToChar = {m_str = 0x0, m_len = 1296236544}}, m_parent = 0x0}
#4 0x00007fffe7333592 in SCH_EDIT_FRAME::OnFindDialogClose (this=0x7ae8e0, event=...) at /home/cmp/git/kicad/eeschema/schframe.cpp:887
No locals.
#5 0x00007ffff631893e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/lib/libwx_baseu-3.0.so.0
No symbol table info available.
#6 0x00007ffff64b02e8 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
No symbol table info available.
#7 0x00007ffff64b03eb in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib/libwx_baseu-3.0.so.0
No symbol table info available.
#8 0x00007ffff...

Changed in kicad:
status: New → Confirmed
importance: Undecided → High
Changed in kicad:
assignee: nobody → Wayne Stambaugh (stambaughw)
status: Confirmed → Fix Committed
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

I committed a fix for this bug in the product branch r6217. Please test it an make sure that the problem is resolved.

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

I can confirm that this is fixed.

Jon Neal (reportingsjr)
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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