Opened 6 years ago

Closed 5 years ago

#301 closed defect (fixed)

Failing wx assertion in the new PluginManager dialog

Reported by: tsee Owned by:
Priority: major Milestone:
Component: editor Version: 0.34
Keywords: Cc:

Description

wxWidgets comes with all sorts of assertions that are only visible in the debugging build. We should pay attention to them. I fixed a few failing assertions the other day, but there's still some left in the new PluginManager? dialog that I couldn't fix yet:

It all comes down to having ImageLists? with a certain size and putting images (err, icons or bitmaps or whatever) into it that have the wrong dimensions. I still don't know why the assertion is like follows, but it seems the height needs to be exactly the same as that of the imagelist and the width needs to be smaller or equal (see below). Maybe one can make this flexible by setting the width or height to zero as hinted at below. Since this is fixable at the perl (or gimp) level by others, I have to leave it at that for now. Sorry.

When opening the dialog, you get this popup:
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] wxGenericImageList::Add(wxBitmap const&)
[2] wxGenericImageList::Add(wxBitmap const&, wxBitmap const&)
[3] XS_WxImageList_AddBitmap()
[4] Perl_pp_entersub() /home/tsee/bleadperl/perl5.10-ssh/pp_hot.c:2891
[5] Perl_runops_debug() /home/tsee/bleadperl/perl5.10-ssh/dump.c:1968
[6] Perl_call_sv() /home/tsee/bleadperl/perl5.10-ssh/perl.c:2704
[7] XS_Wx
ImageList_Add()
[8] Perl_pp_entersub() /home/tsee/bleadperl/perl5.10-ssh/pp_hot.c:2891
[9] Perl_runops_debug() /home/tsee/bleadperl/perl5.10-ssh/dump.c:1968
[10] Perl_call_sv() /home/tsee/bleadperl/perl5.10-ssh/perl.c:2719
[11] wxPliEventCallback::Handler(wxEvent&)
[12] wxAppConsole::HandleEvent?(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) cons)
[13] wxEvtHandler::ProcessEventIfMatches?(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[14] wxEvtHandler::SearchDynamicEventTable?(wxEvent&)
[15] wxEvtHandler::ProcessEvent?(wxEvent&)
[16] wxEvtHandler::ProcessEvent?(wxEvent&)
[17] g_closure_invoke()
[18] g_signal_emit_valist()
[19] g_signal_emit()
[20] gtk_widget_activate()
[21] gtk_menu_shell_activate_item()
[22] g_closure_invoke()
[23] g_signal_emit_valist()
[24] g_signal_emit()
[25] gtk_propagate_event()
[26] gtk_main_do_event()
[27] g_main_context_dispatch()
[28] g_main_loop_run()
[29] gtk_main()
[30] wxEventLoop::Run()
[31] wxAppBase::MainLoop?()
[32] wxPliApp::MainLoop?()
[33] XS_WxApp_MainLoop()

Change History (3)

comment:1 Changed 6 years ago by tsee

Instructions on how to set up the whole Padre chain of dependencies starting with perl for debugging can be found in the Padre "hacking" manual.

comment:2 Changed 5 years ago by jquelin

i built a debugging perl...

the following patch does not work (still the same error):

Index: lib/Padre/Wx/Dialog/PluginManager.pm
===================================================================
--- lib/Padre/Wx/Dialog/PluginManager.pm (révision 4332)
+++ lib/Padre/Wx/Dialog/PluginManager.pm (copie de travail)
@@ -237,7 +237,7 @@

Wx::Event::EVT_LIST_COL_CLICK( $self, $list, \&_on_list_col_click );

# create imagelist

+ my $imglist = Wx::ImageList?->new( 0, 0 );

$list->AssignImageList?( $imglist, Wx::wxIMAGE_LIST_SMALL );
$self->_imagelist($imglist);

==> i guess i'll have to fire gimp and change the size to 16x16 for the status icons.

comment:3 Changed 5 years ago by jquelin

  • Resolution set to fixed
  • Status changed from new to closed

plugin status icons reshaped to be 16x16, effectively quieting the assertion failure.

fixed in r4337

Note: See TracTickets for help on using tickets.