Urgent help required



Dear all,

when compiling my application which contain following code snippets
shows an error " error: request for member 'widget' in something not a
structure or union ".
 gnome_app_create_menus (GNOME_APP (spell_chk_win), menubar1_uiinfo);

gtk_widget_ref (menubar1_uiinfo[0].widget);


Please help me why this errors occurs and how to resolve that.

Thanx in adavnce.

Lalit




On 1/20/06, gtk-app-devel-list-request gnome org
<gtk-app-devel-list-request gnome org> wrote:
Send gtk-app-devel-list mailing list submissions to
        gtk-app-devel-list gnome org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
or, via email, send a message with subject or body 'help' to
        gtk-app-devel-list-request gnome org

You can reach the person managing the list at
        gtk-app-devel-list-owner gnome org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gtk-app-devel-list digest..."


Today's Topics:

   1. GLib 2.8.6 released (Matthias Clasen)
   2. Simple GDK app segfaults for unknown reason (L?szl? Monda)
   3. Re: Simple GDK app segfaults for unknown reason (Colossus)
   4. Re: Simple GDK app segfaults for unknown reason (L?szl? Monda)
   5. Re: Simple GDK app segfaults for unknown reason (Andreas Stricker)
   6. Re: Simple GDK app segfaults for unknown reason
      (David Necas (Yeti))
   7. DnD sensitivity (John Coppens)


----------------------------------------------------------------------

Message: 1
Date: Wed, 18 Jan 2006 14:50:02 -0500
From: Matthias Clasen <matthias clasen gmail com>
Subject: GLib 2.8.6 released
To: gnome-announce-list gnome org, Gtk+ Developers
        <gtk-devel-list gnome org>,     gtk-app-devel-list gnome org,
        gtk-list gnome org
Message-ID:
        <cbccc63c0601181150w6129203m7c9c7a89eaf50ccc mail gmail com>
Content-Type: text/plain; charset=ISO-8859-1

GLib 2.8.6 is now available for download at:

 ftp://ftp.gtk.org/pub/gtk/v2.8/
 http://ftp.gnome.org/pub/GNOME/sources/glib/2.8/

glib-2.8.6.tar.bz2   md5sum: fce6835fd8c99ab4c3e5213bc5bcd0ed
glib-2.8.6.tar.gz    md5sum: 135c276a63b0987aa914ac2736315b4f


GLib is the low-level core library that forms the basis for projects
such as GTK+ and GNOME. It provides data structure handling for C,
portability wrappers, and interfaces for such runtime functionality as
an event loop, threads, dynamic loading, and an object system.

More information about GLib is available at:

 http://www.gtk.org/

An installation guide for the GTK+ libraries, including GLib, can
be found at:

 http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html


Overview of Changes from GLib 2.8.5 to GLib 2.8.6
=================================================

* Fix a problem with g_object_compat_control()
  which can lead to segfaults in GTK+ applications
  on 64bit platforms.

* Fix a memory allocation problem in GKeyFile.
  [Morten Welinder]

* New and updated translations (ca,ja,ml,sv,zh_HK,zh_TW)


Matthias Clasen
Jan 18 2006
_______________________________________________
gnome-announce-list mailing list
gnome-announce-list gnome org
http://mail.gnome.org/mailman/listinfo/gnome-announce-list


------------------------------

Message: 2
Date: Fri, 20 Jan 2006 11:36:38 +0100
From: L?szl? Monda <mondalaci gmail com>
Subject: Simple GDK app segfaults for unknown reason
To: gtk-app-devel-list gnome org
Message-ID: <1137753398 985 9 camel whisper home>
Content-Type: text/plain

Hi List,

I've just written a simple GDK application that basically converts an
input JPEG image to a BMP using a Pixbuf.

Unfortunately it segfaults.

----8<----

#include <gtk/gtk.h>

int main(int argc, char *argv[])
{
    gdk_init(&argc, &argv);

    GError **error = NULL;
    GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file("input.jpg", error);
    gdk_pixbuf_save(pixbuf, "output.bmp", "bmp", error);

    return 0;
}

----8<----

Could someone here explain why does it segfault?

--
Laci

    Blog: http://monda.hu/~laci/blog
    Home: http://mondalaci.objectis.net




------------------------------

Message: 3
Date: Fri, 20 Jan 2006 11:55:31 +0100
From: Colossus <colossus 3000 it>
Subject: Re: Simple GDK app segfaults for unknown reason
To: gtk-app-devel-list gnome org
Message-ID: <43D0C1A3 5000905 3000 it>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

László Monda wrote:
Could someone here explain why does it segfault?

Compile it with the -g flag and then run it in gdb. When the segfault
occurs issue bt. You should have the line where the segfault occurs.

--
Colossus
Xarchiver, a GTK2 only archive manager - http://xarchiver.sourceforge.net
Cpsed, a Linux OpenGL 3D scene editor - http://cpsed.sourceforge.net
Mizio, a QT proxy hunter scanner tool - http://mizio.sourceforge.net


