[ wxwindows-Bugs-1633263 ] Crash in wxListCtrl::OnGetItemAttr
SourceForge.net
noreply at sourceforge.net
Thu Jan 11 06:59:41 PST 2007
Bugs item #1633263, was opened at 2007-01-11 15:59
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1633263&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxPython specific
Group: Fatal
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Pär Larsson (parla)
Assigned to: Robin Dunn (robind)
Summary: Crash in wxListCtrl::OnGetItemAttr
Initial Comment:
Returning a wxListAttr object that isn't referenced from any other place causes fatal exception in 2.8.0.1.
Failing code:
def OnGetItemAttr(self, item):
return wx.ListItemAttr(wx.RED, wx.WHITE, wx.Font(8, wx.MODERN, wx.NORMAL, wx.NORMAL))
It works if the attribute returned is referenced somewhere else, i.e this works:
def OnGetItemAttr(self, item):
return self.attr
I suspect this comes from the fact that in C++, a pointer is returned from OnGetItemAttr. The pointer is neither deleted nor referenced according to the documentation.
This worked in 2.6.3.3.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1633263&group_id=9863
More information about the wx-dev
mailing list