This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Self compiled Wireshark does not start

0

Hello,

I built Wirehark with the newest source (wireshark-1.12.3), there are no errors or warnings, but it does not open. (Using the Wireshark.exe in wireshark-gtk2.) No error message shows up, also there is no wireshark process running.

Thankfully lal12

asked 13 Jan '15, 11:11

lal12's gravatar image

lal12
367712
accept rate: 33%

Did you get your sources using git or some other means?

(13 Jan '15, 14:39) grahamb ♦

I download the sources as .tar.gz from the website.

(13 Jan '15, 21:34) lal12

And what OS and build system are you using?

(14 Jan '15, 03:12) grahamb ♦

I am using Windows 8.1 and a 64bit environment as described in https://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html

(14 Jan '15, 06:17) lal12

I just compiled up the source from the .tar.gz using VS2013 to make an x64 copy of wireshark and it started OK.

So, something up with your build. Can you post a listing of the wireshark-gtk2 directory?

(14 Jan '15, 10:34) grahamb ♦

I recommend running nmake -f Makefile.nmake distclean first before running nmake -f Makefile.nmake all.

(14 Jan '15, 10:54) cmaynard ♦♦

I just used nmake without a target and it built without an issue.

(14 Jan '15, 13:26) grahamb ♦

I already did nmake -f Makefile.nmake distclean before, I uploaded my wireshark-gtk2 folder here: http://lucalindhorst.de/wireshark-gtk2.zip

(16 Jan '15, 04:59) lal12

Your build starts without any issue on my PC, so this seems really related to your PC. You might look at the Windows Event Viewer to see if any error is reported, or deactivate temporarily your antivirus software and see if it helps.

(16 Jan '15, 06:30) Pascal Quantin

Just throwing this out there, but is it possible that there's a problem with one or more preferences? Maybe try to remove all preferences and start Wireshark in a pristine state?

(16 Jan '15, 08:28) cmaynard ♦♦
showing 5 of 10 show 5 more comments

One Answer:

1

I examined the build in your zip file using the VS2013 debugger creating an exe solution. It crashed in glib. I then suspected incompatible libries and used Dependency Walker to look at what is loaded with Wireshark.exe.

The version of Lua you have in lua52.dll was built with VS2010 and is loading msvcr100.dll. The other components of your build (built with VS2013 RTM, which you should really update to Update 4) as expected load msvcr120.dll. Mixing the two MSVC runtimes is not permitted.

There's a bug in the 1.2.3 sources that don't correctly define the version of lua to use with VS2013, hence the automagic download pulled in the 2010 version of lua.

So your options are:

  1. Fix config.nmake to use the correct version of lua for VS2013 (basically copy the corresponding part from the current master version), see code below, and then run nmake -f Makefile.nmake setup to download the correct version of lua.
  2. Disable lua in your build (comment out setting of LUA_DIR in config.nmake).
  3. Build with VS2012 or earlier.
  4. Switch to building from master (1.99.x) which does build with VS2013.

Config.nmake changes to support lua in 1.12.x when building with VS2013 (note this is the x64 bit, there is similar for x86):

!IF "$(MSVC_VARIANT)" == "MSVC2013" ||  "$(MSVC_VARIANT)" == "MSVC2013EE"
LUA_DIST=-5.2.3_Win64_dll12
!ELSEIF "$(MSVC_VARIANT)" == "MSVC2012" ||  "$(MSVC_VARIANT)" == "MSVC2012EE"
LUA_DIST=-5.2.3_Win64_dll11
!ELSE
LUA_DIST=-5.2.3_Win64_dll10
!ENDIF
LUA_DIR=$(WIRESHARK_LIB_DIR)\lua5.2.3

answered 16 Jan '15, 06:39

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

edited 16 Jan '15, 06:45

Another possibility could be to install the MSVC2010 Redistributable, right?

The MSVC2013 Lua DLL is not part of the 1.12.X source tree because I added it after 1.12 branch creation. As the official release is built with MSVC2010, I (maybe wrongly) did not consider this as a bug and did not backport it.

(16 Jan '15, 07:02) Pascal Quantin

It's not the redistributable, it's because the process loads up both versions and they are incompatible. If the redistributable wasn't present the process would refuse to start complaining about the missing DLL.

The fix to config.nmake is very simple (required in 2 places though, for x86 & x64) and probably should be done.

(16 Jan '15, 07:30) grahamb ♦

I updated as you recommended to Update 4, run setup and distclean and builded again. But still the same problem, Wireshark doesn't start. I will debug it myself later, maybe I find the problem. If not I will upload it again.

(16 Jan '15, 08:23) lal12

You need to fix config.nmake and then run the 'setup' step as I've described above so that the correct version of lua for VS2013 will be downloaded and used.

(16 Jan '15, 09:56) grahamb ♦

Sorry, forgot to mention it, but of course I changed the config.nmake before.

(17 Jan '15, 01:55) lal12
(17 Jan '15, 02:24) lal12

Do you have (in the wireshark-win64-libs directory) lua-5.2.3_Win64_dll12_lib.zib? If not then you haven't got the correct version of lua.

(17 Jan '15, 02:45) grahamb ♦

I downloaded your zip and lua looks OK, but it still crashes in a call into libgobject.

The call stack:

libgobject-2.0-0.dll!0000000075b9562b() Unknown
libgobject-2.0-0.dll!0000000075b804c6() Unknown
libgobject-2.0-0.dll!0000000075b84367() Unknown
libgdk-win32-2.0-0.dll!00000000511744d3()   Unknown
libgobject-2.0-0.dll!0000000075b92927() Unknown
libgobject-2.0-0.dll!0000000075b7c2ce() Unknown
libgobject-2.0-0.dll!0000000075b7c862() Unknown
libgdk-win32-2.0-0.dll!00000000511746e4()   Unknown
libgtk-win32-2.0-0.dll!000000007467e8a3()   Unknown
libgtk-win32-2.0-0.dll!000000007466563c()   Unknown
libglib-2.0-0.dll!000000005126b5d7()    Unknown
libgtk-win32-2.0-0.dll!0000000074665a8b()   Unknown
libgtk-win32-2.0-0.dll!0000000074665ae9()   Unknown
libgtk-win32-2.0-0.dll!0000000074665b19()   Unknown
Wireshark.exe!main(int argc, char * * argv) Line 2444   C
Wireshark.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpszCmdLine, int nCmdShow) Line 3347 C

This requires some more work to debug. Having the pdb's for GTK would give function names, but as GTK for Windows is compiled with MinGW it appears that they aren't available. Yet another reason to drop GTK.

For now I can only suggest that you delete the entire contents of wireshark-win64-libs, delete your build directory and start with a fresh copy of the sources. There is something in your environment that isn't correct but I can't see what it is yet.

(17 Jan '15, 02:57) grahamb ♦

The "lua-5.2.3_Win64_dll12_lib.zip" file is in the lib folder.

(17 Jan '15, 10:31) lal12
showing 5 of 9 show 4 more comments