Squalr / Squalr

Squalr Memory Editor - Game Hacking Tool Written in C#

Home Page:https://www.squalr.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Debugger unstable

da4d459cc7 opened this issue · comments

Sometimes the debugger freezes on this.Control.WaitForEvent in ListenForEvents methods (line 240) and other times it does not.

Listen to output callback returns this:

Unable to add extension DLL: ntsdexts
Unable to add extension DLL: uext
Unable to add extension DLL: exts
The call to LoadLibrary(ext) failed, Win32 error 0n2
Executable search path is:
ModLoad: 00007ff76da50000 00007ff76dd7a000 C:\Program Files\Notepad++\notepad++.exe
ModLoad: 00007ffd9edd0000 00007ffd9efb0000 C:\WINDOWS\SYSTEM32\ntdll.dll

and that's it. I haven't figured out what's the point with it working and with it don't working. Seems random to me and it dont matter if VS running or not. Any idea?

I ran into issues early on in development with this, but thought I resolved them, but perhaps not. What process are you testing this on? I'm assuming Notepad++?

Wrapping IDebugClient from C# is unfortunately pretty poorly documented (and this is how my debugger implementation works), so it has been a lot of trial and error as far as implementation goes.

Yes, notepad++ 64bit. Like I said, sometimes it works perfectly fine but other times it hangs. I can see on https://github.com/Microsoft/clrmd/ that they have a different implementation on debugger. Is that something you can use for help?

//edit: Well, most of the time it hangs for me actually. Only 1/10 times it works. At first I thought that by adding breakpoints in VS it works so I guess it only need a break but then this was also wrong =/

//edit2: After waiting for a long time it outputs:

ModLoad: 00007ffd9edd0000 00007ffd9efb0000 C:\WINDOWS\SYSTEM32\ntdll.dll
Unable to wait for StatusReady,
0

If it runs in a single thread it instantly passes the point where it usually hangs, always. I think it's maybe just an issue with threading?

Yeah IDebugClient is very finicky and generally requires stuff to run on the same thread. Are you using the NuGet package? Or are you using the develop version of Squalr?

If you're getting this problem with the NuGet packages -- perhaps there are some places where I am not running these tasks on the correct thread.

I was trying the code only in a 64bit console window for testing purpose as I had issues with installation of nudget, always says "Unable to find a version of 'Microsoft.CSharp' that is compatible with 'Squalr.Engine 2.3.0.1 constraint: Microsoft.CSharp (>= 4.5.0-preview2-26406-04)'".

I've now downloaded the full squalr source from githup and noticed it works absolutely fine on this. What's the magic on this? Also I see on squalr project VS cannot debug into the debugger threads you create with task factory but in my console application with 1:1 source of debugger, VS debugs into.

Is there something that needs to be enabled outside of the actual debugger source code? Like in project settings or something? Wish I could try out the nuget version...

I think there is an issue with the package where dependencies aren't transitive, I'll try and fix this in the next release.

Alternatively, you can just manually add the nuget package it's complaining about to your project, but this isn't ideal.