Click here to Skip to main content
15,918,742 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

Our application is currently failing to start up on a client's 64-bit Windows 7 workstation. There are no error dialogs, but fortunately, using dependency walker, we've got some logs that seem to suggest a second-chance Access Violation error.

We have done an array of tests, such as DEP, administrator privileges, and security settings with the firewall. The past version of our program runs perfectly fine, and we've repeated the installation a few times, so we've ruled out hardware.

Changes between the last build and the current build include the addition of some DLLs, one of which is a mixed DLL. We are using VS 2003, but we don't really meet any of the conditions specified in the mixed DLL problem documented by MS. This has not happened, and can't be reproduced on our local 64-bit Windows 7 machine.

Any experience with similar problems/advices for debugging would be appreciated!

Thanks in advance!

EDIT (SOLUTION) ===============


The problem appears to be resolved with the delay loading of some of the mixed DLLs in our application. Just in case someone else runs into a similar problem.
Posted
Updated 20-Jan-11 7:35am
v3
Comments
Sergey Alexandrovich Kryukov 20-Jan-11 12:34pm    
Asking just in case: perhaps you tried to link some 32-bit executable to some 64-bit or visa versa, could that be possible?

hello; have you tried running it on other machine having windows 7?
some times this error comming if he upgraded the RAM...
Make older programs run in this version of Windows (Windows 7)
http://windows.microsoft.com/en-us/windows7/Make-older-programs-run-in-this-version-of-Windows
As to the Access Violation message, what might help is if you right-click on the shortcut or .exe for the program and select the "Run As Administrator" option.
The other Access error messages might be solved via this.
How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
http://support.microsoft.com/default.aspx/kb/929135It also might pay you to do a bit of a malware check.

check that also Link1[^]
link2[^]
hope this will help...
 
Share this answer
 
v2
Comments
#realJSOP 20-Jan-11 13:34pm    
Fromt the OP: Thanks for the response. Yes, we've tested on other machines with Windows 7. We've also tried the compatibility tool. The Access violation thing actually never pops up, we only detected it after we used dependency walker. We've tried Run As Admin already and it didn't work. We will try to get the client to run some malware check.
For visual studio 2010 , there is a Remote Debugger you can use that tool.
And before building your project in 64bit always check your "References" in "Solution Explorer", to see the reference do support 64bit environment or not.
 
Share this answer
 
Make sure your client's .Net configuration matches yours. If it runs fine on your local machines, that's got to be the problem. maybe something isn't in the GAC that needs to be - remember to check that too.
 
Share this answer
 
I've run into this in the past. The C# assemblies can be compiled as AnyCPU, which means they will run as either x86 or x64 depending on the OS. You cannot do that with the mixed mode DLLs. One workaround (easy/dirty) we have used is to force x86 so that everything runs in 32 bit mode (even on 64 bit OSes). The alternative is to maintain 2 installers, one for 32 bit and one for 64 bit.

[Edit]
---------

Delay loading may have just hidden potential problems. Once your app is loaded as 64 bit (meaning the 64 bit CLR is in use), then you cannot interop with a 32 bit mixed mode DLL.
 
Share this answer
 
v2
Comments
Espen Harlinn 20-Jan-11 14:40pm    
Remeber all the thunking stuff MS created when the world shifted from the 16-bit segmented memory model to the "flat" 32-bit model? Now that the world is shifting into 64-bit mode, they're making no such effort, and this time around it would have been easier to implement and use ...
Nish Nishant 20-Jan-11 14:55pm    
Yeah, thunking does not bring back good memories, not at all :-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900