View previous topic :: View next topic |
Author |
Message |
inka7 How do I cheat? Reputation: 0
Joined: 29 Jun 2015 Posts: 3
|
Posted: Mon Jun 29, 2015 4:51 am Post subject: Doing an AOBScan inside debugger_onBreakpoint() freezes CE |
|
|
I am having trouble with CE and target freezing/crashing when calling an AOBSCAN from within a breakpoint. The Breakpoint works fine for simple stuff like a messagebox but when i try to do an AOBscan from inside debugger_onBreakpoint() it freezes and i have to end process.
The AOBscan works fine when its not part of a breakpoint - for example when inside a hotkey, it works.
What is it i am doing wrong and how can i make AOBscan work when called from within a breakpoint?
thanks very much
Code: | // *****
THIS WORKS, ON BREAKING, A MESSAGEBOX POPS UP
function debugger_onBreakpoint()
showMessage("changeMe")
return 1 -- let CE know we handled breakpoint, no need to update debugger form
end
debugProcess()
debug_setBreakpoint(0x84902a6)
|
Code: | // *****THIS DOES NOT WORK, ON BREAKING, TARGET + CE FREEZES
function debugger_onBreakpoint()
MyScan=AOBScan("30 2d 30 30")
return 1
end
debugProcess()
debug_setBreakpoint(0x84902a6)
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Mon Jun 29, 2015 5:48 am Post subject: |
|
|
looks like a bug in freeing the scancontroller of the memscan class. (It's an fpc/lcl issue. The debuggerthread has done a synchronize which locks the sync queue, and destroying the scancontroller adds a item to the sync queue, but since it's in a different thread it'll wait till the lock is released, but the lock won't get released till the controller is destroyed... so yeah...)
instead of AOBScan you can use the MemScan class instead. Create it globaly and just don't free the memscan object inside the debugger_onBreakpoint() function
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
inka7 How do I cheat? Reputation: 0
Joined: 29 Jun 2015 Posts: 3
|
Posted: Mon Jun 29, 2015 6:21 am Post subject: |
|
|
edit see new reply
Last edited by inka7 on Mon Jun 29, 2015 8:16 am; edited 1 time in total |
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Jun 29, 2015 7:17 am Post subject: |
|
|
Code: | function DEC_HEX(IN)
local B,K,OUT,I,D=16,"0123456789ABCDEF","",0
if IN<1 then
OUT=0
return OUT
end
while IN>0 do
I=I+1
IN,D=math.floor(IN/B),math.mod(IN,B)+1
OUT=string.sub(K,D,D)..OUT
end
return OUT
end
|
This piece of code is copy pasted over and over again.
Why not just this:
Code: | function dec2hex(n)
return string.format('%X',n)
end |
Or if we want more feedback:
Code: | function dec2hex(n)
if n==nil then return 'error - a nil value'
elseif tonumber(n)==nil then return 'error - not a decimal number' end
return string.format('%X',n)
end |
_________________
|
|
Back to top |
|
|
inka7 How do I cheat? Reputation: 0
Joined: 29 Jun 2015 Posts: 3
|
Posted: Mon Jun 29, 2015 8:51 am Post subject: |
|
|
i would like to thank admin.
code works with memscan created globally thanks very much
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon Jun 29, 2015 10:17 am Post subject: |
|
|
I trust you donated those $$$ to the site.
|
|
Back to top |
|
|
|