I've been able to narrow the problem a little more. It seems the actual line in my .gtkrc-2.0 which causes the problem is the following:
include "/usr/share/themes/Clearlooks/gtk-2.0/gtkrc"
If I start g-a-p with a .gtkrc-2.0 containing this line (alone or with the rest of my original file), the bugs triggers every time, and the CPU goes to 100%. If I overwrite the .gtkrc-2.0 file while g-a-p is "hung" with a version without the line, the CPU goes back to ~0%, and g-a-p exits correctly.
I've attached strace to g-a-p while it is hung, at it seems caught in a loop. I've attached the fragment of the trace which is repeated endlessly (I don't know which line can be considered the beginning of the loop though).
I've been able to narrow the problem a little more. It seems the actual line in my .gtkrc-2.0 which causes the problem is the following:
include "/usr/share/ themes/ Clearlooks/ gtk-2.0/ gtkrc"
If I start g-a-p with a .gtkrc-2.0 containing this line (alone or with the rest of my original file), the bugs triggers every time, and the CPU goes to 100%. If I overwrite the .gtkrc-2.0 file while g-a-p is "hung" with a version without the line, the CPU goes back to ~0%, and g-a-p exits correctly.
I've attached strace to g-a-p while it is hung, at it seems caught in a loop. I've attached the fragment of the trace which is repeated endlessly (I don't know which line can be considered the beginning of the loop though).