Assertion when saving eeschema preferences

Bug #1450795 reported by Berk Akinci
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Medium
Stefan

Bug Description

To reproduce:
- Generate a custom page layout
- Open empty project and eeschema
- Open Page settings dialog
- Browse for or enter a page layout description file path
- Click OK

Some variations:
I tried to use an absolute or relative path with same result.
I wondered if the page layout should be in my library search path so I could omit the path, that didn't work.

Workaround:
Click "Continue" on assertion.
Save project on next dialog after assertion.
Save schematic.
It seems to work fine for me.

Platform: Fedora 20.
Linux xxxx 3.19.5-100.fc20.x86_64 #1 SMP Mon Apr 20 19:51:16 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Kicad version:
Product, nightly build 5634
from: https://copr.fedoraproject.org/coprs/mangelajo/kicad/

Application: kicad
Version: (after 2015-apr-15 BZR unknown)-product Debug build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1002,GCC 4.8.3,wx containers,compatible with 2.8)
Platform: Linux 3.19.5-100.fc20.x86_64 x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.54.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

ASSERT INFO:
./src/common/filename.cpp(568): assert "volDummy.empty() && pathDummy.empty()" failed in Assign(): the file name shouldn't contain the path

BACKTRACE:
[1] wxFileName::Assign(wxString const&, wxString const&, wxPathFormat)
[2] wxFileDialog::Create(wxWindow*, wxString const&, wxString const&, wxString const&, wxString const&, long, wxPoint const&, wxSize const&, wxString const&)
[3] wxFileDialog::wxFileDialog(wxWindow*, wxString const&, wxString const&, wxString const&, wxString const&, long, wxPoint const&, wxSize const&, wxString const&)
[4] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[5] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[6] wxEvtHandler::SearchDynamicEventTable(wxEvent&)
[7] wxEvtHandler::TryHereOnly(wxEvent&)
[8] wxEvtHandler::ProcessEventLocally(wxEvent&)
[9] wxEvtHandler::ProcessEvent(wxEvent&)
[10] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[11] g_signal_emit_valist
[12] g_signal_emit
[13] g_closure_invoke
[14] g_signal_emit_valist
[15] g_signal_emit
[16] g_closure_invoke
[17] g_signal_emit_valist
[18] g_signal_emit
[19] gtk_propagate_event
[20] gtk_main_do_event
[21] g_main_context_dispatch
[22] g_main_loop_run
[23] gtk_main
[24] wxGUIEventLoop::DoRun()
[25] wxEventLoopBase::Run()
[26] wxDialog::ShowModal()
[27] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[28] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[29] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[30] wxEvtHandler::TryHereOnly(wxEvent&)
[31] wxEvtHandler::DoTryChain(wxEvent&)
[32] wxEvtHandler::ProcessEvent(wxEvent&)
[33] wxWindowBase::TryAfter(wxEvent&)
[34] wxAuiToolBar::OnLeftUp(wxMouseEvent&)
[35] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[36] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[37] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[38] wxEvtHandler::TryHereOnly(wxEvent&)
[39] wxEvtHandler::ProcessEventLocally(wxEvent&)
[40] wxEvtHandler::ProcessEvent(wxEvent&)
[41] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[42] g_closure_invoke
[43] g_signal_emit_valist
[44] g_signal_emit
[45] gtk_propagate_event
[46] gtk_main_do_event
[47] g_main_context_dispatch
[48] g_main_loop_run
[49] gtk_main
[50] wxGUIEventLoop::DoRun()
[51] wxEventLoopBase::Run()
[52] wxAppConsoleBase::MainLoop()
[53] int wxString::Printf<wchar_t const*>(wxFormatString const&, wchar_t const*)
[54] wxEntry(int&, wchar_t**)
[55] __libc_start_main
[56] _start

Tags: assert

Related branches

Revision history for this message
Berk Akinci (berka) wrote :

Same or similar message shows up in eeschema when I click Preferences -> Save Preferences

ASSERT INFO:
./src/common/filename.cpp(568): assert "volDummy.empty() && pathDummy.empty()" failed in Assign(): the file name shouldn't contain the path

