Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
4 registered members (AndrewAMD, fogman, Grant, juanex), 972 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
for loop error #302622
12/20/09 21:09
12/20/09 21:09
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline OP
Expert
Puppeteer  Offline OP
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
If i use for(;;) the function works fine but it causes random errors in other functions. You should add a compiler error or mention it in the manual.


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: for loop error [Re: Puppeteer] #302674
12/21/09 11:51
12/21/09 11:51
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
No. for(;;) is not an error, but a valid statement in C based languages.

Re: for loop error [Re: jcl] #302688
12/21/09 12:53
12/21/09 12:53
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline OP
Expert
Puppeteer  Offline OP
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Hm this is weird. Because changeing this line fixed random crashes in other functions.
Any other reasons why such an error could appear (My project has already more than 600kb code so quite a lot)?


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: for loop error [Re: Puppeteer] #302696
12/21/09 13:33
12/21/09 13:33
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
Yes, there can be many reasons for random crashes in a program.

We've put together hints for hunting them in the manual: http://manual.3dgamestudio.net/debugging.htm

Re: for loop error [Re: jcl] #302703
12/21/09 14:39
12/21/09 14:39
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline OP
Expert
Puppeteer  Offline OP
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Yeah i know that but after "stripping down the problem to the bones" i found out that it was that for loop.
Warn_level etc. doesn't get any interesting results.
But since for(;;) should be working the real reason for this problem has to be somewhere else. I will take a look at my structs etc. But that's the very last thing of which i think that it might have caused the bug.


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: for loop error [Re: Puppeteer] #302705
12/21/09 15:08
12/21/09 15:08
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
It could be maybe not the for() function itself but what's happening in the loop.

Does it always crash at the same place, or in different places?

Re: for loop error [Re: jcl] #302713
12/21/09 16:30
12/21/09 16:30
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline OP
Expert
Puppeteer  Offline OP
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
It crashes always in the same place of the other function when the other function is called.
The function with the for(;;) was a physics function for the game play and the other one had something to do with menu. The other function crashes even without the use of the function with for(;;), the only thing that matters is that function with for(;;) exists in the script.
One other interesting hint is that i have actually 2 functions that do not work properly, the function which is written down in the overallscript first will crash when called. Both have a similar structure:
Code:
function dosomething(STRUCT* struct)
{
for(this and that)
{
some code here
while(dll_function()==0)//functions crash here
{
wait(1);
}
some code here
}
}



Last edited by Puppeteer; 12/21/09 16:31.

Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: for loop error [Re: Puppeteer] #303350
12/28/09 12:01
12/28/09 12:01
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
Looks like a crash in your dll_function() function.


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