← Back to team overview

kicad-developers team mailing list archive

Assertion trip clicking 'navigate schematic'

 

Today bzr eeschema, opening the hierarchy box:

ASSERT INFO:
./src/generic/imaglist.cpp(69): assert "(bitmap.GetWidth() >= m_width &&
bitmap.GetHeight() == m_height) || (m_width == 0 && m_height == 0)"
failed in Add(): invalid bitmap size in wxImageList: this might work on
this platform but definitely won't under Windows.

BACKTRACE:
[1] HIERARCHY_TREE::HIERARCHY_TREE(HIERARCHY_NAVIG_DLG*)
[2] HIERARCHY_NAVIG_DLG::HIERARCHY_NAVIG_DLG(SCH_EDIT_FRAME*, wxDC*,
wxPoint const&)
[3] SCH_EDIT_FRAME::InstallHierarchyFrame(wxDC*, wxPoint&)
[4] SCH_EDIT_FRAME::Process_Special_Functions(wxCommandEvent&)
[5] wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&)
[6] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[7] wxEvtHandler::ProcessEvent(wxEvent&)
[8] EDA_BASE_FRAME::ProcessEvent(wxEvent&)
[9] wxEvtHandler::ProcessEvent(wxEvent&)
[10] wxWindowBase::TryParent(wxEvent&)
[11] wxAuiToolBar::OnLeftUp(wxMouseEvent&)
[12] wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&)
[13] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[14] wxEvtHandler::ProcessEvent(wxEvent&)
[15] g_closure_invoke()
[16] g_signal_emit_valist()
[17] g_signal_emit()
[18] gtk_propagate_event()
[19] gtk_main_do_event()
[20] g_main_context_dispatch()
[21] g_main_loop_run()
[22] gtk_main()

This is tripped twice when the bitmaps are added to the wxImageList in
the HIERARCHY_TREE constructor:

imageList->Add( KiBitmap( tree_nosel_xpm ) ); <<< HERE
imageList->Add( KiBitmap( tree_sel_xpm ) );   <<< AND HERE

I guess this is because the imagelist expects 16x15 images (putting 26,
26 as size makes it happy!)

There is another thing suspicious a little later in the same file:

#ifdef __UNIX__
    itemrect.SetWidth( 100 );
    itemrect.SetHeight( 20 );
#else
    m_Tree->GetBoundingRect( cellule, itemrect );
#endif

This would probably break changing font size (and why is it needed
a different code path?)

-- 
Lorenzo Marcantonio
Logos Srl