Visual Studio C++ Program Fails to Work Right on Other Computers Using Static Libraries

Started by
6 comments, last by ApochPiQ 7 years, 2 months ago

I am trying to get my application that was created on windows 10 (64 bit), Visual Studio 2015 (32 bit) to work on other computers (win 7 - 64 bit and vista - 64 bit.) I decided to use the application with a static library, however I do have questions otherwise for later.

I set the : Configuration Properties -> C/C++ -> Code Generation -> Runtime Library to multi-threaded (/MT) and multi-threaded debug (/MTd) for release and debug configurations respectively so that they would work with the static libraries instead of the dlls.

The actual application setting on Visual Studio toolbar is for Debug x86. Both computers works momentarily (displays some graphics using blits, etc. and interact with keyboard) and then seemingly at random points (maybe 3-5 seconds) their screen turns white and I am getting this error report on the windows 7 computer :

Description:
A problem caused this program to stop interacting with Windows.
Problem signature:
Problem Event Name: AppHangB1
Application Name: Project2.exe
Application Version: 1.0.0.1
Application Timestamp: 589fa183
Hang Signature: e119
Hang Type: 0
OS Version: 6.1.7601.2.1.0.768.3
Locale ID: 1033
Additional Hang Signature 1: e1198e0ae381b0a6c70426599bd22854
Additional Hang Signature 2: 86fa
Additional Hang Signature 3: 86fa2d8a6f2084a40636a9bfafc12b71
Additional Hang Signature 4: e119
Additional Hang Signature 5: e1198e0ae381b0a6c70426599bd22854
Additional Hang Signature 6: 86fa
Additional Hang Signature 7: 86fa2d8a6f2084a40636a9bfafc12b71
It didn't report to Microsoft to solve the problem right either.
It is interesting that both of the different computers work only momentarily.
I need help please,
Josheir
Advertisement
Attach a debugger to the program and see why it's crashing. Alternately, save a crash dump using Task Manager and inspect that from a machine that has a debugger available.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

There are too many possibilities. You'll have to get a crash dump (or if you can, remote debug it) like ApochPiQ suggests.

My best guesses are:
- They might need the VC++ redistributable (even if you statically linked).
- Using an API which is not available on their computers.
- Anti-virus on their computers blocking your app for some reason.
- Attempting to load a file which is missing or in a different location.
- Some memory corruption bug which you haven't run into on your machine YET.

Wow, thanks I never knew about a crash dump before. It didn't think of using a debugger on the other computer either. If anyone else is new like me see this for a quick well written article on crash dumps and using the task manager.

https://blogs.msdn.microsoft.com/debugger/2009/12/30/what-is-a-dump-and-how-do-i-create-one/

Thank you,

Josheir

It may not be the cause of your crashes in this case, but for future reference you can use this tool (or similar) to find which dlls your .exe needs to run, and this is highly recommended before distributing your program:

http://www.dependencywalker.com/

Not a direct solution to your problem, but a hint that I found helpful:

Microsoft provides a number of free virtual machine images:

https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

These are ostensibly for testing IE compatibility, but are a great way to test out your game on a "clean" install of Windows without having to have a computer dedicated to that purpose. You might have issues with DirectX compatibility with your virtualization software, but I've gotten great use from these.

Hope that helps someone,

Geoff

The program didn't crash, it hung. That implies that either you stopped processing the message queue, or you entered an infinite loop somewhere.

The program didn't crash, it hung. That implies that either you stopped processing the message queue, or you entered an infinite loop somewhere.


This is true, and a good point - however, OP is lucky in that generating a crash dump while the program is hung will conveniently give a call stack for where it's stuck.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

This topic is closed to new replies.

Advertisement