Re: GridTableBase segfault crashes on macos/windows

"'raf' via wx-users" <[email protected]> Sun, 27 Apr 2025 11:41:07 +1000
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
On Tue, Apr 08, 2025 at 09:13:21AM -0400, Scott Talbert <[email protected]> wrote:

> 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

Thanks. Sorry for the delay in responding. I'll work on a demonstration
program and send it when I can.

cheers,
raf

-- 
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/aA2LMyd-klQ2OfXM%40raf.org.