Weird crash when building EXE

Blitz3D Forums/Blitz3D Programming/Weird crash when building EXE

Warren(Posted 2004) [#1]
I have a weird problem and my searches of the forum didn't turn up anything ...

My game runs fine from within my IDE. I can run in debug mode, or normal, and everything is cool. However, if I create an executable and try to run it from the games directory I get a "memory access violation".

I know that it's finding all of the files it needs since I have custom loading functions that give me useful errors when files aren't found. It's as soon as it goes to start drawing stuff ... boom.

I've been trying to insert "runtimeerror" lines into the code to try and narrow down the search as to where the actual problem is, but no luck yet.

Does anyone have ANY suggestions about things to look for or has anyone had a similar experience? It's starting to really drive me crazy.


bradford6(Posted 2004) [#2]
are you INCLUDE-ing files

I had a similar problem with my EXE not 'including' the include files.


Warren(Posted 2004) [#3]
I've tracked it down to this line...

MyVar# = (H# - InH#) / 2.0

That crashes. However...

MyVar# = (H# - InH#)

... runs just fine. Dividing by two is crashing the compiled EXE. If I leave debug enabled and create the EXE, everything is cool again.

So I guess the compiler is doing something to that piece of code in a release mode EXE that it shouldn't be. Looks like I might be shipping a debug mode EXE then.

*sigh*


Floyd(Posted 2004) [#4]
That's nearly impossible to believe.

Okay, it's not impossible. But it is extremely unlikely.


Warren(Posted 2004) [#5]
And now it's not happening anymore and the release mode EXE runs fine.

*beats head against desk*


Mustang(Posted 2004) [#6]
And now it's not happening anymore and the release mode EXE runs fine.


Full moon or something? :P

We call this "demo effect" at work when everything works OK until you show it to someone - then it goes pear-shaped for some reason nobody can explain. And of course it returns to its normal behauvuour later...


Warren(Posted 2004) [#7]
We call this "demo effect" at work when everything works OK until you show it to someone - then it goes pear-shaped for some reason nobody can explain. And of course it returns to its normal behauvuour later...

Strangely, I WAS trying to prepare a demo release for a few people last night. :)

I'm still boggled as to what happened. I think the compiler got a burr up it's ass for whatever reason. All I know is that it's happy now. Weird!