Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AbrahamR, wdlmaster, 7th_zorro, dr_panther, 1 invisible), 764 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
SED crashes for unknown reason #211992
06/19/08 15:09
06/19/08 15:09
Joined: Aug 2007
Posts: 286
DestroyTheRunner Offline OP
Member
DestroyTheRunner  Offline OP
Member

Joined: Aug 2007
Posts: 286
Hi

After 5 - 7 times I start the engine,after everything work fine I press ESC to close the engine and return to SED.. and then SED crashes and tells me to close it.
BUT
I noticed that it only happens if my script calls this function.

If i dont call this function, I can call the engine 1000000 times withuot any apparent error.

Here´s the code
Quote:

function SEARCH_DESTINO()
{
var temp_destino;
var temp_tipo[3];
var n;

while(my.found_destiny == 0)
{


path_scan(my,my.x,my.pan,vector(360,0,9000));
temp_destino = path_scannode(my, n);

path_getnode(my,temp_destino, null,temp_tipo[0]);

if(temp_tipo[0] == my.destiny_type)
{
my.alvo = temp_destino;
my.found_destiny = 1;

}

n += 1;
}
}


repeatin:
If my script calls this function, after 5 or 7 times, SED crashes after i close the engine.

PS1.THE GAME RUNS FINE ALL THE TIMES, IT ONLY CRASHES WHEN I CLOSE THE ENGINE.

PS2. IF I COMPILE MY GAME, I DONT HAVE THIS PROBLEM! AND THE GAME RUNS FINE!

please help, its beyound my comprehension!

Re: SED crashes for unknown reason [Re: DestroyTheRunner] #212040
06/19/08 20:49
06/19/08 20:49
Joined: Apr 2006
Posts: 66
Sweden
R
rstralberg Offline
Junior Member
rstralberg  Offline
Junior Member
R

Joined: Apr 2006
Posts: 66
Sweden
Hi

You have forgot to initialize n to 0

var n = 0 ;

Edit:

You may also need this in your while loop
to ensure you don't overwrite you buffer

while(my.found_destiny == 0 && n < 3 )


Last edited by rstralberg; 06/19/08 20:57.

Roland Strĺlberg Gamestudio/A7 Commercial rstralberg@msn.com
Re: SED crashes for unknown reason [Re: rstralberg] #212164
06/20/08 18:46
06/20/08 18:46
Joined: Aug 2007
Posts: 286
DestroyTheRunner Offline OP
Member
DestroyTheRunner  Offline OP
Member

Joined: Aug 2007
Posts: 286
no my friend... none of that work.

And still code works fine, it only crashes when i close the egine.
Please new people read the first post,everything is explained there.

PLEASE HELP!
thanks!

Re: SED crashes for unknown reason [Re: DestroyTheRunner] #212202
06/20/08 20:38
06/20/08 20:38
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Trouble shooting can be harsh and sometimes the biggest errors are due to very very small mistakes that even can't be seen by the best programmers wink wink

The solution is simple, you use a while expression but you don't end it with a wait instruction.
Normally the engine should indicate an endless loop event but I guess your if-clause overrules the call since you use a 'x++ algoritme' at the end AFAIK. Thus, when ending the application, the thing will crash as you end the 'x++ algoritme'.

Cheers

Frazzle



Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: SED crashes for unknown reason [Re: frazzle] #212212
06/20/08 21:22
06/20/08 21:22
Joined: Aug 2007
Posts: 286
DestroyTheRunner Offline OP
Member
DestroyTheRunner  Offline OP
Member

Joined: Aug 2007
Posts: 286
I thought about that when I was going to bed last night ( As you can see this problem is even taking my nights from me). I havent tried yet.
But I also thought is ,that the way I put the objects on the level, the while loop is ALWAYS broke in the same way,and the same time, because the game starts the same everytime, same objects and same positiions and same everything.. but it will ONLY CRASH AFTER THE 5 OR 7 TIME!

ps. I need it to be a fast function, a wait in there shouldnt be a good idea.
Ill try anyway.

Thanks frazzle but Still if new readers care to read the first post and try to help me, i appreciate.

Re: SED crashes for unknown reason [Re: frazzle] #212214
06/20/08 21:28
06/20/08 21:28
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
temp_destino[0]

i once get a realy big terain bug when i didnt asing the [0] brackets
and yes this doesnt needs to be a problem


"empty"
Re: SED crashes for unknown reason [Re: DestroyTheRunner] #212215
06/20/08 21:29
06/20/08 21:29
Joined: Aug 2007
Posts: 286
DestroyTheRunner Offline OP
Member
DestroyTheRunner  Offline OP
Member

Joined: Aug 2007
Posts: 286
ok just tried it, using the wait(1);

Doesnt work...after closing the engine by the 5-7th time, crashes the entire SED.

I´ve got a insomnia because of that already frown


help!

Re: SED crashes for unknown reason [Re: DestroyTheRunner] #212225
06/20/08 21:59
06/20/08 21:59
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Maybe you're in a quest for a SED bug rather then a bug in your initial script itself. SED crashes in A7 crashes too with the use of a syntax correct algorithm from time to time at my end here. Thus I suggest you keep on doing the same test for one single day and write down when it crashes. The day after tomorrow, you simply report this at the bug hunt section to see if they confirm the error wink wink

Thanks in progress

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: SED crashes for unknown reason [Re: frazzle] #212229
06/20/08 22:21
06/20/08 22:21
Joined: Aug 2007
Posts: 286
DestroyTheRunner Offline OP
Member
DestroyTheRunner  Offline OP
Member

Joined: Aug 2007
Posts: 286
ok
actually I already did it. Its been like that sinec wednesday i think AND i noticed that If i dont call this function at all, it never crashes.
Thats why I posted it here, because i think sometings is wrong with this code.
If not, then everything is narrowed to Bug Hunt forum. frown

Re: SED crashes for unknown reason [Re: DestroyTheRunner] #212252
06/21/08 01:55
06/21/08 01:55
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
"sometings is wrong with this code"

cached from yesterday:
1. uninitialized locals (mentioned)?
2. NULL passed not NULLVECTOR?
3. path skills array is 3 elements instead of 6 or NULL? ***
4. bad logic / structure?


Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1