I got it. It was bad reference algebra, due to my inexperience with pango layout lines. I assumed `pango_layout_get_line_read_only' calls were incrementing the line's reference count, and calling `pango_layout_line_unref' in tandem.
Obvious in hindsight. Rafal was onto it in his original response. On 7 July 2017 at 17:22, Jeffrey Sheen < jeffrey.shee...@alumni.imperial.ac.uk> wrote: > Dear list, > > I have started to build my own GTK Win32 DLLs using the gvsbuild project, > as suggested by Nacho. > > However, these DLLs exhibit the same behaviour of a > `magazine_chain_pop_head' being called on a NULL, after an arbitrary number > of `pango_layout_clear_lines' calls being made. > > Chun-wei suggested building the GTK libraries to be thread safe. How can I > achieve this? Are there preprocessor flags to be set by the compiler? > > I would like to have the most conservatively stable, and verbose version > of the libraries to test against. > > P.S. is anyone out there using these libraries in the wild for Win32, and > calling Pango and Cairo functions directly? > > > On 6 June 2017 at 21:13, Jeffrey Sheen <jeffrey.sheen00@alumni. > imperial.ac.uk> wrote: > >> Thank you both for the advice. >> >> I'll start the process of rebuilding GTK myself. >> >> N.B. Win XP will ultimately be a build target (legacy requirement). How >> can I determine the latest compatible versions of the component libraries? >> >> On 6 Jun 2017 07:43, "Ignacio Casal Quinteiro" <nacho.r...@gmail.com> >> wrote: >> >> Jeffrey, >> >> I would also like to point you out https://github.com/wingtk/gvsbuild >> which is a fork of gtk-win32 having the packages more updated. >> >> Cheers. >> >> On Tue, Jun 6, 2017 at 2:45 AM, Chun-wei Fan (范君維) via gtk-list < >> gtk-list@gnome.org> wrote: >> >>> Hi Jeffrey, >>> >>> The issue seems like that we need to get PangoWin32 (and if you are >>> doing this via Cairo, Cairo) thread-safe on Windows. You might need to for >>> the time being use a private thread (or so) to do this. >>> >>> With blessings, and cheers! >>> >>> Jeffrey Sheen 於 2017/6/6 上午 07:35 寫道: >>> >>> N.B. I've found pdb files related to the GTK DLLs distributed as part of >>> the hexchat gtk-win32 project (https://github.com/hexchat/gtk-win32). >>> >>> Executing with these in place, the VS 2015 debugger is showing me that >>> there is an intermittent issue when "pango_layout_clear_lines" is called. >>> >>> Ultimately a NULL pointer is passed to glib's >>> "magazine_chain_prepare_fields" function. >>> >>> The issue can be recreated by creating and destroying a UI dialogue a >>> specific number of times. Each text block in the UI dialogue is rendered by >>> creating and destroying PangoLayout and PangoFontDescription objects. >>> >>> As this is an intermittent issue, and at a glib memory management level, >>> I am not sure how to proceed. >>> >>> Any advice would be appreciated. >>> >>> On 5 June 2017 at 20:08, Jeffrey Sheen <jeffrey.sheen00@alumni.imperi >>> al.ac.uk> wrote: >>> >>>> Dear list, >>>> >>>> I've got an issue with Pango, and have tried asking around in the GTK >>>> channel on gnome.org, but no bites. >>>> >>>> Memory Access Violations are occurring upon PangoLayout function calls. >>>> I'm developing in MS VS2015, with no error text sent to output terminal. >>>> >>>> >>>> It's a post "pango_layout_set_text" call to >>>> "pango_layout_get_pixel_extents" that's bombing out in >>>> "gobject-2.0.dll". >>>> >>>> Do you have any tips on how to debug GTK in VS? >>>> >>> >>> >>> >>> _______________________________________________ >>> gtk-list mailing >>> listgtk-list@gnome.orghttps://mail.gnome.org/mailman/listinfo/gtk-list >>> >>> >>> >>> _______________________________________________ >>> gtk-list mailing list >>> gtk-list@gnome.org >>> https://mail.gnome.org/mailman/listinfo/gtk-list >>> >>> >> >> >> -- >> Ignacio Casal Quinteiro >> >> _______________________________________________ >> gtk-list mailing list >> gtk-list@gnome.org >> https://mail.gnome.org/mailman/listinfo/gtk-list >> >> >> >
_______________________________________________ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list