While loading a PCAP file it crashes.
To reproduce the problem I have just to follow the Example 1 and when I start the capture the program crashes. The problem is that tshark is using a deprecated option (or so it says the log) and it just exits, creating an error on Foren6 and causing a crash.
It happens using Foren6 from Git or *.deb package on Ubuntu 12.04 LTS (I'm using Instant Contiki), "tshark -v" shows: "TShark 1.11.3 (SVN Rev 53420 from /trunk)"; and the console output of Foren6 after causing the crash is in the end of the issue (LOG1).
By using #DEFINE USE_NEW_TSHARK in the sniffer_packet_parser.c file, it does solve the problem but I get another one instead, marked as LOG2 in the end of the issue.
LOG1
Loading /usr/lib/foren6/interfaces/libinterface_pcap.so
Registered interface pcap from file /usr/lib/foren6/interfaces/libinterface_pcap.so
pcap interface initialized
Loading /usr/lib/foren6/interfaces/libinterface_sensnif.so
Registered interface sensnif from file /usr/lib/foren6/interfaces/libinterface_sensnif.so
snif interface initialized
Loading /usr/lib/foren6/interfaces/libinterface_snif.so
Registered interface snif from file /usr/lib/foren6/interfaces/libinterface_snif.so
snif interface initialized
PktSync: New iface: /usr/share/doc/foren6/pcaps/example1-rpl-collect.pcap, nb root = 1
PCAP reader started
tshark: -R without -2 is deprecated. For single-pass filtering use -Y.
tshark exited
Could not start tshark
LOG2
Loading /usr/lib/foren6/interfaces/libinterface_pcap.so
Registered interface pcap from file /usr/lib/foren6/interfaces/libinterface_pcap.so
pcap interface initialized
Loading /usr/lib/foren6/interfaces/libinterface_sensnif.so
Registered interface sensnif from file /usr/lib/foren6/interfaces/libinterface_sensnif.so
snif interface initialized
Loading /usr/lib/foren6/interfaces/libinterface_snif.so
Registered interface snif from file /usr/lib/foren6/interfaces/libinterface_snif.so
snif interface initialized
PktSync: New iface: /usr/share/doc/foren6/pcaps/example1-rpl-collect.pcap, nb root = 1
PCAP reader started
(process:32359): GLib-CRITICAL *: g_hash_table_lookup_extended: assertion `hash_table != NULL' failed
*
ERROR:wmem_core.c:50:wmem_alloc: assertion failed: (allocator->in_scope)
tshark exited
Could not start tshark
make: *** [run] Error 1
While loading a PCAP file it crashes.
To reproduce the problem I have just to follow the Example 1 and when I start the capture the program crashes. The problem is that tshark is using a deprecated option (or so it says the log) and it just exits, creating an error on Foren6 and causing a crash.
It happens using Foren6 from Git or *.deb package on Ubuntu 12.04 LTS (I'm using Instant Contiki), "tshark -v" shows: "TShark 1.11.3 (SVN Rev 53420 from /trunk)"; and the console output of Foren6 after causing the crash is in the end of the issue (LOG1).
By using #DEFINE USE_NEW_TSHARK in the sniffer_packet_parser.c file, it does solve the problem but I get another one instead, marked as LOG2 in the end of the issue.
LOG1
Loading /usr/lib/foren6/interfaces/libinterface_pcap.so
Registered interface pcap from file /usr/lib/foren6/interfaces/libinterface_pcap.so
pcap interface initialized
Loading /usr/lib/foren6/interfaces/libinterface_sensnif.so
Registered interface sensnif from file /usr/lib/foren6/interfaces/libinterface_sensnif.so
snif interface initialized
Loading /usr/lib/foren6/interfaces/libinterface_snif.so
Registered interface snif from file /usr/lib/foren6/interfaces/libinterface_snif.so
snif interface initialized
PktSync: New iface: /usr/share/doc/foren6/pcaps/example1-rpl-collect.pcap, nb root = 1
PCAP reader started
tshark: -R without -2 is deprecated. For single-pass filtering use -Y.
tshark exited
Could not start tshark
LOG2
Loading /usr/lib/foren6/interfaces/libinterface_pcap.so
Registered interface pcap from file /usr/lib/foren6/interfaces/libinterface_pcap.so
pcap interface initialized
Loading /usr/lib/foren6/interfaces/libinterface_sensnif.so
Registered interface sensnif from file /usr/lib/foren6/interfaces/libinterface_sensnif.so
snif interface initialized
Loading /usr/lib/foren6/interfaces/libinterface_snif.so
Registered interface snif from file /usr/lib/foren6/interfaces/libinterface_snif.so
snif interface initialized
PktSync: New iface: /usr/share/doc/foren6/pcaps/example1-rpl-collect.pcap, nb root = 1
PCAP reader started
(process:32359): GLib-CRITICAL *: g_hash_table_lookup_extended: assertion `hash_table != NULL' failed
*
ERROR:wmem_core.c:50:wmem_alloc: assertion failed: (allocator->in_scope)
tshark exited
Could not start tshark
make: *** [run] Error 1