.Exes crashing...
Blitz3D Forums/Blitz3D Programming/.Exes crashing...
| ||
Ummm... this is an odd one. For some reason all .exes I produce now crash. Yet run within the ide. Returns a Memory access violation (Regular blitz one) every time. Turned on the debugger and re-compiled the .exe to get a clearer picture. Nadda. Same deal. Any ideas? |
| ||
*And* they're crashing on other people's machine too, so it's not specific to my computer. |
| ||
Maybe try re-installing the latest update - could be some corruption if it runs in the ide ok. |
| ||
Nah, did some further testing. Other code works fine, just this one thing doesn't. I run it in the ide, it works. I create an .exe, place same dir as the source. It crashes. BUT, I placed a wait key right after the graphics call to check if it was a error with the .exe. Nope. Run and waited until I pressed key then mav... So it appears it's refusing to load something or create something when ran as an .exe, yet works fine when ran from the ide. This is the wierdest bug I've ever seen... |
| ||
Are you using any userlib dll's? Normally if they are missing you get a 'Userlib not found' but who knows... |
| ||
Nah.. And even if that was the case it would report the same error in the ide, as the source is in the same dir as the .exe/media... |
| ||
Telling us on which command it crashes would help |
| ||
I already stated it produces a MAV(memory access violation) even with a .exe compiled with the debugger on. No other way for me to determine which line is causing the probs, source+includes is over 5,000 lines. |
| ||
So, make a simple logging system that prints to the screen, or a file, how far it has gotten. That's the easiest way to figure out stuff like that. Sometimes it's even useful to add runtimeerror's at certain spots to display certain info (if you aren't bothered with the program stopping). |
| ||
Or try having it print CurrentDir$(). Sometimes my exe's change to a different dir for some reason. (without me using ChangeDir() at all.) |
| ||
Exactly, Fredborg, pretty obvious. A good old log file would help. Though you can simply use a "stop", "runtimeerror", or waitkey (anything to pause the prog) as suggested, and do some kind of manual dichotmic search, so to speak: put it in the middle of the block of code, if you still have a mav put it half way closer to the beginning, else half way closer to the end. Once you have nailed down a bit you can simply run the prog step by step from just before the the offending block of code to see exactly where it crashes. |
| ||
might be an array thing... sometimes blitz ignores array out of bound things when in debug, but crashes when debug is off... maybe something like that? |
| ||
You say 'all Blitz exes'... what happens with something really simple?Graphics3D 640, 480 cam = CreateCamera () RenderWorld Text 20, 20, "Clicky..." Flip MouseWait End |
| ||
Or try having it print CurrentDir$(). Sometimes my exe's change to a different dir for some reason. (without me using ChangeDir() at all.) Bingo! It's setting the local dir to C: in the .exe version, local dir in the ide ran version. I think this is an actual bug, try this to see what I mean, load a project, goto compile .exe and it will take you to C: when it asks you to name file. Now, click on 'new file', but don't save it, instead just goto create .exe. This one that has no home dir, strangely enough, defaults to the local dir when asking you where you wish to create the .exe but this never used to happen. I mean...how is this even happening? Considering the very same project was working fine in .exe form on mine and other people's pcs? Anyway, i'm rambling...Thanks E, save me a few hours of swearing :) |
| ||
keep us posted when i had that it was trying to load a fuile from the wrong place |