| View previous topic :: View next topic |
| Author |
Message |
Bizarro I post too much
Reputation: 0
Joined: 01 May 2007 Posts: 2648
|
Posted: Thu Nov 13, 2008 3:41 pm Post subject: [c++]loop crash |
|
|
after recent update from nexon ms.
some code in my trainer are crashing me for no reason.
After many trials....
here is what i got so far
Crash code
| Code: | .
mainthread
{
. limit = blahblah from userinput
.
For(int x=0; x< limit;x++)
{
function(param1);
Sleep(50);
}
}
DWORD function(int x)
{
some calculation
and calling other funtions
return 1;
} |
working code
| Code: | .
mainthread
{
. limit = blahblah from userinput
.
function(param1,limit,0);
}
DWORD function(int x,int total,int current_counter)
{
some calculation
and calling other funtions
current_counter++;
Sleep(50);
if(current_counter>=limit)
return 1;
else
return function(param1,limit,current_counter);
} |
so basicaly if i used For,while or dowhile loop, i get crash instantly.
only the 2nd method (recursive calls) works when i need to loop them
anyone knwo why :S ...
_________________
w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils
Last edited by Bizarro on Fri Nov 14, 2008 6:33 pm; edited 6 times in total |
|
| Back to top |
|
 |
GMZorita Grandmaster Cheater Supreme
Reputation: 0
Joined: 21 Mar 2007 Posts: 1361
|
Posted: Thu Nov 13, 2008 3:51 pm Post subject: |
|
|
Is it a MSfunction?
Does it have Params?
And I dont think it checks ESP or else the 2nd way would not work either.
_________________
Gone |
|
| Back to top |
|
 |
Bizarro I post too much
Reputation: 0
Joined: 01 May 2007 Posts: 2648
|
Posted: Thu Nov 13, 2008 4:50 pm Post subject: |
|
|
i tried
For, while, dowhile
all crashed
then when i tried Recursive calls, it worked with no crash =D
_________________
w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils |
|
| Back to top |
|
 |
Spawnfestis GO Moderator
Reputation: 0
Joined: 02 Nov 2007 Posts: 1746 Location: Pakistan
|
Posted: Thu Nov 13, 2008 4:53 pm Post subject: |
|
|
Well what the fuck is:
| Code: | | function1(param1,param2); |
????
_________________
CLICK TO HAX MAPLESTORAY ^ !!!! |
|
| Back to top |
|
 |
Bizarro I post too much
Reputation: 0
Joined: 01 May 2007 Posts: 2648
|
Posted: Thu Nov 13, 2008 4:56 pm Post subject: |
|
|
| Spawnfestis wrote: | Well what the fuck is:
| Code: | | function1(param1,param2); |
???? |
just a general function..
ie
| Code: | DWORD functionname(int a,int b, int c)
{
doing stuff....
return 1;
} |
_________________
w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils |
|
| Back to top |
|
 |
GMZorita Grandmaster Cheater Supreme
Reputation: 0
Joined: 21 Mar 2007 Posts: 1361
|
Posted: Thu Nov 13, 2008 4:57 pm Post subject: |
|
|
| Spawnfestis wrote: | Well what the fuck is:
| Code: | | function1(param1,param2); |
???? |
I asked him if it had any param, so just to let us know that it takes 2 params...
BTW on while or for or blablabla...
Are you doing something like
| Code: |
for(...)
function1(i,10); |
and normaly you do:
| Code: |
function1(1,10);
function1(2,10); |
Get what i mean?
Edit1:
Is it in your app, or its a code cave in some MS procedure?
_________________
Gone |
|
| Back to top |
|
 |
Spawnfestis GO Moderator
Reputation: 0
Joined: 02 Nov 2007 Posts: 1746 Location: Pakistan
|
Posted: Thu Nov 13, 2008 5:19 pm Post subject: |
|
|
| GMZorita wrote: | | Spawnfestis wrote: | Well what the fuck is:
| Code: | | function1(param1,param2); |
???? |
I asked him if it had any param, so just to let us know that it takes 2 params...
BTW on while or for or blablabla...
Are you doing something like
| Code: |
for(...)
function1(i,10); |
and normaly you do:
| Code: |
function1(1,10);
function1(2,10); |
Get what i mean?
Edit1:
Is it in your app, or its a code cave in some MS procedure? |
I'm asking what is in the function, what the function does to MS. As it might collide with its recent updates.
_________________
CLICK TO HAX MAPLESTORAY ^ !!!! |
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Thu Nov 13, 2008 5:21 pm Post subject: |
|
|
| Spawnfestis wrote: | | GMZorita wrote: | | Spawnfestis wrote: | Well what the fuck is:
| Code: | | function1(param1,param2); |
???? |
I asked him if it had any param, so just to let us know that it takes 2 params...
BTW on while or for or blablabla...
Are you doing something like
| Code: |
for(...)
function1(i,10); |
and normaly you do:
| Code: |
function1(1,10);
function1(2,10); |
Get what i mean?
Edit1:
Is it in your app, or its a code cave in some MS procedure? |
I'm asking what is in the function, what the function does to MS. As it might collide with its recent updates. |
He said it works when it's not in a loop so the function is ok
_________________
|
|
| Back to top |
|
 |
