Re: [gtk-osx-users] Best way to modify a source in a jhbuild environment

On Apr 9, 2019, at 7:27 AM, Gabriele Greco via gtk-osx-users-list <gtk-osx-users-list gnome org> wrote:

Hi guys,

I was trying to fix a bug in GTK ( ) but I have a few 
problems integrating my fix with the GTK OSX build system, specifically I'd like to add it like one of the 
patches in the entry in the moduleset:

... in the moduleset file, so, after generating my test patch for gtk 2.24.32 here is what I did:


.jhbuildrc-custom to point to a local moduleset:

moduleset = "/Users/gabry/projects/gtk-osx/modulesets-stable/gtk-osx.modules"

... edited the given moduleset so that in the "gtk+" module specification there is an addictional line:

<patch file="/Users/gabry/projects/patches/fix-cgcontext.patch" strip="1"/>

... fix-cgcontext.patch is a patch in git diff format.

jhbuild build gtk+

rebuilds gtk but my patch is not applied (I can check it looking at the source files during compilation)

I'm attaching my patch based on the GTK 3.x ones, my goal is to fix the 10.14 dark mode problems of gtk 
2.x. (

I can build GTK using autotools (./configure --prefix /usr/local/gtk --with-gdktarget=quartz 
--enable-quartz-relocation --disable-introspection)  and replacing my local binaries, but I wanted to test 
the patch in a jhbuild environment...

BTW the patch to gtk+ is not enough from what I see there is a problem with CGContext also inside cairo:

Assertion failed: (s->stack->next != NULL), function CGGStackRestore, file 
 line 77.

Thread 0 Crashed:: Dispatch queue:
0   libsystem_kernel.dylib            0x00007fff7014523e __pthread_kill + 10
1   libsystem_pthread.dylib           0x00007fff701fbc1c pthread_kill + 285
2   libsystem_c.dylib                 0x00007fff700ae1c9 abort + 127
3   libsystem_c.dylib                 0x00007fff70076868 __assert_rtn + 320
4            0x00007fff431e817e CGGStackRestore + 143
5            0x00007fff431e80cf CGContextRestoreGState + 32
6   libcairo.2.dylib                  0x00000001069cc6a7 _cairo_quartz_surface_finish + 87
7   libcairo.2.dylib                  0x0000000106994eb2 _cairo_surface_finish + 50
8   libcairo.2.dylib                  0x00000001069948ed cairo_surface_finish + 125
9   libgdk-quartz-2.0.0.dylib         0x00000001067c14de gdk_window_drop_cairo_surface + 46
10  libgdk-quartz-2.0.0.dylib         0x00000001067c2bd9 _gdk_window_destroy_hierarchy + 1049
11  libgdk-quartz-2.0.0.dylib         0x00000001067c2e0d gdk_window_destroy + 29
12  libgtk-quartz-2.0.0.dylib         0x000000010653d324 gtk_widget_real_unrealize + 260
13  libgtk-quartz-2.0.0.dylib         0x000000010654de6d gtk_window_unrealize + 269
14  libgtk-quartz-2.0.0.dylib         0x0000000106374a90 g_cclosure_marshal_VOID__VOID + 224

Did you delete the source gtk+-2.24.32 directory before building? Patches are applied at checkout, not build.

As for the CoreGraphics assert it seems that the auxiliary CGContext is getting corrupted somewhere. I 
suggest that you set a watchpoint on it at creation and see if perhaps it's gotten freed without NULLing the 
surface's reference.

John Ralls

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]