Skip to content

C++ assertion "client.Last() == L'C'" failed at ./src/common/artprov.cpp #1956

@davidak

Description

@davidak

Operating system: NixOS 21.05pre283367.0a5f5bab0e0 (beta)
wxPython version & source: 4.1.0 (from nixpkgs https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/python-modules/wxPython/4.1.nix)
Python version & source: 3.9.2, 3.8.8, 3.7.10, 3.6.13 (from nixpkgs)

Description of the problem:

I noticed this problem when packaging Timeline with wxPython 4.1.0.

>>> wx.ArtProvider.GetBitmap(wx.ART_CROSS_MARK, wx.ART_TOOLBAR)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
wx._core.wxAssertionError: C++ assertion "client.Last() == L'C'" failed at ./src/common/artprov.cpp(319) in DoGetIconBundle(): invalid 'client' parameter

Roger Lindberg from Timeline project (which uses wxPython) tested it on Windows and was not able to reproduce the issue.

I don't have the issue with wxPython 4.0.7.post2.

Code Example (click to expand)
import wx
wx.version()
app = wx.App()
wx.ArtProvider.GetBitmap(wx.ART_CROSS_MARK)
wx.ArtProvider.GetBitmap(wx.ART_CROSS_MARK, wx.ART_TOOLBAR)
Full terminal output (click to expand)
[davidak@gaming:~/code/nixpkgs]$ nix-shell -p python39Packages.wxPython_4_1
these paths will be fetched (9.07 MiB download, 56.09 MiB unpacked):
  /nix/store/hm2kyys29cpbmkh1xc2dfypyp3rvv0ii-python3.9-wxPython-4.1.0
copying path '/nix/store/hm2kyys29cpbmkh1xc2dfypyp3rvv0ii-python3.9-wxPython-4.1.0' from 'https://cache.nixos.org'...

[nix-shell:~/code/nixpkgs]$ python
Python 3.9.2 (default, Feb 19 2021, 13:34:46) 
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.version()
'4.1.0 gtk3 (phoenix) wxWidgets 3.1.4'
>>> app = wx.App()
>>> wx.ArtProvider.GetBitmap(wx.ART_CROSS_MARK)
<wx._core.Bitmap object at 0x7f7d21b0a5e0>
>>> wx.ArtProvider.GetBitmap(wx.ART_CROSS_MARK, wx.ART_TOOLBAR)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
wx._core.wxAssertionError: C++ assertion "client.Last() == L'C'" failed at ./src/common/artprov.cpp(319) in DoGetIconBundle(): invalid 'client' parameter
[davidak@gaming:~/code/nixpkgs]$ nix-shell -p python3Packages.wxPython_4_1
[nix-shell:~/code/nixpkgs]$ python
Python 3.8.8 (default, Feb 19 2021, 11:04:50)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> app = wx.App()
>>> wx.ArtProvider.GetBitmap(wx.ART_CROSS_MARK)
<wx._core.Bitmap object at 0x7f47bfd4f940>
>>> wx.ArtProvider.GetBitmap(wx.ART_CROSS_MARK, wx.ART_TOOLBAR)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
wx._core.wxAssertionError: C++ assertion "client.Last() == L'C'" failed at ./src/common/artprov.cpp(319) in DoGetIconBundle(): invalid 'client' parameter 
[davidak@gaming:~/code/nixpkgs]$ nix-shell -p python37Packages.wxPython_4_1
[nix-shell:~/code/nixpkgs]$ python
Python 3.7.10 (default, Feb 16 2021, 02:11:57) 
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.version()
'4.1.0 gtk3 (phoenix) wxWidgets 3.1.4'
>>> app = wx.App()
>>> wx.ArtProvider.GetBitmap(wx.ART_CROSS_MARK)
<wx._core.Bitmap object at 0x7fa84baed910>
>>> wx.ArtProvider.GetBitmap(wx.ART_CROSS_MARK, wx.ART_TOOLBAR)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
wx._core.wxAssertionError: C++ assertion "client.Last() == L'C'" failed at ./src/common/artprov.cpp(319) in DoGetIconBundle(): invalid 'client' parameter
[davidak@gaming:~/code/nixpkgs]$ nix-shell -p python36Packages.wxPython_4_1
[nix-shell:~/code/nixpkgs]$ python
Python 3.6.13 (default, Feb 16 2021, 02:30:48) 
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.version()
'4.1.0 gtk3 (phoenix) wxWidgets 3.1.4'
>>> app = wx.App()
>>> wx.ArtProvider.GetBitmap(wx.ART_CROSS_MARK)
<wx._core.Bitmap object at 0x7fcffa796558>
>>> wx.ArtProvider.GetBitmap(wx.ART_CROSS_MARK, wx.ART_TOOLBAR)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
wx._core.wxAssertionError: C++ assertion "client.Last() == L'C'" failed at ./src/common/artprov.cpp(319) in DoGetIconBundle(): invalid 'client' parameter

Windows:

Python 3.9.4 (tags/v3.9.4:1f2e308, Apr  6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
  >>> wx.version()
'4.1.1 msw (phoenix) wxWidgets 3.1.5'
>>> import wx
>>> app= wx.App()
>>> wx.ArtProvider.GetBitmap(wx.ART_CROSS_MARK)
<wx._core.Bitmap object at 0x00000258720D5820>
>>> wx.ArtProvider.GetBitmap(wx.ART_CROSS_MARK, wx.ART_TOOLBAR)
<wx._core.Bitmap object at 0x00000258720D58B0>
>>>
Python 3.8.8 (tags/v3.8.8:024d805, Feb 19 2021, 13:18:16) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.version()
'4.1.1 msw (phoenix) wxWidgets 3.1.5'
>>> app = wx.App()
>>> wx.ArtProvider.GetBitmap(wx.ART_CROSS_MARK)
<wx._core.Bitmap object at 0x0000016E6511A9D0>
>>> wx.ArtProvider.GetBitmap(wx.ART_CROSS_MARK, wx.ART_TOOLBAR)
<wx._core.Bitmap object at 0x0000016E652860D0>
>>>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions