Jump to content
  • Advertisement
Sign in to follow this  
CrazyCdn

XP/Windows 7 and VS 2010 Issue

This topic is 2696 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So it's been a long time since I've posted on here. But I know some of the smartest people hang out on these forums so figured my wasted few hours of searching Google might get answered here.

Situation:
I have a Windows 7 development box (primary) and a Windows XP laptop.
Both have legal copies of Visual Studios 2010 installed on them (Not EE but Ultimate, doubt it makes much of a difference here).
Now I can take the solution from the Windows 7 box that compiles and runs fine and put the executable on the XP machine and it crashes with a memory error (all Debug build).
I can compile the same solution as above and it does the exact same thing.

I've also tried running it on several other XP machines and it does the same thing. I'm not doing ANY 64 bit coding and I've looked through the configuration of the solution several times and I see nothing glaring at me that could be wrong.

Oh, I'm also trying to find a Vista machine to test it on too, 32bit and 64bit (not tried 64 bit XP, don't have access to it).

Its crashing on a function that returns an ID (int, set to 0 in the constructor). In the debugger the value is valid and then it just blows up (I see nothing wrong anyways).

So before I start fighting with the code (oh and it needs to run on XP the clients are unwilling to upgrade, small business in this economy I'm not pushing the issue), I want to know if its some simple configuration issue or most likely code that I inherited.

Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Debug run-time libraries are not redistributable. So unless you install full visual studio on those machines, you're missing that. If those libraries were somehow installed, they are likely incorrect version so anything can happen.

Share this post


Link to post
Share on other sites
As I said, both have the exact same copy of Visual Studio installed (different key but used the same physical CD). I know the debug libraries are not redistributable, Microsoft makes that very clear, but thanks anyways.

Oh all our Window 7 boxes (we've completely changed over, I have two XP boxes at home and it does the same thing on those (they have Visual Studios 2010 EE on them). Compiles but does not run, just crashes.

Sent a copy to a friend who has Vista and I got the ok from the owner of the software.

Any other ideas?

Share this post


Link to post
Share on other sites
Maybe need to check your WINVER/etc #defines? Make sure that they're not 0x600 or higher (i.e. that they're valid for XP) otherwise you might be linking to Vista+ specific code.

Share this post


Link to post
Share on other sites
XP uses a somewhat different heap implementation to 7. It's possible you have a bug which is only showing up on XP. Try using Application Verifier to enable page heap mode and see if that finds any issues.

Share this post


Link to post
Share on other sites
I have had some funny issues with XP & 7 also. My work around was to compile with VS.net 2003 on my XP box and all was good. But this may not be an option for you here.

What happens if you complie with VS.net 2010 on your xp box first and use that executable for XP and Win 7.

I'd love to know if this fixes your problem.

Share this post


Link to post
Share on other sites
Memory error eh? Something like 0xC0000005?

That usually means you've fucked up somewhere with your pointers.

My suggestion, make sure you have the appropriate visual studio redistributable, run it in release mode.

If you're running debug mode, do it from vs and start with debugging. at least that way you can find out where it's crashing.

Share this post


Link to post
Share on other sites
Quick update:

@Adam_42:
I wasn't too sure if it did things the same or not as per heap allocations, I am using Boost Smart Pointers but think I'm going to move to 90% weak pointers and only have 1 actual smart pointer. I'm downloading Application Verifier shortly, PSU died on my PC today. Joy!

@lonewolff:
I have Visual Studios 2005 so I am going to try that more as a last resort. Compiled and ran both debug and release mode executable's from the XP machine on the 7 box and they ran fine. Doesn't really narrow down too much though, just that its compiling the same.

@Washu:
Yeah, starting to think the same thing, though it doesn't use raw pointers anywhere I can find, though I am about to throw in a lot more logging code to verify everything and narrow it down. I think its mostly frustrating that it works fine in 7 but doesn't in XP. Time to find out where it's trashing (or not allocating) memory. I was hoping it was just a settings issue for a simple fix. But this is now my current to-do list bug so gloves off time.

Share this post


Link to post
Share on other sites
Solved.

I thought I had gone through all this guys code, but apparently I missed one critical file. He decided to write his own new/delete operators (global) and I've not found out what he was doing wrong but removing that from the project solved the issues completely and for as far as I care, fixes the problem. I'm assuming he did something 64bit related or otherwise weird. Would have been nice if the code was included in the solution file instead of being hidden inside some config.h and in a block of code minimized (I prefer my code fully expanded, for a reason).

Anyways thanks for all the help, still going to run Application Verifier just to see what it does and if it finds anything...

Thanks!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!