EESchema crashes on new library save

Bug #1362580 reported by Konstantin
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
Unassigned

Bug Description

Latest build from source repo.

Steps to reproduce:

1) Open library editor.
2) Create new component with any name.
3) "Save component to new library" or "Export component", select any file name
4) Segfault

Backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00007fffe1048adc in PART_LIB::Save (this=0x0, aFormatter=...) at /home/kosyak/Downloads/kicad-source-mirror-master/eeschema/class_library.cpp:669
669 if( isModified )
(gdb) bt
#0 0x00007fffe1048adc in PART_LIB::Save (this=0x0, aFormatter=...) at /home/kosyak/Downloads/kicad-source-mirror-master/eeschema/class_library.cpp:669
#1 0x00007fffe111ac21 in LIB_EDIT_FRAME::OnExportPart (this=0xb549e0, event=...) at /home/kosyak/Downloads/kicad-source-mirror-master/eeschema/lib_export.cpp:139
#2 0x00007ffff62a0f5e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/lib/libwx_baseu-3.0.so.0
#3 0x00007ffff643df08 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#4 0x00007ffff643e00b in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib/libwx_baseu-3.0.so.0
#5 0x00007ffff643e3b8 in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#6 0x00007fffe11edb93 in EDA_BASE_FRAME::ProcessEvent (this=0xb549e0, aEvent=...) at /home/kosyak/Downloads/kicad-source-mirror-master/common/basicframe.cpp:131
#7 0x00007ffff643e1c3 in wxEvtHandler::DoTryChain(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#8 0x00007ffff643e4a5 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#9 0x00007ffff6e093e8 in wxWindowBase::TryAfter(wxEvent&) () from /usr/lib/libwx_gtk2u_core-3.0.so.0
#10 0x00007ffff798d858 in wxAuiToolBar::OnLeftUp(wxMouseEvent&) () from /usr/lib/libwx_gtk2u_aui-3.0.so.0
#11 0x00007ffff62a0f5e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/lib/libwx_baseu-3.0.so.0
#12 0x00007ffff643df08 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#13 0x00007ffff643e00b in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib/libwx_baseu-3.0.so.0
#14 0x00007ffff643e3b8 in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#15 0x00007ffff643e443 in wxEvtHandler::ProcessEventLocally(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#16 0x00007ffff643e4a5 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#17 0x00007ffff643e217 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#18 0x00007ffff6c05f62 in ?? () from /usr/lib/libwx_gtk2u_core-3.0.so.0
#19 0x00007ffff4b038bf in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#20 0x00007ffff44dd3d8 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#21 0x00007ffff44eed5d in ?? () from /usr/lib/libgobject-2.0.so.0
#22 0x00007ffff44f6719 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#23 0x00007ffff44f6d02 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#24 0x00007ffff4c1aaac in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#25 0x00007ffff4b02004 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#26 0x00007ffff4b0249b in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#27 0x00007ffff4777e4c in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#28 0x00007ffff370fb84 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#29 0x00007ffff370fdc8 in ?? () from /usr/lib/libglib-2.0.so.0
#30 0x00007ffff371008a in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#31 0x00007ffff4b01417 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#32 0x00007ffff6bd8f55 in wxGUIEventLoop::DoRun() () from /usr/lib/libwx_gtk2u_core-3.0.so.0
#33 0x00007ffff62e6cd0 in wxEventLoopBase::Run() () from /usr/lib/libwx_baseu-3.0.so.0
#34 0x00007ffff62a3306 in wxAppConsoleBase::MainLoop() () from /usr/lib/libwx_baseu-3.0.so.0
#35 0x000000000046d8b2 in APP_KICAD::OnRun (this=0x7d2480) at /home/kosyak/Downloads/kicad-source-mirror-master/kicad/kicad.cpp:261
#36 0x00007ffff633e55d in wxEntry(int&, wchar_t**) () from /usr/lib/libwx_baseu-3.0.so.0
#37 0x000000000046bc1e in main (argc=1, argv=0x7fffffffe6e8) at /home/kosyak/Downloads/kicad-source-mirror-master/kicad/kicad.cpp:293

this=0x0 in PART_LIB::Save looks very suspicious.

ArchLinux x86_64, gcc 4.9.1, wxgtk 3.0.1, latest (at 28.08.2014) kicad from repo

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

Don't just say latest, specify the revision.

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

Seems liek it was introduced in 5072, where it segfaults for me. 5071 did not segfault.

Version: (2014-08-13 BZR 5072)-kicad Release build
wxWidgets: Version 3.0.1 (debug,wchar_t,compiler with C++ ABI 1002,GCC 4.9.1,wx containers,compatible with 2.8)
Platform: Linux 3.16.1-1-ARCH x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.55.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

Changed in kicad:
importance: Undecided → High
importance: High → Critical
Revision history for this message
jean-pierre charras (jp-charras) wrote :

Some fixes are made in rev 5101. Please try it.

Changed in kicad:
status: New → Incomplete
Revision history for this message
Nick Østergaard (nickoe) wrote :

Hi Jean-Pierre, sorry for not noting, but I also did try with Version: (2014-08-26 BZR 5101)-kicad Release build and it still segfaults. I can try to build a Debug build if needed.

Can you not replicate?

Revision history for this message
jean-pierre charras (jp-charras) wrote :

OK. I am now able to reproduce this crash.

Changed in kicad:
status: Incomplete → Confirmed
Changed in kicad:
status: Confirmed → Fix Committed
Revision history for this message
Nick Østergaard (nickoe) wrote :

I confirm it is fixed now.

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.

Other bug subscribers

Remote bug watches

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