Only runs in debug mode?

Blitz3D Forums/Blitz3D Programming/Only runs in debug mode?

SirGorto(Posted 2006) [#1]
Anyone ever have the problem where the loadmesh function runs fine in debug mode but when you turn debug off it throws some errors or either entity does not exist or some other hard crash?


SirGorto(Posted 2006) [#2]
Actually the program only runs in debug mode as long as it is not in an exe. If I compile the exe in debug mode it still does not run.

I think it is a file path issue, but not really sure how to figure that all out. I have tried a ton of stuff and have the issue always. I have written graphical programs with blitz before and had no problems


John Blackledge(Posted 2006) [#3]
You must print the full filepath to the screen so you can check it (then use Waitkey so you can view it).

This is where I always go wrong, then slap hand against forehead.


SirGorto(Posted 2006) [#4]
I did what you said to see the file path exactly how it is to the program. I ran it in debug mode and saw that the path was good, and it ran fine. I ran it in non-debug mode and the path was exactly the same for the model and it gets some horrible crashing when loading the model.


Sir Gak(Posted 2006) [#5]
What error message (if any) are you receiving when it goes south on you?


nawi(Posted 2006) [#6]
I found out that sometimes when you run from exe the default file path is not what its supposed to be. You could try using ChangeDir SystemProperty("appdir")


SirGorto(Posted 2006) [#7]
I figured it out, It seems that my model that was loading was fubar. I am not sure how it got messed up, If it happens to you guys try and rebuild your model file and it seems to have fixed my issue. Very strange. Thank you all for the help.


John Blackledge(Posted 2006) [#8]
So, were you actually using two separate models (and paths), one for debug, and another for compiled?