Ethereal-dev: Re: [ethereal-dev] tethereal crash.

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Tue, 25 Jan 2000 21:26:03 -0800
> GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup): assertion `hash_table != NULL' failed.

Try this patch.  Tethereal wasn't initializing protocols before a
capture, so if it was supposed to dissect packets and print stuff rather
than saving them to a file, and a protocol that needed to have its data
structures initialized was seen, it would have problems.
Index: tethereal.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/tethereal.c,v
retrieving revision 1.15
diff -c -r1.15 tethereal.c
*** tethereal.c	2000/01/24 05:13:45	1.15
--- tethereal.c	2000/01/26 05:26:50
***************
*** 458,463 ****
--- 458,469 ----
    int         err, inpkts;
    char        errmsg[1024+1];
  
+   /* Initialize the table of conversations. */
+   conversation_init();
+ 
+   /* Initialize protocol-specific variables */
+   init_all_protocols();
+ 
    ld.linktype       = WTAP_ENCAP_UNKNOWN;
    ld.pdh            = NULL;