Bizarro I post too much
Reputation: 0
Joined: 01 May 2007 Posts: 2648
|
Posted: Thu Nov 13, 2008 6:33 pm Post subject: |
|
|
there is nothing wrong with my code as its working last patch.
it only started crashing after the new patch.
i had to remove most of the for loop and change it to recursive calls to avoid the crashing.
@spawnfetis it does work by replacing the loop with numerous repetitive single calls. i just showed an example(2) up there.
_________________
w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils |
|
| Back to top |
|
 |
sloppy Expert Cheater
Reputation: 0
Joined: 17 Aug 2008 Posts: 123
|
Posted: Thu Nov 13, 2008 6:54 pm Post subject: |
|
|
You are not giving us much to work with, at the very least you should post your function or provide details of what it's doing exactly.
Try a simple test..
| Code: | char szBuff[10];
for(int i = 1; i <= 3; i++)
{
sprintf_s(szBuff, sizeof(szBuff), "Loop: %d", i);
MessageBox(0, szBuff, "Test", MB_OK);
} |
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Thu Nov 13, 2008 9:33 pm Post subject: |
|
|
| run it from the debugger, when you crash, you'll get a lovely message pointing you in the right direction.
|
|
| Back to top |
|
 |
Bizarro I post too much
Reputation: 0
Joined: 01 May 2007 Posts: 2648
|
Posted: Thu Nov 13, 2008 10:22 pm Post subject: |
|
|
here is what i know so far
Crash code
| Code: | .
.
. limit = blahblah from userinput
.
For(int x=0; x< limit;x++)
{
function(param1);
Sleep(50);
}
DWORD param1(int x)
{
some calculation
and calling other funtions
return 1;
} |
working code
| Code: | .
. limit = blahblah from userinput
.
function(param1,limit,0);
DWORD function(int x,int total,int current_counter)
{
some calculation
and calling other funtions
current_counter++;
if(current_counter>=limit)
return 1;
else
return function(param1,limit,current_counter);
} |
_________________
w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils |
|
| Back to top |
|
 |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
Posted: Fri Nov 14, 2008 12:53 am Post subject: |
|
|
| Bizarro wrote: | here is what i know so far
Crash code
| Code: | .
.
. limit = blahblah from userinput
.
For(int x=0; x< limit;x++)
{
function(param1);
Sleep(50);
}
DWORD param1(int x)
{
some calculation
and calling other funtions
return 1;
} |
working code
| Code: | .
. limit = blahblah from userinput
.
function(param1,limit,0);
DWORD function(int x,int total,int current_counter)
{
some calculation
and calling other funtions
current_counter++;
if(current_counter>=limit)
return 1;
else
return function(param1,limit,current_counter);
} |
|
try to delete all code in (param1) and see if it still crash or rename it simple
it could be that GG detect your trainer but in some way it craches when it does the scan/ or they just try to close it
well possible not because it would be stupid but since there is no reason for your trainer to crash you could atleast test
notice if you use a keystroke (postmessagex/sendinput) try just delete that part there you send it and try again i had a crash problem with PMX for maple because i had the bypass function in another unit (delphi)
_________________
dont complain about my english...
1*1 = 2? |
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Nov 14, 2008 1:42 am Post subject: |
|
|
| Just post the damn source so it's possible to be of help.
|
|
| Back to top |
|
 |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
Posted: Fri Nov 14, 2008 2:14 am Post subject: |
|
|
bizzaro - could you post one of the codes that crash instead of writing examples
(sorry for bad english i dont have the spell checker on my school comp)
_________________
dont complain about my english...
1*1 = 2? |
|
| Back to top |
|
 |
|