Bug in Gtk::EntryCompletion match-selected signal?

The attached script bombs when an entry is selected from the list of
completions (try entering a “T”). It seems that the iterator passed
to the signal handler isn’t attached to the model properly. I have
been unable to figure out why.

nikolai

I had a similar problem a while ago (running against 0.16). IIRC, the
error message said something about a GClosure object having been
deleted due to reference counting. If you’re getting a similar
message, this might be the problem.

I tried to fix the problem, but simply ran out of time. Fortunately,
I was able to workaround the problem by keeping extending
Gtk::Completion instance lifetime by assigning it to a member
variable. In “setup_completion”, try making “completion” a member
(@completion) and see if the problem persists.

Hope this helps.
Don Kelly/

On 8/22/07, Nikolai W. [email protected] wrote:

The attached script bombs when an entry is selected from the list of
completions (try entering a “T”). It seems that the iterator passed
to the signal handler isn’t attached to the model properly. I have
been unable to figure out why.

nikolai


karfai [AT] gmail.com
http://www.strangeware.ca
http://beyondtheedge.blogspot.com


This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

On 8/22/07, Nikolai W. [email protected] wrote:

The attached script bombs when an entry is selected from the list of
completions (try entering a “T”). It seems that the iterator passed
to the signal handler isn’t attached to the model properly. I have
been unable to figure out why.

Apparently, rg2 code relies on the fact that iter->user_data3 is a
pointer to the model. I don’t know how this should be working globally
in this case of an iter generated from a signal, there is probably the
needs to intercept the data of the emitted signal to properly set
user_data3, because that’s what seems to trigger your problem
(gtk_tree_model_get_values fired without a proper GtkTreeModel*
parameter); but I’ll let that to the people who designed the
iter/user_data3 thing.

Gtk-CRITICAL **:gtk_tree_model_get_value: assertion
`GTK_IS_TREE_MODEL (tree_model)’ failed

In the meantime, replacing iter[0] by model.get_value(iter, 0)
workarounds the bug.


Guillaume C. - Guillaume Cottenceau


This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/