gtk_init SIGSEGV



Hello everybody  i am trying to make a simple gtk application for
hobby,after adding the control of parameters with which it is launched
the program crash to the funciton *gtk_init*,no error or warning when it
is compiled but there is a segmentation fault in the run time,where is
the bug?
i post the function where is a call of *gtk_init* and gdb output and
back trace:
#################
void Init_VH(int LocalArgc,char *LocalArgv[])
{
        /* PID and UID and GID of process */
        gint pidTemp;                                                   
        uid_t Users,EffectiveUsers;                             
        gid_t GroupUsers,EffectiveGroupUsers;

        /* initialization of threads */
        if( !g_thread_supported() )
        {
                /* initialization thread */
                g_thread_init(NULL);
                gdk_threads_init();

                /* initialization of GTK+ libraries */
                gtk_init(&LocalArgc, &LocalArgv);

                /* PID of the process */
                pidTemp=getpid();
                CUT...
#################
Starting program:
/home/iacopodeenosee/Progetti_Building/VisualHunter/visualhunter
[Thread debugging using libthread_db enabled]
[New Thread 0xb73ea700 (LWP 24757)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb73ea700 (LWP 24757)]
0x000a6465 in ?? ()
(gdb) bt full
#0  0x000a6465 in ?? ()
No symbol table info available.
#1  0xb778c457 in read_alias_file () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#2  0xb778c7dc in _nl_expand_alias () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#3  0xb778ae1d in _nl_find_domain () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#4  0xb778a719 in __dcigettext () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#5  0xb77894a3 in dcgettext () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#6  0xb7d283f3 in post_parse_hook (context=0x8946d80, group=0x89476f0,
data=0x8947600, error=0xbf89b4bc)
    at /build/buildd/gtk+2.0-2.12.11/gtk/gtkmain.c:672
No locals.
#7  0xb791ff1d in IA__g_option_context_parse (context=0x8946d80,
argc=0xbf89b570, argv=0xbf89b574, error=0xbf89b4bc)
    at /tmp/buildd/glib2.0-2.16.6/glib/goption.c:1806
        i = 1
        j = <value optimized out>
        k = <value optimized out>
        list = <value optimized out>
#8  0xb7d280c2 in IA__gtk_parse_args (argc=0xbf89b570, argv=0xbf89b574)
at /build/buildd/gtk+2.0-2.12.11/gtk/gtkmain.c:876
        option_context = (GOptionContext *) 0x8946d80
---Type <return> to continue, or q <return> to quit---
        gtk_group = <value optimized out>
        error = (GError *) 0x0
#9  0xb7d28144 in IA__gtk_init_check (argc=0xbf89b570, argv=0xbf89b574)
at /build/buildd/gtk+2.0-2.12.11/gtk/gtkmain.c:912
No locals.
#10 0xb7d28184 in IA__gtk_init (argc=0xbf89b570, argv=0xbf89b574) at
/build/buildd/gtk+2.0-2.12.11/gtk/gtkmain.c:950
No locals.
#11 0x0804f493 in Init_VH (LocalArgc=1, LocalArgv=0xbf89b634) at
src/Main.c:107
        pidTemp = -1216055936
        Users = 134544622
        EffectiveUsers = 134738144
        GroupUsers = 3079385076
        EffectiveGroupUsers = 134738144
#12 0x080501c2 in main (argc=1, argv=0xbf89b634) at src/Main.c:230
No locals.
#################
the complete source are available here:
http://bazaar.launchpad.net/~iacopodeenosee-alice/+junk/visualhunter/files
Bye.
-- 
Skype: IacopoDeeNosee




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