Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Possible bug with Trial version?

Author
Message
CPU
23
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Carlsbad, CA
Posted: 5th Dec 2003 03:11
Ok i've been working on a program in DBC but i recently decided to upgrade to the DBPro trial edition, i fixed a bug with static objects when i transfered over and it compiles fine. The problem i run into is when i try to click on the new game or continue buttons in my main menu the program just ends and comes up with a dialoge box saying that the game was made with the trial version of DBPro. It doesn't come up with any error and i tried commenting out all the "end" commands in the program and it still did it. I would poste my code but its about 2000 lines long and i have several megs of external media... Any help would be appreciated

CPU

Sparring - Loved by many, Pefected by few.

I'm going to live forever, or DIE IN THE ATTEMPT!!!"
Jaze
22
Years of Service
User Offline
Joined: 20th Nov 2003
Location: Connecticut, USA
Posted: 5th Dec 2003 03:46 Edited at: 5th Dec 2003 03:48
PRo dropped some command support (commands concerning static objects were dropped ...at least some... I read about in a thread difference between dark basic and pro)

Also - I'd try thowing in some print statements to try to see where exactly the program is deciding to end so you can try to narrow it down to a routine or command - another dumb trick if print isn't workign is to make an error log routine for general purpose BUT then in each of your program routines...Something like:

See CODE Snipp - NOTE: It is only psuedo code to give you main idea


What you'll get is a VERY SLOW execution of your program if/when you set DEBUGFLAG to 1. BUT you'll get a very (sometime to much so) detailed file showing you something like a trace:

MainProgram Enter
-InitVari Enter
-InitVari Exit
-DrawScreen Enter
--DrawObjects Enter
--DrawObjects Exit
-DrawScreen Exit
MainProgram Exit


If your program crashes or exits - You will at leat know WHAT routine it died in.



Hope this helps

-=/Jaze/=-
Jaze
22
Years of Service
User Offline
Joined: 20th Nov 2003
Location: Connecticut, USA
Posted: 5th Dec 2003 04:07
Another Gotcha - Sorry - There isn't an APPEND file I guess - I just read in a post you CANT write to an existing file (which SHOULD overwrite it new) and you can't APPEND to an existing file (Which the psuedo code I posted would require) How lame is that? Sorry - Tried to help

-=/Jaze/=-
CPU
23
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Carlsbad, CA
Posted: 5th Dec 2003 05:56
ok i think i know where my bug is, but i cant seem to fix it

it crashes on that line, I'm 100% sure i typed in the file names correctly and that the path is valid (I coppied the name of the folder and the textfile right in so i know i didn't spell it wrong.) The funny thing is, i've loaded the other files fine but it crashes on this line and it's driving me nuts. If anyone could help i would be most greatful. (and thanks for trying to help me jaze)

CPU

Sparring - Loved by many, Pefected by few.

I'm going to live forever, or DIE IN THE ATTEMPT!!!"
Jaze
22
Years of Service
User Offline
Joined: 20th Nov 2003
Location: Connecticut, USA
Posted: 5th Dec 2003 09:36
You're welcome. I dunno - that's weird. BTW - you could still use that pseudo code you just have to delete the log file if it exists - and remember to close it at the end of your code (which means if it does crash you may not see it.... (again missing append command)

Back to your problem. For testing purposes - Try tossing in a file xist check - and/or full path ... and try opening a file that DOESN'T exist and perhaps one that is open with another program - additionally I'd check to see what the flags are on that file - perhaps an attribute is set (read/only, system file, etc) that is making it act weird like that.

I've run into a ton of caveats in this language ... especially debugging - gives wrong line numbers when you have multiple source code files and often error messages do not tell you anything. I've gotton message similiar to Error in DOFuntion::CallInternal

What does that mean? It meant I had an accidental char after a function name: MyFunction()oops

I changed it to MyFunction() all was fine - simple error... YUP - Error message gives ya a hint? NOPE.

hehe - good luck

-=/Jaze/=-

Login to post a reply

Server time is: 2026-07-26 18:00:34
Your offset time is: 2026-07-26 18:00:34