Segvs and other madness



-----BEGIN PGP SIGNED MESSAGE-----


Hi,

Well I found one problem that was mine (null pointer sillyness), fixed that 
now I get a crash _consistantly_... Here is the BT:
Program received signal SIGSEGV, Segmentation fault.
0x4018fe8f in chunk_free () at malloc.c:2838
malloc.c:2838: No such file or directory.
(gdb) bt
 #0  0x4018fe8f in chunk_free () at malloc.c:2838
 #1  0x4018fd01 in __cfree () at malloc.c:2684
 #2  0x4012f3ff in g_free () at gmem.c:591
 #3  0x400c17b0 in gtk_statusbar_pop () at gtkstatusbar.c:166
 #4  0x80508d1 in update_app_stat (
    stat=0xbfffe5c8 "SNMP query to node \"pm-atl-10.randomc.com\" finished.")
    at main.c:658
 #5  0x8051290 in snmp_generic_cb (op=1, session=0x80c5538, reqid=2, 
    pdu=0x80c6388, magic=0x80c3578) at snmp.c:140
 #6  0x4001b0cb in snmp_read ()
 #7  0x8051756 in idle_poll (data=0x0) at snmp.c:297
 #8  0x40087a3d in gtk_idle_invoke_function (idlef=0x80b85e8) at gtkmain.c:1156
 #9  0x40087b1b in gtk_handle_current_idles () at gtkmain.c:1185
 #10 0x40087d4d in gtk_handle_idle () at gtkmain.c:1250
 #11 0x400866d0 in gtk_main_iteration_do () at gtkmain.c:562
 #12 0x40086137 in gtk_main_iteration () at gtkmain.c:562
 #13 0x4008602d in gtk_main () at gtkmain.c:562
 #14 0x8050b4e in main (argc=1, argv=0xbffff99c) at main.c:748
 (gdb) 
This is in a chain of callbacks, ie an idle callback watching for
activity on multiple ports, and no I can't use an input callback on it 
as I don't have the file descriptor to watch the snmp lib has it, That 
inturn calls the actual routine that will read and parse the data from
snmp, then invoke one of two callbacks depending on the state of the
snmp session.
time out --- Reset the gui to a reasonable state, update the stat to tell
             about the time out.
success  --- Fill in the proper widgets with the info from snmp, update the 
             app stat as to the success.

This was done in this fashion to segment the snmp stuff out so that it
can use multiple snmp libraries without lots of ifdefs peppered throughout
the program.

Here is the function in question:
void
update_app_stat (gchar *stat)
{
  gtk_statusbar_pop (GTK_STATUSBAR (app_info->app_stat_id));
  app_info->app_stat_id = gtk_statusbar_push (GTK_STATUSBAR
                                              (app_info->app_stat), stat);
}

Smells like gtk_statusbar_pop isn't liking a pop operation on an empty 
statusbar, or if the argument contains unknown un validated values?

Off to cvs -z9 update gtk+ and see if that clears it up.

- -- 
Gregory A. Mclean   |-------------------------------------------------------|
Systems Engineer    |          This space for rent!!                        |
Random Access Inc.  |                                                       |
InterNIC: GM1152    ---------------------------------------------------------



-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBNPRaLbVWe0kTMI75AQFM2QQApbbCh4f0xUuzvRai+r1nPBV9c8DfoCwm
qgFDvKni1laTw6OahhqOYUNaX0e2v4MBqHolvUPiRJKKlhuWu6Qla44sKFMNOdNe
HbnBMTpjI2jWhtcJnRDc4ziKpY6Ff5fhKMi2SlUDN59xR+Mk5kwrFsz2jWcZ+LIJ
EOXvxEoz0aY=
=x5Mi
-----END PGP SIGNATURE-----



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