|
SED crashes for unknown reason
#211992
06/19/08 15:09
06/19/08 15:09
|
Joined: Aug 2007
Posts: 286
DestroyTheRunner
OP
Member
|
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 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
rstralberg
Junior Member
|
Junior Member
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.
|
|
|
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
Expert
|
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 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]
#212214
06/20/08 21:28
06/20/08 21:28
|
Joined: Jul 2007
Posts: 959 nl
flits
User
|
User
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
OP
Member
|
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  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
Expert
|
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  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
OP
Member
|
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. 
|
|
|
|