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

Hello all,

i just updated a custom plugin to wireshark version 1.12. This plugin worked fine until version 1.11. So I compiled wireshark version 1.12 and used the new sources to build the plugin.

But when I try to start Wireshark with this plugin, it always crashes at startup. It seems to be a problem with proto_register_field_array. When I remove this function from the code, wireshark starts.

The code looks like that:

static hf\_register\_info hf[] = {
{ &hf\_prio,
{   "PRIO-Bit" , "iec104.prio", FT\_UINT8,BASE\_DEC,NULL,0x0,
     "", HFILL}},  
{ &hf_serial2,
{   "Serial" , "iec104.serial2", FT\_UINT32,BASE\_DEC,NULL,0x0,
     "", HFILL}},

proto_iec104 = proto_register_protocol(DECODERNAME, DECODERNAMEPREFS, DECODERKURZNAME);
proto_register_field_array(proto_iec104, hf, array_length(hf));

I am using Windows 7 64-bit.

Do I have to use another function instead of proto_register_field_array? Or maybe is there a known bug with this function?

Best regards

asked 04 Sep '14, 00:24

dranigl's gravatar image

accept rate: 0%

edited 04 Sep '14, 06:29

JeffMorriss's gravatar image

JeffMorriss ♦

Try replacing the empty string "" with null.

(04 Sep '14, 02:25) Anders ♦

You might also want to try running tools/ and tools/ on your code: they might point out what's wrong with your hf array.

(04 Sep '14, 06:31) JeffMorriss ♦
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 04 Sep '14, 00:24

question was seen: 852 times

last updated: 04 Sep '14, 06:31

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