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

Hi currently i've written code for own plugin for RRC Messages by taking existing code reference from existing wireshark e.g:packet-gsm_rlcmac.c and i'm using some API's also from epan/dissectors,after a lot of struggle,i compiled my code and i'm facing this error Warn Dissector bug, protocol MY_PROTO, in packet 1056: More than 1000000 items in the tree -- possible infinite loop,Here MY_PROTO is my protocol name,can any body help me to resolve this issue..

asked 24 Jun '14, 22:59

sagar's gravatar image

sagar
11445
accept rate: 0%

sample of code :

    csnStream_t  ar;
    //proto_item   *ti = NULL;
    //proto_tree   *rrc_tree = NULL;
    proto_item   *ti;
    proto_tree   *rrc_tree;
    guint8 bit_offset = 0;
    bit_length = tvb_length(tvb) * 8;
    data->u.MESSAGE_TYPE = tvb_get_bits8(tvb, bit_offset, 8);

    bit_offset = initial_bit_offset;

    ti = proto_tree_add_protocol_format(tree,proto_gmr3g_rrc,tvb,bit_offset >> 3,-1,"RRC: %s (%d) (Uplink)",
                    val_to_str_ext(data->u.MESSAGE_TYPE, &dl_rrc_message_type_vals_ext, "Unknown Messsage Type"),data->u.MESSAGE_TYPE);

    rrc_tree =  proto_item_add_subtree(ti,ett_rrc);

    /* Initialize the contexts */
    csnStreamInit(&ar,bit_offset,bit_length-bit_offset);

// ar.remaining_bits_len = bit_length-bit_offset; // ar.bit_offset = bit_offset;

    switch (data->u.MESSAGE_TYPE)

    {

            case MT_SIGNALLING_RB_INFORMATION_SETUP:
                    {
                            csnStreamDissector(rrc_tree,&ar,CSNDESCR(Packet_Signalling_Info_Setup_t),tvb,&data->u.Packet_Signalling_Info_Setup,ett_rrc);
                            break;

                    }

            default:
                    break;
(24 Jun '14, 23:16) sagar

As it says you probably have an infinite or long loop in your program, try running it under a debugger. Otherwise we need to see the code.

permanent link

answered 24 Jun '14, 23:02

Anders's gravatar image

Anders ♦
4.6k952
accept rate: 17%

Hi i've added sample of code any body can verify it and let me know where exactly problem is ....

(25 Jun '14, 02:48) sagar

The problem probably lies in your CSN.1 description for the message. There is no loop in the code sample you pasted (which seems partial as data->u.MESSAGE_TYPE is never initialized), so we cannot help you.

(25 Jun '14, 09:06) Pascal Quantin
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×1,620
×637
×34
×1
×1

question asked: 24 Jun '14, 22:59

question was seen: 2,369 times

last updated: 25 Jun '14, 09:06

p​o​w​e​r​e​d by O​S​Q​A