Wireshark-bugs: [Wireshark-bugs] [Bug 12404] WSLUA Adding a ProtoField that is part of a protoco

Date: Thu, 05 May 2016 14:06:05 +0000

Comment # 4 on bug 12404 from
(In reply to Konrads Smelkovs from comment #3)
> Thank you for your suggestions, but I still think it is a bug as the
> Documented API doesn't work in practice. In the API
> (https://wiki.wireshark.org/LuaAPI/TreeItem#treeitem:add.28proto_.5B.
> 2Ctvbrange.5D_.5B.2Cvalue_.5B.2Ctext1_.5B.2Ctext2.5D_....5D_.5D.29), it
> states that 
> " treeitem:add(proto_field [,tvbrange] [,value [,text1 [,text2] ...] ]) " is
> a valid call, but as I have shown in the bug report that is not true always
> if the proto_field is part of a Proto.fields structure

I highly doubt there's a bug here.  Look at your error message:

foo_wrapper =
subtree:add(f.f_foo_msg,buf(offset,msglen),buf(offset,msglen),"FOO message: "
.. payload_apdu .. "(" .. msglen .. ")")
Expert Info (Error/Undecoded): Lua Error: [string "redacted..."]:191: calling
'add' on bad self (string expected, got userdata)

What is payload_apdu?  Is it a string?  Also, the 2nd buf(offset,msglen) looks
wrong as that's not a value as the documentation indicates it should be.


You are receiving this mail because:
  • You are watching all bug changes.