Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid bitmap size in wxImageList assert fired #971

BentleyJOakes opened this issue Dec 26, 2016 · 2 comments

Invalid bitmap size in wxImageList assert fired #971

BentleyJOakes opened this issue Dec 26, 2016 · 2 comments


Copy link

@BentleyJOakes BentleyJOakes commented Dec 26, 2016

  • Check OS
    • Windows
    • Mac OSX
    • Linux
  • Check MMEX version
  • 1.3.x

This assertion is seen in Issue #917 and #957 for Arch Linux systems.
I believe this is caused by the pie_chart_png.h file only having 12 pixels for the height, instead of 16 pixels as requested by the icon size.

Assertion is fired from wxWidgets
`ASSERT INFO: ./src/generic/imaglist.cpp(66): 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.
[1] wxGenericImageList::Add(wxBitmap const&)

In moneymanagerex/src/images_list.cpp, add printf("Height: %d Width:%d\n", img.second.GetHeight(), img.second.GetWidth()); to line 170. The height for the pie chart entry in navtree_images() will be 12

Change line 113 in moneymanagerex/src/images_list.cpp to have png::BUDGET at the end.

Have a check at line 170 to check that the icon height and width matches the required icon size. Otherwise, an empty or debug icon should be displayed.

Copy link

@vomikan vomikan commented Dec 26, 2016

wxImageList* navtree_images_list()
    int x = Option::instance().IconSize();
    wxImageList* imageList = new wxImageList(x, x);
    for (const auto& img : navtree_images()) {
        wxLogDebug("%i | Height: %d Width:%d\n",img.first, img.second.GetHeight(), img.second.GetWidth());
    for (const auto& img : acc_images()) {
        wxLogDebug("%i | Height: %d Width:%d\n", img.first, img.second.GetHeight(), img.second.GetWidth());

    return imageList;

3 | Height: 12 Width:16
It's mean that png::PIE_CHART has incorrect size

@vomikan vomikan self-assigned this Dec 26, 2016
@vomikan vomikan added the bug label Dec 26, 2016
@vomikan vomikan added this to the v1.3 milestone Dec 26, 2016
stef145g added a commit that referenced this issue Dec 27, 2016
stef145g added a commit that referenced this issue Dec 28, 2016
@vomikan vomikan closed this Dec 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants