Possible bug?
- From: Omar Barneto <obarneto hasar com>
- To: gtkmm-list gnome org
- Subject: Possible bug?
- Date: Mon, 23 Oct 2006 15:15:58 -0300
I think I've found a bug. I am not sure if it comes from gtkmm or gtk
This bug can be reproduced with this test program:
#include <gtkmm/main.h>
#include <gtkmm/window.h>
#include <gtkmm/button.h>
#include <gtkmm/label.h>
class MainWindow : public Gtk::Window
{
public:
MainWindow() : Gtk::Window(Gtk::WINDOW_TOPLEVEL)
{
add(boton);
boton.add(label);
set_size_request(100,100);
boton.signal_clicked().connect(sigc::mem_fun(*this,
&MainWindow::Click));
show_all();
}
void Click()
{
boton.set_sensitive(false);
label.set_markup("<span foreground=\"black\">234</span>");
}
private:
Gtk::Button boton;
Gtk::Label label;
};
int main (int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
MainWindow m();
Gtk::Main::run(m);
return 0;
}
When I click the button the program prints at console "Illegal
instruction" and aborts.
That happened only if I put the button "insensitive" and set the
foreground property with set_markup.
If I put the button "sensitive" or not set the background property the
program works OK.
I run this program over a "Linux Fedora4 2.6.11-1.1369_FC4"
The command line to compile the program is:
g++ -o prueba prueba.o -L/usr/local/lib -lgtkmm-2.4 -lgdkmm-2.4
-latkmm-1.6 -lgtk-x11-2.0 -lpangomm-1.4 -lglibmm-2.4 -lsigc-2.0
-lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0
-lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
-L/usr/local/lib -lsigc-2.0
g++ -o prueba prueba.o -L/usr/local/lib -lgtkmm-2.4 -lgdkmm-2.4
-latkmm-1.6 -lgtk-x11-2.0 -lpangomm-1.4 -lglibmm-2.4 -lsigc-2.0
-lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0
-lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
-L/usr/local/lib -lsigc-2.0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]