View previous topic :: View next topic |
Author |
Message |
Csimbi I post too much Reputation: 94
Joined: 14 Jul 2007 Posts: 3108
|
Posted: Wed Apr 21, 2021 3:36 pm Post subject: LUA checks before mono launch |
|
|
Hi!
I am building an AA script for a mono game and I'd like to do some tests before I try enabling mono.
Here's the top section of the script, below on the pic is the error message I get; the second number is 12, not 11 (made a change since the screenshot was taken).
Line 8 is "{$lua}" and line 12 is "else" - not sure what the error means.
Any clues?
Thanks!
Code: |
[ENABLE]
{$lua}
if syntaxcheck then return end
if process == nil then ShowMessage('Process is not selected.')
elseif readInteger(process) == 0 then ShowMessage('Process cannot be opened. Gone?')
else
if (monopipe~=nil) and (monopipe.ProcessID~=getOpenedProcessID()) then
monopipe.destroy()
monopipe=nil
end
if (monopipe==nil) then
LaunchMonoDataCollector()
while not monoSymbolList.FullyLoaded do sleep(50) end
end
end
{$asm}
...
|
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Wed Apr 21, 2021 3:55 pm Post subject: |
|
|
Seems like "monoSymbolList" isn't loaded right away. Might check it for nil then check "FullyLoaded". _________________
|
|
Back to top |
|
|
Csimbi I post too much Reputation: 94
Joined: 14 Jul 2007 Posts: 3108
|
Posted: Wed Apr 21, 2021 4:53 pm Post subject: |
|
|
Changing the while:
Code: | while (monoSymbolList==nil) or (not monoSymbolList.FullyLoaded) do sleep(50) end
|
Causes CE to hang (infinite loop). |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Wed Apr 21, 2021 6:57 pm Post subject: |
|
|
monoSymbolList is only available if the target is il2cpp and not normal mono
Also, instead of sleep use checkSynchronize(50) or chabge your memrec to be an async record _________________
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 |
|
|
Csimbi I post too much Reputation: 94
Joined: 14 Jul 2007 Posts: 3108
|
Posted: Thu Apr 22, 2021 8:05 am Post subject: |
|
|
Dark Byte wrote: | monoSymbolList is only available if the target is il2cpp and not normal mono
Also, instead of sleep use checkSynchronize(50) or change your memrec to be an async record |
And hence the loopum infinitum.
Makes sense, thank you!
Is it safe to assume that LaunchMonoDataCollector() is instant in a normal mono target? (instant from an AA script's perspective)
If not, what could possibly be checked to ensure the AA script only continues once the data collector is loaded?
As per Dark Byte's guidance, this works fine in normal mono when you enable single ASync memRecs one by one.
However, it causes process termination when trying to enable two or more ASync memRecs at the same time (race condition?):
Code: |
[ENABLE]
{$lua}
if syntaxcheck then return end
if process == nil then ShowMessage('Process is not selected.')
elseif readInteger(process) == 0 then ShowMessage('Process cannot be opened. Gone?')
else
if (monopipe~=nil) and (monopipe.ProcessID~=getOpenedProcessID()) then
monopipe.destroy()
monopipe=nil
end
if (monopipe==nil) then
LaunchMonoDataCollector()
-- monoSymbolList is only available if the target is il2cpp and not normal mono
--while (monoSymbolList==nil) or (not monoSymbolList.FullyLoaded) do checkSynchronize(50) end -- checkSynchronize requires that memRec is ASynch.
end
end
{$asm}
|
I'll see what happens what happens with monoSymbolList on an IL2CPP target later on - that nil check might not be needed. |
|
Back to top |
|
|
|