Re: GridTableBase segfault crashes on macos/windows

Scott Talbert <[email protected]> Tue, 8 Apr 2025 09:13:21 -0400 (EDT)
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
On Mon, 7 Apr 2025, 'raf' via wx-users wrote:

> I've converted a wxPython app from
> python-2.7/wxPython-2.8.12.1 to
> python3.12/wxPython-4.2.2 and we're seeing lots of
> segfault crashes when using a grid (GridTableBase, was
> PyGridTableBase). Has anyone seen such grid crashes?
> Any ideas on what to avoid? The first grid-related
> crash was fixed by stopping using a weakref for the
> underlying datatable (I'm not sure why it was being
> used in the first place) but crashes still happen, just
> not immediately.
>
> If someone is willing to look at it, I'll construct
> smallish example code, but it probably won't be tiny.
> My grids have extra behaviour to make cell editing very
> automatic and keyboard-efficient.

The wxPython memory management for wxGrid is somewhat complicated, so it's 
possible there could be a bug there.  It's also possible there could be a 
bug in your code (perhaps a memory leak was fixed in wxPython?).  But 
either way, yes, the best way would be to produce a small, self-contained 
reproducer.

> I noticed that there was a recent release of wxWidgets.
> Maybe it contains fixes that would help. Any idea when
> the new version of wxWidgets will make its way into a
> new version of wxPython?

The latest version of wxWidgets has already been incorporated into 
wxPython git.  I'm planning a new release of wxPython soon.  But I 
strongly suspect in this case that the problem isn't wxWidgets specific.

Scott

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/wx-users/ea1f117a-fcc9-14ab-7de4-54610b753c9a%40techie.net.