Re: Debug for a GdkPixbuf CRITICAL error message...



Hi again,

This code, taken from the official examples set & modified
conveniently, THROWS the same critical message...
---
#include <gtkmm.h>

int main(int argc, char *argv[])
{
  Gtk::Main kit(argc, argv);

  Glib::RefPtr<Gtk::StatusIcon> status_icon =
      Gtk::StatusIcon::create_from_file ("icon.svg");

/*
  Glib::RefPtr <Gdk::Pixbuf> pix_status_icon =
      Gdk::Pixbuf::create_from_file ("icon.svg", 48, 48);

  Glib::RefPtr<Gtk::StatusIcon> status_icon =
      Gtk::StatusIcon::create (pix_status_icon);
*/
  //Show a window:
  //The program will stop, and the status icon will disappear, when the window
  //is closed.
  Gtk::Window window;
  window.set_title("gtkmm StatusIcon example.");
  window.set_default_size(300, 300);
  Gtk::Main::run(window); //Shows the window and returns when it is closed.

  return 0;
}
---

What's wrong ?

Glus



2012/6/8 Glus Xof <gtglus gmail com>:
> Hi,
>
> In fact, I don't know what could I do further...
>
> Because, although this critical message appears always I run the
> application, the status icon fits correctly in the Desktop System
> Tray...
>
> Maybe, the scale of this image, which is vectorial (svg), must be set
> but I don't know how to guess its sizes...
>
> Could be a bug... or simply a new feature to suggest ?
>
> Glus
>
> 2012/6/7 Glus Xof <gtglus gmail com>:
>> Thanks,
>>
>>> Running in gdb I think you can set a breakpoint on g_logv, and that should
>>> break on the line of the error... perhaps my memory serves me wrong here
>>> though.
>>> -Harry
>>
>> This procedure has revealed that the problem lies to the application
>> status icon, but I don't yet understand why this message is thrown...
>>
>> * In class definition (as private members), I have:
>> void configure_status_icon();
>> Glib::RefPtr <Gtk::StatusIcon> status_icon;
>>
>> * The implementation of this method starts with
>> void Main::configure_status_icon()
>> {
>>   Glib::ustring icon_filename = Glib::build_filename (DATADIR, "icon.svg");
>>   status_icon = Gtk::StatusIcon::create_from_file (icon_filename); //
>> gdb - bt points this line...
>> [...]
>>
>> * And (this method) is called from the main constructor process, just
>> before the show_all_children() calling.
>>
>> I know that 'icon.svg' is a vectorial image, but is it necessary here
>> to fix its size ?
>>
>> Glus
>>> On Wed, Jun 6, 2012 at 9:21 PM, Glus Xof <gtglus gmail com> wrote:
>>>>
>>>> Hi guys,
>>>>
>>>> My app suddently throws this critical message,
>>>>
>>>> GdkPixbuf-CRITICAL **: gdk_pixbuf_scale_simple: assertion `dest_width
>>>> > 0' failed
>>>>
>>>> (although, all works fine...)
>>>>
>>>> How could I do to debug it ?
>>>>
>>>> Glus
>>>> _______________________________________________
>>>> gtkmm-list mailing list
>>>> gtkmm-list gnome org
>>>> https://mail.gnome.org/mailman/listinfo/gtkmm-list
>>>
>>>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]