Weird Issue with compiled .exe

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
night_hawk
Posts: 153
Joined: Mon Mar 03, 2008 8:42 am
Location: Suceava - Romania
Contact:

Weird Issue with compiled .exe

Post by night_hawk »

Here's the story:
I'm working on my happy little project, I compile it, let it run a bit, it seems to work as wanted, I close the window and repeat a few times the process. Every time, it works as expected. (Some ships in 3d space following each other and shooting rockets).

Now, I launch the previously compiled .exe directly, outside of my IDE (VC++ Express 9). It... doesn't work the same way it did by launching it from the IDE. Completely different actualy.

Yes, I have every DLL in place, every file where it should be and so on.

Anyone know why this might happen? Maybe someone knows a potential solution to this?

BTW: same thing happens on other computers as well.

Thanks in advance,
NH.

(If it gets fixed I'll show you a nice movie of it working :D )
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Re: Weird Issue with compiled .exe

Post by rogerborg »

night_hawk wrote:Now, I launch the previously compiled .exe directly, outside of my IDE (VC++ Express 9). It... doesn't work the same way it did by launching it from the IDE. Completely different actualy.
How different?

night_hawk wrote:Yes, I have every DLL in place, every file where it should be and so on.
And I have Alyson Hannigan duct taped to my bed.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

What's different about it?

Maybe it's not the latest compiled version? Does the date and time of the file match your last compile time?
Image Image Image
night_hawk
Posts: 153
Joined: Mon Mar 03, 2008 8:42 am
Location: Suceava - Romania
Contact:

Post by night_hawk »

@JP: it is the latest compiled version.

As for the differences, running it from the IDE does this:
-All 12 ships on the screen start randomly picking an enemy (6 are Team 1, 6 are Team 2) and flying around it, shooting rockets whenever in range. Rockets follow the targeted ship until they hit the ship. Everything runs smoothly, in the end, only ships from 1 team remain (usualy only 1 ship at all).

When I run it outside the IDE, this is how it works:
-Only 2 or 3 of the ships start doing the above stuff. The others just loop as if they would want to target themselves. All rockets do the same. They just loop around their initial position. The other 2-3 just keep on flying around their target and attacking it.

And... that's about it. I have no idea why this behaviour...

@rogerborg: lucky bastard...
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Memory initialisation? I'd check that all of your memory is explicitly initialised. Alyson agreed, when I took her ball gag out.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
night_hawk
Posts: 153
Joined: Mon Mar 03, 2008 8:42 am
Location: Suceava - Romania
Contact:

Post by night_hawk »

Hmm... if you say so, I'll do a project-wide check. Say thanks to Alyson for me.
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

If you are running in Visual Studio, try the whatever shortcut, ctrl-f5 or something like that, to run the app separated from the debugger. You'd be surprised how much having a debugger attached to a process can produce unexpected results.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

night_hawk, forget anything anyone's suggested about fixing your game and just take this piece of advice:

Don't encourage rogerborg's infatuation with Alyson Hannigan!! One day he actually will have her duct taped to his bed with a gag ball in her mouth, i swear! :lol:
Image Image Image
night_hawk
Posts: 153
Joined: Mon Mar 03, 2008 8:42 am
Location: Suceava - Romania
Contact:

Post by night_hawk »

But think about it this way: we know rogerborg always like to share his coding experience. Why wouldn't he also share... (I'll let you fill in the gap) when that actualy happens? :D
night_hawk
Posts: 153
Joined: Mon Mar 03, 2008 8:42 am
Location: Suceava - Romania
Contact:

Post by night_hawk »

Indeed, the whole problem was from the debugger. It defaults all bools to true. I had a lost piece of code that didn't init those bools to true, although it should have. While debugging, no error was present, but without the debugger... meh.

Anyway, thanks for the tips. I'll post a short movie soon. It looks pretty good now. :)
Post Reply