Wireshark-dev: Re: [Wireshark-dev] GUIManger in menus.c

Date Prev · Date Next · Thread Prev · Thread Next
From: Anders Broman <anders.broman@xxxxxxxxxxxx>
Date: Fri, 1 Oct 2010 16:25:23 +0200
 

-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Guy Harris
Sent: den 1 oktober 2010 02:30
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] GUIManger in menus.c


On Sep 30, 2010, at 3:29 PM, Jeff Morriss wrote:

>> Anders Broman wrote:
>>>  Hi,
>>> When using GUIManager for the main menu bar, it blows up loading a file. 
>>> Could some one take a look
>>> and help me figure out what's wrong? The recent file stuff is also 
>>> broken - probably related.
>> 
>> It's bailing out here:
>> 
>> ERROR:column-utils.c:1175:col_set_cls_time: code should not be reached
>> 
>> That means timestamp_set_type() has not been called.
>> 
>> When we're not using GUIManager, that function is called (during
>> startup) in timestamp_format_cb().
>> 
>> That function is not called during startup when using GUIManager... 
>> Hmmm, actually it's not being called at all.
>
>It's called in:
>
>	change_configuration_profile() (after reading the "recent" file, it's set to the value from that file)
>
>
>	main(), if "-t" is specified;
>
>	reftime_answered_cb() (if you answer "yes" to "Do you want to switch to "Seconds Since Beginning of Capture" now?")
>
>	timestamp_format_cb() (when you explicitly set it through the GUI)
>
>change_configuration_profile() is called only in profile_select() and select_profile_cb(), when you choose a 
>profile.
>
>The reason why it doesn't start out as TS_RELATIVE in Wireshark is, to quote the comment:
>
>	so that "recent" in gtk/menu.c can detect this and distinguish it from a command line value
>
>That refers to menu_recent_read_finished(), which sets recent.gui_time_format to the current time stamp value if >it's not TS_NOT_SET, i.e., if it was set on the command line, that setting overrides whatever is in the recent 
>file.
>
>Is there some reason not to read the recent file *before* parsing the command-line arguments, so that we can 
>just have the time stamp format initialized to TS_RELATIVE, override it from the recent file, and then possibly >override *that* from the command line?

I have checked in some changes to menus.c, - earlier read of prefs is still a good idea -
It still crashes, but I don't get a decent indication of where - help?
Best regards
Anders
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe