Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insufficient memory to continue #120

Open
GameplayGoon opened this issue Jul 26, 2021 · 1 comment
Open

Insufficient memory to continue #120

GameplayGoon opened this issue Jul 26, 2021 · 1 comment

Comments

@GameplayGoon
Copy link

GameplayGoon commented Jul 26, 2021

I was told to post here since this seems to be an optimization bug when AOB Scanning. Im getting this error message on some games when searching in specific sections of the games memory. It seems to occur mostly when searching outside of a specific module, but settings a scan range does not help either, does not happen on all games. The AOB scans work fine in Cheat Engine but not when using the module so I know there correct. A friend who is a better coder then me is also having the same problem. Thanks

Code Used:
aobscan = m.AoBScan("03 00 00 00 ? ? ? ? 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 34 42 00 00 00 00 00 00 20 41 00 00 A0 40 00 00 80 3F", True).Result.FirstOrDefault.ToString("X8")

Error Message:

System.OutOfMemoryException
  HResult=0x8007000E
  Message=Insufficient memory to continue the execution of the program.
  Source=mscorlib
  StackTrace:
   at System.Runtime.InteropServices.Marshal.AllocHGlobal(IntPtr cb)
   at Memory.Mem.CompareScan(MemoryRegionResult item, Byte[] aobPattern, Byte[] mask) in C:\Users\newgm\Documents\git\memory.dll\Memory\memory.cs:line 2035
   at Memory.Mem.<>c__DisplayClass120_1.<AoBScan>b__1(MemoryRegionResult item, ParallelLoopState parallelLoopState, Int64 index) in C:\Users\newgm\Documents\git\memory.dll\Memory\memory.cs:line 2003
   at System.Threading.Tasks.Parallel.<>c__DisplayClass31_0`2.<ForEachWorker>b__2(Int32 i, ParallelLoopState state)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()

  This exception was originally thrown at this call stack:
    [External Code]
    Memory.Mem.CompareScan(Memory.MemoryRegionResult, byte[], byte[]) in memory.cs
    Memory.Mem.AoBScan.AnonymousMethod__1(Memory.MemoryRegionResult, System.Threading.Tasks.ParallelLoopState, long) in memory.cs
    [External Code]
@erfg12
Copy link
Owner

erfg12 commented Jan 25, 2022

@hollow87 Further research is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants