termshark icon indicating copy to clipboard operation
termshark copied to clipboard

On live capture, protocol pane flashes and "loads" for same packet

Open pocc opened this issue 6 years ago • 5 comments
trafficstars

Prerequisites

  • Running v2 candidate 2a5d55c0a9b826e74213a8c1937a7c16d8e8aa9e

Problem

Current Behavior

Hex bytes randomly refreshes with "Loading"

Expected Behavior

While capturing, current frame panes should not be updated

Screenshots as applicable

Screen Recording 2019-11-08 at 1 53 46 PM

Steps to Reproduce

  1. mbp:termshark rj$ go run cmd/termshark/termshark.go
  2. Stay on one frame and wait for behavior

Context

Note: Have not tested on other OSes/devices

OS: Macos 10.14, laptop

Tshark:

mbp:termshark rj$ go run cmd/termshark/termshark.go -v | cat
TShark (Wireshark) 3.0.3 (v3.0.3-0-g6130b92b0ec6)

Copyright 1998-2019 Gerald Combs <[email protected]> and contributors.
License GPLv2+: GNU GPL version 2 or later <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with libpcap, without POSIX capabilities, with GLib 2.37.6,
with zlib 1.2.11, with SMI 0.4.8, with c-ares 1.15.0, with Lua 5.2.4, with
GnuTLS 3.4.17, with Gcrypt 1.7.7, with MIT Kerberos, with MaxMind DB resolver,
with nghttp2 1.21.0, with LZ4, with Snappy, with libxml2 2.9.9.

Running on Mac OS X 10.14.6, build 18G103 (Darwin 18.7.0), with Intel(R)
Core(TM) i7-4770HQ CPU @ 2.20GHz (with SSE4.2), with 16384 MB of physical
memory, with locale en_US.UTF-8, with libpcap version 1.8.1 -- Apple version
79.250.1, with GnuTLS 3.4.17, with Gcrypt 1.7.7, with zlib 1.2.11, binary
plugins supported (0 loaded).

Built using clang 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.4).

pocc avatar Nov 08 '19 22:11 pocc

Hi Ross - I'm not sure what's triggering this. I did make some recent changes in the code that sets this Loading message, but I don't have a theory. If you want to get your hands dirty, the function setLowerWidgets in ui.go is a good starting point around line 1439. You could also see if getCurrentStructModel in ui.go is returning nil for packet 388. If you let the load go past 1000 packets - but keep the cursor over 388 (or something < 1000) - does the flickering go away?

gcla avatar Nov 09 '19 04:11 gcla

It does seem to flash on every 1000 packets.

pocc avatar Nov 15 '19 21:11 pocc

Hi @pocc - I think this is resolved now with v2.2. If you get a chance, could you give it a try? I overhauled the code that runs the tshark processes and funnels the data to the UI. Of course if you have auto-scroll on, the UI will update as packets arrive because the packet list view will track the last packet read. To stop that happening, just cursor up once in the packet list view so you're not on the last packet. Hit end to resume auto-scroll.

gcla avatar Jan 10 '21 20:01 gcla

I appreciate the effort that you've put into the new version. I am still seeing this issue though on most recent v2.2.0 on macos.

https://user-images.githubusercontent.com/10995145/104255735-93cf5780-542e-11eb-8adb-d4e3345121d1.mov

pocc avatar Jan 12 '21 01:01 pocc

Drat! Thanks, I'll investigate!

gcla avatar Jan 12 '21 01:01 gcla