Only Works in Debug
BlitzMax Forums/BlitzMax Programming/Only Works in Debug
| ||
Hi, What would be the common reasons for something to work perfectly in debug but not work outside debug? Thanks, Matthew |
| ||
Nothing, really. File paths can be a fairly common problem. Its difficult to say without any knowledge of any error messages you have, or what your code looks like, or where exactly its falling over. |
| ||
Error checking is not done in release mode. So if you go out of bounds with arrays or pointers, that will show up in release mode, but probably get by without problems in debug. |
| ||
Error checking is not done in release mode. So if you go out of bounds with arrays or pointers, that will show up in release mode, but probably get by without problems in debug. ...but 'array index out of bounds' errors and such show up in debug. You'd be more likely to get an error in debug mode and you could possibly get away with it in release mode. |
| ||
Yeah, they should do, but sometime they won't. At least, so I've been told when I had a problem in debug and not in release. |
| ||
At least, so I've been told when I had a problem in debug and not in release. Yep, but Matt's problem is the other way around - works in debug, crash in release. Which is why I queried what you said. ;) |
| ||
Sorry, typo. I meant that I had a problem in release and not debug. The recent problem I had with the XML module was fresh in my mind, but that's not the problem I was actually talking about. |
| ||
You have ?Debug PreCompiler Directives that are pre-excluding bit of code that it shouldnt Or as Gab implied, you might be catching out of bounds errors and fixing them, but these errors are not now being created in realese Also, (And Im really not sure about this), but some of the defaults in the moduals are different in debug and realese. (I think that the default screen is windowed in debug, and fullscreen in release;- For example) |
| ||
Another common problem is that loops are several times slower in debug so if you only do "short time tests" with debug you might never see them. So when testing, test the whole game / app from beginning to end in debug and give the debug version to your testers as well (as long as you are a lazy programmer that does not use try catch to catch error instead of let them crash the app) |
| ||
Well I found out why I couldn't figure it out. The problem seems to be with SetGadgetText. I've tripple checked my code and I haven't entered the parameters wrong. It's kinda wierd as I'm having alot of problems with SetGadget functions that relate to text. |
| ||
What would be the common reasons for something to work perfectly in debug but not work outside debug? Main loop 'locals' going 'out-of-scope'. |
| ||
Perhaps you try to set the GadgetText to a gadget not supporting that. (TextArea for example) |
| ||
I'm trying to set the text of a button. It's weird as, rather than give an error, the program just ends. |