Code works in Blitzes IDE and not when compiled to .exe ? why me..?

Blitz3D Forums/Blitz3D Programming/Code works in Blitzes IDE and not when compiled to .exe ? why me..?

Stickman(Posted 2003) [#1]
When I run my sorce code in Blitzs IDE , with Debug mode on or off It runs perfect,but when I compile the code to a .exe every time I get to a certain part in the program in cases an error box to pop up with a buttton to click that says ok,and when cliked the program closes.

I know Im shooting for a long shot here,But anybody ever have this problum,mind sharing what you found it was.

Wright now if you told me it was because I stopped beliving in Santa I belive you,as for Im confussed to what it my be.

Thanks.....


Michael Reitzenstein(Posted 2003) [#2]
My preprocessor can do this :D

#IfNDef DEBUG
RuntimeError "Heh heh heh..."
#EndIf


Very evil, and not in the least bit related to what is causing your problems. Are you using 3D? RenderWorld and UpdateWorld can causes crashes such as the ones you are describing.


CyberPackRat(Posted 2003) [#3]
Is the compiled version being ran from the same folder as the .bb one. I had a problem like that once, I forget what error message I was given but turned out to be a silly mistake on my part where the program was looking for a file that was not in the folder as the .exe. Once I figured that out all was fine. Probally totally unrelated to your problem.

Try compiling with debug on.


Binary_Moon(Posted 2003) [#4]
was given but turned out to be a silly mistake on my part where the program was looking for a file that was not in the folder as the .exe


I've done that more than once. You could also check that you have the dll for any userlibs you are using in the correct place as well. Dll's that aren't part of windows need to be placed in the same folder as the exe.


BlitzSupport(Posted 2003) [#5]
See if this FAQ entry is any use:

http://www.blitzbasic.com/faq/faq_entry.php?id=20


Binary_Moon(Posted 2003) [#6]
James - you should add 'Possible Cause 3' Missing userlib/ dll

I guess it's similar to number 1 but I have done it more than once so its always nice to be reminded.


semar(Posted 2003) [#7]
It happened to me too sometime. It's a source fault, it has nothing to do with blitz. Sometime, a non existant image or a frame out of range does not give any error in the ide, but bombs out from within the exe.

Check your loaded media, expecially the images.

Sergio.


Stickman(Posted 2003) [#8]
Sorry for late reply,
I found the error,It was caused by me trying to pass a mesh throught Blitzes counttriangles() insted of a surface.

The Error on my part was caused because when converting a mesh from a .X file,I can't use Blitzes own count surfaces to get the order of the surfaces created as for its not the same order that Direct X file stores them.Under normal conditions this is not a problum untill I start adding bones then its a problum.So I load all the surfaces(Brushes)from the Dirext X file by order of Mesh into an Array.Some where along the line when looking up the mesh witch is used to index the Array,I passed the mesh throught as a brushes.