This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

error in heuristic dissector

0

I get this error when i run wireshark.I have built a heuristic dissector 17:29:46 Err file packet.c: line 1542 (heur_dissector_add): assertion failed: (sub_dissectors != NULL) Aborted

asked 17 Mar '11, 05:01

niks3089's gravatar image

niks3089
21151518
accept rate: 0%


One Answer:

0

The "name" field (the 1st parameter) in your heur_dissector_add() call is not valid. Or I suppose it may be valid but you're calling heur_dissector_add() before the other protocol has been registered (are you calling heur_dissector_add() in your reg_handoff routine?).

answered 17 Mar '11, 06:47

JeffMorriss's gravatar image

JeffMorriss ♦
6.2k572
accept rate: 27%

void proto_reg_handoff_arr(void)

{

static gboolean initialized=FALSE;

if (!initialized) {

arr_handle = new_create_dissector_handle(dissect_arr, proto_arr);

dissector_add_handle(“tcp”, arr_handle);

    heur_dissector_add("tcp", dissect_arr_heur, proto_arr);

}

}

this is the code

(17 Mar ‘11, 10:42) niks3089