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 Discussion / Dark Basic crashes on compiling

Author
Message
Dark onyx
18
Years of Service
User Offline
Joined: 8th May 2007
Location: Um... I kinda forgot it
Posted: 30th Sep 2008 18:27
Hello,
I've been working on a little 3D RPG game and I'm having some serious problems.
I can compile the game without a problem, but when I try to run it, the screen goes white and then a windows application crash message appears, telling me that the game have crashed. None of my other projects encounter such a thing and I have no idea on what could be wrong.

If posting the codes would become needed, then I can do it.

Also, here are my comp specs:
Graphics card - Radeon HD 2400 Pro 256 MB
RAM - 2 GB
Processor - Pentium 4 Single core 3GHZ

Thanks in advance to anyone who helps me.

Regards, Dark Onyx
Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 1st Oct 2008 20:33
Do you have DirectX? That is the best help I can give you.


"I reveal my trap card, GEORGE DUBYA BUSH!
America loses 2000 Life Points! America loses." -Deucalion2
Dark onyx
18
Years of Service
User Offline
Joined: 8th May 2007
Location: Um... I kinda forgot it
Posted: 1st Oct 2008 20:58
Yes, I have the latest DirectX + DirectX SDK downloaded and installed on my computer.
I'm quite sure it's not my computer specs nor that I have Windows XP( I run DB 1.13 )
Anyone else have any ideas?
Dark onyx
18
Years of Service
User Offline
Joined: 8th May 2007
Location: Um... I kinda forgot it
Posted: 1st Oct 2008 21:17
Yes, I know there is a code problem, however, I have no clue what that problem could be. I just changed a tiny thing and it all came crashing down. I changed back and it still wouldn't work. :/
Could it be that I have too many arrays? I have about 7-8 of them created at the same time, all of them over 200+ big. I'm not sure, but I don't think so.

Do you want me to post the source code so you could see if you find any problem?
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 1st Oct 2008 21:19 Edited at: 1st Oct 2008 21:20
Quote: "Do you want me to post the source code so you could see if you find any problem"

yes
Quote: " I just changed a tiny thing "

we don't exactly know what a tiny thing is without seeing the code

Dark onyx
18
Years of Service
User Offline
Joined: 8th May 2007
Location: Um... I kinda forgot it
Posted: 1st Oct 2008 21:50 Edited at: 1st Oct 2008 21:52


That's the game source code.
The tiny thing I'm talking about is a change in the model loading code, but it shouldn't do somethign like this. I even changed it back without any success. I hope you guys can solve this, beacause I cannot. I'll gladly credit the person who solves it.

Oh, also, something that starts with fun_ is a function; ary_ is an array; var_ is a variable.
Note that not all variables have the var_ infront of it
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 2nd Oct 2008 05:33
It may not be directly related to your model loading but that may be a catalyst that set's off other events like some kind of weird memory problem or something. In this function:



try deleting the sprites before you delete the images. I remeber some problem I had a long time ago with crashing due to a sprite problem though I can't remember the details. I think it had something to do with the sprite existing without an image reference because the image was deleted and the sprite was not before hand.

Also, there was some mention on these forums about static objects causing problems. I think TDK said he wasn't ever able to use them without crashing. I haven't had any problems with them, but I never use them because I've never been able to increase performance by using them... (I don't think I use them right!)

You are undim a bunch of global arrays in the function. While I think it's ok, I'm not 100 percent sure because local arrays can be declared inside a function and an undim would apply to those local arrays. I don't know if DBC can handle the difference... Just to be safe, maybe undim Global arrays outside of the function. It may not make any difference, but it's something to try.

Enjoy your day.
Dark onyx
18
Years of Service
User Offline
Joined: 8th May 2007
Location: Um... I kinda forgot it
Posted: 2nd Oct 2008 07:49
Thanks for the reply
However, neither of those things worked. And I don't think it's static objects that causes this, since it crashes even before I use them( I don't even get to the menu ).
I'm quite sure that the problem is within the loading codes :/
But I still haven't found out what it could be.

But thanks any way, for trying to help

Login to post a reply

Server time is: 2025-06-07 08:05:00
Your offset time is: 2025-06-07 08:05:00