------------------------------

Message: 4
Date: Fri, 20 Jan 2006 12:12:30 +0100
From: L?szl? Monda <mondalaci gmail com>
Subject: Re: Simple GDK app segfaults for unknown reason
To: Colossus <colossus 3000 it>
Cc: gtk-app-devel-list gnome org
Message-ID: <1137755551 985 11 camel whisper home>
Content-Type: text/plain; charset=iso8859-2

On Fri, 2006-01-20 at 11:55 +0100, Colossus wrote:
László Monda wrote:
Could someone here explain why does it segfault?

Compile it with the -g flag and then run it in gdb. When the segfault
occurs issue bt. You should have the line where the segfault occurs.

Program received signal SIGSEGV, Segmentation fault.
0xb781acab in strlen () from /lib/tls/libc.so.6
(gdb) bt
#0  0xb781acab in strlen () from /lib/tls/libc.so.6
#1  0xb7921e58 in g_strdup () from /usr/lib/libglib-2.0.so.0
#2  0xb7b673db in gdk_pixbuf_new_from_xpm_data ()
from /usr/lib/libgdk_pixbuf-2.0.so.0
#3  0xb7b67851 in gdk_pixbuf_save ()
from /usr/lib/libgdk_pixbuf-2.0.so.0
#4  0x08048665 in main (argc=1, argv=0xbff32fd4) at convert.c:9

Does that mean that GDK is buggy?

--
Laci

    Blog: http://monda.hu/~laci/blog
    Home: http://mondalaci.objectis.net




------------------------------

Message: 5
Date: Fri, 20 Jan 2006 12:30:50 +0100
From: Andreas Stricker <andreas stricker fela ch>
Subject: Re: Simple GDK app segfaults for unknown reason
To: gtk-app-devel-list gnome org
Message-ID: <43D0C9EA 6020803 fela ch>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed

Laszls Monda schrieb:
Hi List,

I've just written a simple GDK application that basically converts an
input JPEG image to a BMP using a Pixbuf.

Unfortunately it segfaults.

----8<----

#include <gtk/gtk.h>

int main(int argc, char *argv[])
{
    gdk_init(&argc, &argv);

    GError **error = NULL;
    GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file("input.jpg", error);

What is the value of **error here? In case of no error, is the
return value pixbuf == NULL?

    gdk_pixbuf_save(pixbuf, "output.bmp", "bmp", error);

Is bmp supported (determine it with gdk_pixbuf_get_formats () - see
documentation)


    return 0;
}

----8<----

Could someone here explain why does it segfault?


Cheers,

Andy



------------------------------

Message: 6
Date: Fri, 20 Jan 2006 12:34:01 +0100
From: "David Necas (Yeti)" <yeti physics muni cz>
Subject: Re: Simple GDK app segfaults for unknown reason
To: L?szl? Monda <mondalaci gmail com>
Cc: gtk-app-devel-list gnome org
Message-ID: <20060120113401 GB32340 potato>
Content-Type: text/plain; charset=iso-8859-2

On Fri, Jan 20, 2006 at 11:36:38AM +0100, László Monda wrote:
Hi List,

I've just written a simple GDK application that basically converts an
input JPEG image to a BMP using a Pixbuf.

Unfortunately it segfaults.

----8<----

#include <gtk/gtk.h>

int main(int argc, char *argv[])
{
    gdk_init(&argc, &argv);

    GError **error = NULL;
    GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file("input.jpg", error);
    gdk_pixbuf_save(pixbuf, "output.bmp", "bmp", error);

    return 0;
}

----8<----

Could someone here explain why does it segfault?

The list of gdk_pixbuf_save() options must be
NULL-terminated, that means if you don't pass any options
you still have to pass the terminating NULL.  The use of
GError is errorneous too, but since you effectively pass
NULL (and thus ignore errors), it does not cause the crash.

Yeti


--
That's enough.


------------------------------

Message: 7
Date: Fri, 20 Jan 2006 13:42:45 -0300
From: John Coppens <john jcoppens com>
Subject: DnD sensitivity
To: gtk-app-devel-list gnome org
Message-ID: <20060120134245 477bff4b john jcoppens com>
Content-Type: text/plain; charset=US-ASCII

Hi all.

Using Sylpheed I have some problems with DnD:

When trying to drag the last message from the message folder, it takes
some 8 or more pixels to activate dragging. So, as the line is only
slightly higher, it's necessary to either aim very precisely to the top
of the message line, or start the dragging motion horizontally, because
else the detection is aborted by the order of the widget.

It's rather difficult to explain... Basically - is it possible to
either make DnD more sensitive, or, better, make gtk+ not abort the DnD
detection at the widget border?

John


------------------------------

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

End of gtk-app-devel-list Digest, Vol 21, Issue 28
**************************************************



--
Bye,

Lalit Kumar



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