[Ruby-gnome2][Bug] segmentation fault with ComboBox and spanish characters

Hi all.

I have a little problem when setting a list of options in a ComboBox
with spanish characters. When I type and complete with Alt+Tab,
program goes inestable, crashing after a moment or making impossible
to type more.

When executing from console, I get critical messages about Bonobo and
UTF-8 characters, like:

** (dequebarrio:1770): WARNING **: Invalid UTF8 string passed
to pango_layout_set_text()

I use Ruby 1.8.1 and Ruby-gnome2 0.8.1-8 in Debian Sid. Has any of
you same problem? Is it a question solved in 0.9 version?

Thanks a lot for your excellent work.

						David

P.D. Sorry for not using mailing list, but I have problems sending
messages to ruby-gnome2-devel-en.

Hi,

Hi all.

I have a little problem when setting a list of options in a ComboBox
with spanish characters. When I type and complete with Alt+Tab,
program goes inestable, crashing after a moment or making impossible
to type more.

When executing from console, I get critical messages about Bonobo and
UTF-8 characters, like:

** (dequebarrio:1770): WARNING **: Invalid UTF8 string passed
to pango_layout_set_text()

I use Ruby 1.8.1 and Ruby-gnome2 0.8.1-8 in Debian Sid. Has any of
you same problem? Is it a question solved in 0.9 version?

What charset do you use ?
All strings you pass to GTK+ functions must be in UTF-8.

See http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips_i18n

P.D. Sorry for not using mailing list, but I have problems sending
messages to ruby-gnome2-devel-en.

Don’t mind ;).

···

On Wed, 3 Mar 2004 18:54:45 +0900 David Espada davinciSINSPAM@escomposlinux.org wrote:


.:% Masao Mutohmutoh@highway.ne.jp

I have a little problem when setting a list of options in a ComboBox
with spanish characters. When I type and complete with Alt+Tab,
program goes inestable, crashing after a moment or making impossible
to type more.

What charset do you use ?

UTF-8

I pass data received from a database with UTF-8 coding. It works
normally on other widgets without problems.

All strings you pass to GTK+ functions must be in UTF-8.

Problem seems only to raise when I try using autocomplete with
Alt+Tab

See http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips_i18n

Good. I’ll read. Thanks.

						David
···

El miércoles 03 de marzo, Masao Mutoh escribió:

Hi,

···

On Thu, 4 Mar 2004 00:34:44 +0900 David Espada davinciSINSPAM@escomposlinux.org wrote:

I have a little problem when setting a list of options in a ComboBox
with spanish characters. When I type and complete with Alt+Tab,
program goes inestable, crashing after a moment or making impossiblea
to type more.

What charset do you use ?

UTF-8

I pass data received from a database with UTF-8 coding. It works
normally on other widgets without problems.

All strings you pass to GTK+ functions must be in UTF-8.

Problem seems only to raise when I try using autocomplete with
Alt+Tab

Autocomplete ? Is it Gtk::Combo?

Hmm. I don’t know Gtk::Combo has autocomplete feature.
Is it about other Widget?

Could you send a sample(small one, please;->)?


.:% Masao Mutohmutoh@highway.ne.jp

All strings you pass to GTK+ functions must be in UTF-8.

Problem seems only to raise when I try using autocomplete with
Alt+Tab

Autocomplete ? Is it Gtk::Combo?

Yes :slight_smile:

Hmm. I don’t know Gtk::Combo has autocomplete feature.
Is it about other Widget?

Try yourself with a number of assigned values (set_popdown_strings)
and Alt+Tab :wink:

Could you send a sample(small one, please;->)?

Well. In this example, you can select perfectly a value in combo with
mouse, but if you type until a special spanish character and next use
Alt+Tab combination in order to auto-complete word, widget run
unstable and it is difficult to select a value until you type
backspace repeatedly.

Code:

···

El miércoles 03 de marzo, Masao Mutoh escribió:

#!/usr/bin/ruby

require ‘glib2’
require ‘gtk2’

Gtk::init

ventana = Gtk::Window.new
ventana.set_title(“Problemas con carácteres latinos”)
ventana.signal_connect(‘delete_event’) {exit}

vbox = Gtk::VBox::new(true, 10)

boton = Gtk::Button.new(‘_cerrar’, true)
boton.signal_connect(‘clicked’) do Gtk::main_quit end

entra = Gtk::Entry.new()
entra.set_text(“This widget works perfectly: áéíóúñññ”)

combo = Gtk::Combo.new()
combo.set_popdown_strings([‘árbol’, ‘película’, ‘edredón’])
combo.set_use_arrows(false)
combo.set_value_in_list(true, true)

vbox.pack_start(entra, true, true, 0)
vbox.pack_start(combo, true, true, 0)
vbox.pack_start(boton, true, true, 0)

ventana.add(vbox)

ventana.show_all

Gtk.main

Special characters are in UTF-8. If you have any problem to probe,
I’ll send you file.

Thanks.

						David

Hi,

test.c (574 Bytes)

···

On Thu, 4 Mar 2004 17:20:58 +0900 David Espada davinciSINSPAM@escomposlinux.org wrote:

All strings you pass to GTK+ functions must be in UTF-8.

Problem seems only to raise when I try using autocomplete with
Alt+Tab

Autocomplete ? Is it Gtk::Combo?

Yes :slight_smile:

Hmm. I don’t know Gtk::Combo has autocomplete feature.
Is it about other Widget?

Try yourself with a number of assigned values (set_popdown_strings)
and Alt+Tab :wink:

Could you send a sample(small one, please;->)?

Well. In this example, you can select perfectly a value in combo with
mouse, but if you type until a special spanish character and next use
Alt+Tab combination in order to auto-complete word, widget run
unstable and it is difficult to select a value until you type
backspace repeatedly.

GTK+ C version gets same result.
It seems a bug of GTK+. Try attached file.

gcc -o test pkg-config gtk+-2.0 --libs --cflags test.c


.:% Masao Mutohmutoh@highway.ne.jp

Same problem. I suspected it :wink:

It seems that problem has not been reported to Gtk bugzilla nor Debian
bug database. I’ll write a report.

Thanks, Masao.

						David
···

El jueves 04 de marzo, Masao Mutoh escribió:

Well. In this example, you can select perfectly a value in combo with
mouse, but if you type until a special spanish character and next use
Alt+Tab combination in order to auto-complete word, widget run
unstable and it is difficult to select a value until you type
backspace repeatedly.

GTK+ C version gets same result.
It seems a bug of GTK+. Try attached file.