Wireshark-dev: Re: [Wireshark-dev] Crash on Edit > Preferences
From: Bill Meier <wmeier@xxxxxxxxxxx>
Date: Wed, 03 Dec 2008 15:11:13 -0500
Abhik Sarkar wrote:
Hello All,

My SVN copy of Wireshark has been, for a while, crashing when I go to
Edit > Preferences. I finally decided to get to the bottom of this and
have some very strange observations... but to start at the beginning:
OS: Windows XP Professional
SVN revision: 26908
Build Env: VC++ 2008 EE

To investigate, I start Wireshark and then attach to it from VC++.
Then I go to Edit > Preferences. The result is that the program always
stops due to an access violation and VC++ opens the file packet-vnc.c
and breaks at this block in vnc_server_framebuffer_update
		case ENCODING_COPY_RECT:
			bytes_needed =
				vnc_copyrect_encoding(tvb, pinfo, offset,
						      vnc_encoding_type_tree,
						      width, height);
			break;

I can't figure out what packet-vnc.c would have to do with my going to
Edit > Preferences, but that what always comes up. Perhaps I am doing
something wrong. Can someone help out or suggest a new approach to try
and find the problem?

Version 1.0.4 works properly on the same machine.


Is this similar to bug #2053 ?
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2053)

Are you displaying packets (from a file or whatever) when you
go to edit ! preferences ?

When do you get the crash ? If you are displaying packets and the crash happens when you exit edit ! preferences, then the bug might be the same as #2053.

If not, can you step through the edit ! preferences code to see when the crash occurs ?



(I worked on bug 2053 for a while, made some progress but eventually got frustrated.

I found that the problem seemed to have something to do with the GUI code invoked when redissecting packets after a preferences change and related to a gui callback during that code to redisplay the selected packet.

My sense was that there was some kind of issue between the main line code and the callback which (sometimes) caused a crash.
(Dependent upon the exact leftovers on the stack ?? other ??).

I would repeat what seemed like the same sequence of user actions and only sometimes get a crash.

I got far enough to see that I would have to spend some amount of time understanding in detail the GUI code related to displaying the packet dissection but then ran out of energy).