How to profile/trace compiled c++ application - c++

I have a Compiled c++ application which consists of the EXE and 1 DLL. When the application start the app crashes at when the loader reaches 30%. I have searched the machine up and down and could not find any type of log or anything in the event viewer. Is there some sort of application which could be used to trace which files the application is accessing or at least generate some sort of error log for this compiled application.
I have tried contacting the original vendor but they seem to have gone out of business. Any advice or help would be greatly appreciated!

You can try MS Dr. Watson.
Click Start, and Run.
Type drwtsn32, and execute it.
But its logs can be very verbose and hard to interpret.

Related

Unique scientific software getting 0xc00007b error after update on Windows 10

The program is a custom developed user interface and calculation tool built-in c++ and QT, it uses unfortunately a lot of different components, And I can't tell what's failing because of the nondescriptness of the error code.
Program compiles just fine and was working perfectly well before the update, unfortunately, this is a project I've been working on for quite a while and is quite large.
Thank you
Sorry for such an inane question
EDIT:
as for running it with a debugger, it does not get to that point, the program starts to launch, then dies with that error message, thank you
Edit:
code was 100% fine before the update, so was looking for advice, sorry
Looks like STATUS_INVALID_IMAGE_FORMAT to me. So it failed trying to load the *.exe file or some *.dll dependency.
To figure out which binary it had trouble loading you can use Gflags to enable loader snaps for your *.exe file.
Then when you start your exe file from within a debugger like WinDbg it should output the loader debugging info.

AQTime DLL profiling - no results

I am trying to profile memory allocation in a DLL, say pluginDLL.dll. I create a new project in AQTime and add the module 'pluginDLL.dll'. This DLL is compiled in Release x64 with VisualStudio 10, all my projects are C++. This DLL is linked to a lib. Say algo.lib. I add to the AQTime project the DLL algo.dll.
pluginDLL.dll is a DLL programmed on an API to an application, say MainApp.exe. If I launch MainApp.exe, then open my plugin, the process MainAppSDK starts. This process starts when any plugin written with this SDK starts.
So, to run the profiling, I proceed as follows (I have already created the project with the two DLLs): I launch manually MainApp.exe. I open manually my plugin, so that MainAppSDK process starts. In AQTime, I attach the process MainAppSDK, and runs the profiling.
If I check Check Memory Bounds, application crashes. Warnings in Event pane are of type 'Access violation' in some msvcr100.dll.
If i check two other options only, i can run my plugin to the end. I can read messages from my application in the event pane, stating that application ran to the end successfully. Before it ends, I click the camera to get the results. And then results are generated but are empty...
Could you help me troubleshoot?
Try starting you profiling using the approach described in the Profiling Multiple Processes help topic instead of just attaching to the running process.
If this does not help, try using the online AQtime Troubleshooter.

is there a service to create and upload crash dumps for mac and win apps?

I have a cross platform desktop C++ app for Mac OSX and Windows, for which I'd like to collect debug info when a crash happens on a user's computer, so I can find out what the problem is and fix my code. On Windows I'm using visual studio express 2010 and on Mac I'm using Xcode 3 as IDE. I remember an online service where you could sign up and link your code with a library, so the app would upload crash info to the service, which you could then use to fix the app, but I can't find it anymore after googling for 10 minutes. Can anyone help?
Thanks!
B
Please see here for the google-breakpad project. I think this is what you need. I was going to use it for a project so I researched about it but then the project ended so I didn't have a chance to. You link your program with it and when the program crashes, it generates a crash dump that is not compatible with any of the platform-specific crash dump formats but has its own one. You can then analyse them with a program that is part of the breakpad project. As far as I remember, there is also a service that you can install, where the crash dumps can be uploaded. The service then can analyse and group them by reason etc.
Hope that helps.

MFC, just need some directions

I usually don't expect help from outside but I need to solve this quickly and hence am looking for some directions. I have a 6 year old MFC based application running in an xp machine and deleted some files/programs to free some space in C drive to install additional applications. After installing my new program (Labview 8.6), I find that I'm no longer able to run the MFC based one. I tried doing System restore and what not but I get the following error when I start the app.
Debug Assertion Failed!
Program : ....
File : dlgdata.cpp
Line : 43
(Press retry to debug the application)
Abort Retry Ignore
This dlgdata.cpp is an MFC core file and line 43 is ASSERT(FALSE) in function HWND CDataExchange::PrepareCtrl(int nIDC) , and I'm clueless as to what has gone wrong. I'd be grateful if I just get some pointers to start debugging.
You are missing some MFC libs (either MSFT or some third party) that implment the control you are trying to use.
Try installing the redistributable spackage http://www.microsoft.com/Downloads/details.aspx?FamilyID=32bc1bee-a3f9-4c13-9c99-220b62a191ee&displaylang=en
edit: this question might help work out which lib you need
Run Process Monitor and start your app. You should be able to see what DLL the program is trying to access. Then it's off to Google to (hopefully) find out what the DLL belongs to.

'Start Debugging' takes forever in VisualStudio 2005

I have a large project that has > 1000 files.
When I press the green 'Play' button to start debugging, once everything is built, it can take up to 5 minutes for the app to start running.
It looks like Visual Studio is loading and unloading various DLLs, but it also just sits there occasionally doing nothing.
Running from the command line takes only a few seconds.
What's going on? How can I speed it up?
[EDIT] It turned out to be our Symbol Server. The administrator had killed it without informing anyone. Doh.
Thanks for your help guys.
Some thoughts and suggestions:
It could be caused by complex dependency checking that VS2005 does to ensure that no components have changes and have to be re-built prior to debugging. Sometimes tweaking the inter-project dependencies in the solution can help.
Are you using source control integration in Visual Studio? If so, sometimes accessing the source control repository elsewhere on the network can cause Visual Studio to slow down like this. If using a source control system like ClearCase where you can reduce unnecessary LAN communication (e.g. using a snapshot view), consider doing this.
I also find that running the executable separately (from outside Visual Studio) and then using VS2005 to attach to the process can be much faster. This is predominantly the way I work, and I find it much less frustrating.
Another thing to consider is whether you are using a symbol server to access debug symbols for the Windows DLLs. If so, VS2005 can sometimes try to access the symbol server every time you debug. The way around this is to load the symbols once, and then uncheck the symbol server URL under Tools->Options->Debugging->Symbols. As long as the OS libraries haven't changed since you last downloaded the symbols, there's no reason to access the remote server every time.
It sounds like it could be loading symbols for various DLL's which you probably don't care about. You can disable these in Options.
If not, what do you see in the Output window?