BACKTRACE:
[1] wxFileName::Assign(wxString const&, wxString const&, wxPathFormat)
[2] wxFileDialog::Create(wxWindow*, wxString const&, wxString const&, wxString const&, wxString const&, long, wxPoint const&, wxSize const&, wxString const&)
[3] wxFileDialog::wxFileDialog(wxWindow*, wxString const&, wxString const&, wxString const&, wxString const&, long, wxPoint const&, wxSize const&, wxString const&)
[4] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[5] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[6] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[7] wxEvtHandler::TryHereOnly(wxEvent&)
[8] wxEvtHandler::DoTryChain(wxEvent&)
[9] wxEvtHandler::ProcessEvent(wxEvent&)
[10] wxWindowBase::TryAfter(wxEvent&)
[11] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[12] wxMenuBase::SendEvent(int, int)
[13] g_closure_invoke
[14] g_signal_emit_valist
[15] g_signal_emit
[16] gtk_widget_activate
[17] gtk_menu_shell_activate_item
[18] g_closure_invoke
[19] g_signal_emit_valist
[20] g_signal_emit
[21] gtk_propagate_event
[22] gtk_main_do_event
[23] g_main_context_dispatch
[24] g_main_loop_run
[25] gtk_main
[26] wxGUIEventLoop::DoRun()
[27] wxEventLoopBase::Run()
[28] wxAppConsoleBase::MainLoop()
[29] int wxString::Printf<wchar_t const*>(wxFormatString const&, wchar_t const*)
[30] wxEntry(int&, wchar_t**)
[31] __libc_start_main
[32] _start

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

I cannot reproduce this issue.

Revision history for this message
Berk Akinci (berka) wrote :

Interesting. I suspect the assert is coming from the project save dialog box rather than the page layout. So I tried simplifying:
I went back to create a brand new project (no template).
I opened eeschema; OK'd the dialog box for generating new schematic
I clicked on preferences->Save Preferences.
I get same?/similar assert (below).

Again, this is with change 5634. i will be updating in a few days to the nightly; I can check again then.

Full path of the file name, if it matters, is:
/homes/bakinci/KiCad/Test/TestPathAssert/TestPathAssert.pro

ASSERT INFO:
./src/common/filename.cpp(568): assert "volDummy.empty() && pathDummy.empty()" failed in Assign(): the file name shouldn't contain the path

BACKTRACE:
[1] wxFileName::Assign(wxString const&, wxString const&, wxPathFormat)
[2] wxFileDialog::Create(wxWindow*, wxString const&, wxString const&, wxString const&, wxString const&, long, wxPoint const&, wxSize const&, wxString const&)
[3] wxFileDialog::wxFileDialog(wxWindow*, wxString const&, wxString const&, wxString const&, wxString const&, long, wxPoint const&, wxSize const&, wxString const&)
[4] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[5] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[6] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[7] wxEvtHandler::TryHereOnly(wxEvent&)
[8] wxEvtHandler::DoTryChain(wxEvent&)
[9] wxEvtHandler::ProcessEvent(wxEvent&)
[10] wxWindowBase::TryAfter(wxEvent&)
[11] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[12] wxMenuBase::SendEvent(int, int)
[13] g_closure_invoke
[14] g_signal_emit_valist
[15] g_signal_emit
[16] gtk_widget_activate
[17] gtk_menu_shell_activate_item
[18] g_closure_invoke
[19] g_signal_emit_valist
[20] g_signal_emit
[21] gtk_propagate_event
[22] gtk_main_do_event
[23] g_main_context_dispatch
[24] g_main_loop_run
[25] gtk_main
[26] wxGUIEventLoop::DoRun()
[27] wxEventLoopBase::Run()
[28] wxAppConsoleBase::MainLoop()
[29] int wxString::Printf<wchar_t const*>(wxFormatString const&, wchar_t const*)
[30] wxEntry(int&, wchar_t**)
[31] __libc_start_main
[32] _start

Revision history for this message
Berk Akinci (berka) wrote :

I was able to reproduce after an update (on kicad.x86_64 5649-nightlies.fc20)
I used the more recent, simpler method.

summary: - Assertion when entering page layout description file
+ Assertion when saving eeschema preferences
Stefan (stol)
Changed in kicad:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → Stefan (stol)
Revision history for this message
Stefan (stol) wrote :

Hi

This can be confirmed in version (2015-09-28)

The error is due to a swap of the parameters (and wrong usage of wxFileName functions to wxFileDialog at line 493 in eechema_config.cpp

Here is a patch fixing the issue

bzr push lp:~stol/kicad/bug1450795
Using default stacking branch /+branch-id/324654 at chroot-76317328:///~stol/kicad/
Created new stacked branch referring to /+branch-id/324654.

Revision history for this message
xzcvczx (xzcvczx) wrote :

As far as i can see the patch has been merged, So closing as released

Changed in kicad:
status: Confirmed → 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.