seeking thoughts on a crash that I caused, and more general question about message passing
Hello all,
I am playing around with interfacing some custom hardware that I've built
for my PhD to the GIMP. I spent some time yesterday learning how to add
popup menus to the UI, so that I could right-click a slider (such as the
Cyan / Magenta / Yellow ones in the Color Balance dialog), and bind the
slider to data from my input device on-the-fly. I got the popup menu to pop
and show the menu entries that I have identified, but after popping the
menus a few times, GIMP always crashes with this message:
(gimp-2.4:23363): Gtk-CRITICAL **: gtk_window_set_accept_focus: assertion
`GTK_IS_WINDOW (window)' failed
Bus error
Does anyone know how my popup menus caused that, and how I can fix it?
The more general question that I have is the following: If I want to route
control messages to and from a Python interpreter that I instantiate in the
GIMP, what would be the most elegant way to run this interpreter and to
route messages? (this is for dynamically controlling the UI - for instance,
to make my hardware control the aforementioned sliders, so I don't think I
can use the same Python architecture that does plugins). Is there a general
message-passing system that I could hook into? Where should I look, to get
started?
thanks in advance!
-David Merrill