Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Tags in this Discussion

Debug problem with Scenix 7 on windows
  • Hello,

    I installed Scenix 7.2 on XP today but when I launched the execution files under debug directory, it just told me that there was a problem with dbghelper.dll. I found a newer version of the dll but then I got an error about missing functions in msvcrt.dll. So could you please tell me what should I do to resolve this problem rapidly?

    Bests
  • 12 Comments sorted by
  • SceniX 7 uses a backtrace mechanism for leak detection and some other internal debug features which needs the dbghelp.dll of a version 5.1 or newer. Windows XP for example comes with a version which is too old. (Copy the whole link, formatting breaks it:)
    http://msdn.microsoft.com/en-us/library/windows/desktop/ms679294(v=vs.85).aspx

    If that doesn't help you need to be more detailed and precise:
    Which Windows XP system exactly?
    Which debug folder, crt90 or crt100, 32- or 64-bits?
    Do you have Visual Studio installed on that machine of the matching version?
    Installed Visual Studio service packs and Visual C redistributables would influence the error on the CRT.
  • I use xp 64 bit with Service pack 2. I installed visual C++ 2010 express. I tried the 32/crt100 debug fold, it should be correct right? The problems come from MSVCRT.dll (the problem of dbghelper has been resolved). In fact there are sevaral functions don't exist in the dll of my XP so....but I know I cannot just copy a windows 7 msvcrt.dll into my xp, the system will not boot any more...so is there any patch windows that could do the trick?
  • SceniX is built with Visual Studio 2008 Professional SP1 and 2010 Professional SP1 under Windows. We have not tested if Visual Studio Express works.
    I would recommend to repeat the Windows Update process until there are no more service packs and security fixes for your OS and Microsoft applications pending.

    Second, debug executables do not use msvcrt.dll, that is a release VC redistributable.
    Instead debug builds of the CRT are non-redistributables. The one which would match SceniX' crt100 32-bit debug builds is named msvcr100d.dll and only comes with the resp. Visual Studio installation. There is no way to download these non-redistributables individually.

    Any of the release VC redistributable packages can be downloaded from Microsoft's MSDN site and they install in the Side-by-Side DLL configuration on your system, so it's possible to have multiple versions installed and the manifests figure out which one to use.

    So what you first need to find out is, which part of whatever you try to run wants to use which release version of the CRT.

    If there is a mismatch of versions you get an entry inside the system events. Use the event viewer to find all application and system errors. If there is something wrong with manifests of DLLs you will find information in the most recent entries after you provoked the error.

    Then there is the Dependency Walker which allows you to find which module uses what library and which version of it: http://www.dependencywalker.com/
    (This tool was included in Visual Studio 2003 versions, but is standalone now.)


    Other than that, I once tested the command line compilers inside the Windows SDK 7.1 and successfully built a debug 64-bit WinMinimal version with the included compiler, but that involves command prompt skills.
    That SDK comes with some Visual Studio 2010 compiler version. In case you want to try that, watch out the installation is a mess. You probably need to run it multiple times to get all things installed.
    There are also methods to use these from within the Visual Studio Express IDE which would be the only way to get 64-bit builds done with a free version, but I have not tried that myself. You would need to search the internet for solutions.
  • I tried to run examples in x86\win\crt90\debug too and they didn't work. I have visual studio 2008 SP1 professional installed. Here attaches the screenshot of the error message
    Scenix7_debug_error.jpg
    611 x 134 - 16K
  • Sorry I've a French system but it just means it cannot find the entry of wcsncpy_s in msvcrt.dll
  • And have you done anything of what I explained to find out the root cause?
    Just for clarification, the examples in the release folders work?
  • Yes the release examples work. I'll try install all the patches of xp...
  • Hi Detlef, I think my system is up to date now. But I still get this trouble. Are you sure that the bebug examples work on XP 64 bit with service pack 2?
  • 1.) How exactly did you solve the dbghelp.dll version issue?
    Where did you "find a newer version" of this?
    Means what of the Windows SDK debug tools did you install to get it updated?
    2.) Have there been any entries inside the system event viewer providing more information?
    3.) Did you analyze which msvcrt.dll you are having and which versions are required with the Dependency Walker?
    4.) Did you search for all msvcrt.dll copies on your system? If there are multiple check their versions and in which order they appear inside the PATH environment variable.
    5.) Have you installed any newer vc_redist packages from the MSDN site to solve possible mismatches?
    6.) Did you build any of the debug examples on your system and do they work?
  • I've verified that the download of the Debugging Tools for Windows Redistributables and installing the matching x86 *.msi package contains a dbghelp.dll which when copied into the debug folder under XP 64 SP2 will let the executables run.

    So I would recommend the following:
    - If you didn't use the dbghelp.dll from that location, delete the version you found.
    - Go to this site: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=8279
    - Download the winsdk_web.exe installer.
    - Start it and deselect everything except the Debugging Tools option under the Redistributable Packages.
    That downloads three *.msi files for x86, x64, and Itanium into the Windows SDK 7.1 folder you specified.

    - Find the x86 msi file and install it.
    - It will install to Program Files (x86)\Debugging Tools For Windows (x86)
    That contains the dbghelp.dll for 32-bit you need.
    - Find that and copy it into the SceniX 7.2\bin\x86\win\crt90\debug folder.

    Repeat these last steps for the amd64 msi file. It will install to Program Files\Debugging Tools For Windows (x64). Copy the 64-bit DLL to the SceniX 7.2\bin\amd64\win\crt90\debug folder.

    On a clean machine without Visual Studio installed (which I use for remote debugging), you also need to copy the matching debug CRT non-redistributables from your compiler into those folders.

    If you still have a problem after that, follow my previous bullet points 2.)-6.) to determine where you have the wrong msvcrt.dll dependency.
  • Thank you very much. It works now after copying the dll in the debug folder.
  • Phew, finally. ;-) Have a good weekend.

    That's a good thread for other SceniX users still working under Windows XP systems.