wireshark-dev October 2010 archive
Main Archive Page > Month Archives  > wireshark-dev archives
wireshark-dev: Re: [Wireshark-dev] GUIManger in menus.c

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

From: Anders Broman <a.broman_at_nospam>
Date: Fri Oct 01 2010 - 15:53:03 GMT
To: Developer support list for Wireshark <wireshark-dev@wireshark.org>

  Jeff Morriss skrev 2010-10-01 16:43:
> Anders Broman wrote:
>>
>>
>> -----Original Message-----
>> From: wireshark-dev-bounces@wireshark.org [mailto:wireshark-dev-bounces@wireshark.org] 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?
> Try 34310. It looks like you fixed the timestamp issue--can load a
> capture file now. :-)
It should have been the double slashes "//Menubar.." that caused that.
Unfortunately I still get a crash on Windows...
Thanks
Anders
> (You should get a Linux VM or something--gdb and backtraces are your
> friend!)
I'll consider that :-)
> ___________________________________________________________________________
> Sent via: Wireshark-dev mailing list<wireshark-dev@wireshark.org>
> Archives: http://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
> mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe
>

___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe