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

Unable to inject the dll (Factorio) #9

Closed
AkaraVortex opened this issue Aug 20, 2024 · 14 comments
Closed

Unable to inject the dll (Factorio) #9

AkaraVortex opened this issue Aug 20, 2024 · 14 comments
Labels
question Further information is requested

Comments

@AkaraVortex
Copy link

AkaraVortex commented Aug 20, 2024

Trying to run the injector results in the following error:

RhInjectLibrary failed with error code = -1073741581
Unable to load the given 64-bit library into target process.

Injector is in correct location, as otherwise it will send an error for unable to locate the process.

Tried both on Steam and .zip versions of the Factorio, both with and without admin privileges.

Other injectors (such as Unreal Engine Unlocker) work without any issues.
I am using Windows 11 Pro build 26252, and Factorio is version 1.1.110

@KeinNiemand KeinNiemand added the question Further information is requested label Aug 20, 2024
@KeinNiemand
Copy link
Owner

I also use Windows 11 and the latest Factorio so that's not the issue do you have all the other files extracted as well?
I have no idea what could be going wrong and I can't fix anything without a way to identify and replicate the issue.

@AkaraVortex
Copy link
Author

Well, I think it is a problem on my side, I will try doing some troubleshooting then, very eager to test that mod.
Thanks for fast reply.

@KeinNiemand
Copy link
Owner

Are you running Injector.exe from the same folder it's in? I'm using relative paths so running it from a different folder doesn't work (at least in the current version, that will be fixed in the next version).

@AkaraVortex
Copy link
Author

I dropped all the files near the factorio.exe, so it detects the process.
As I mentioned, I tried moving it in other places and it has an error message for being unable to find the process. So I think in my case it understands where it needs to inject the dll.

Simpler question - in what order does it injects dlls? Maybe I can do it with other injector.

@KeinNiemand
Copy link
Owner

KeinNiemand commented Aug 20, 2024

It only Injects MiMallocReplacer.dll which has the other dlls as dependanys and no you can't use a diffrent injector because simply injecting the dll will do nothing, the libary I'm using for the Injecting (EasyHook) uses it's own Entry point that's called from the Injector so if you Inject it any other way it won't do anything.
What version of the mod are you using?
Maybe try the latest pre release (prerelease because of stellaris issue) version 2.1.0

@AkaraVortex
Copy link
Author

Same issue. I guess I will just quickly make a separate clean install of the system and test it here, I am highly suspicious that the issue lies with my system and not the code.

@KeinNiemand
Copy link
Owner

Also maybe try Factorio 1.1.109 it's unlikely to be an issue but I'm using the stable version and I haven't tested the experimental version yet.

@AkaraVortex
Copy link
Author

No luck, sadly. In short - this is access violation error. (I've tried taking ownership of everything, disabling some exploit protections and such) Which is strange, as any other similar principle apps work without problems. I am still not sure if this is problem with my system, or something else.

@AkaraVortex
Copy link
Author

I can manually inject redirect and override dlls, but Replacer causes the problem.
I guess I should just stop and thank you regardless for that project :D

@KeinNiemand
Copy link
Owner

The only things I can think of you trying is a clean windows install and if you already tried that trying it on a different machine to see if your machine is the problem. What kind of hardware (mainly CPU) do you have?

@AkaraVortex
Copy link
Author

Laptop 12700H, I've tried disabling some security features in a bios, but to no avail.
I will try doing it on another machine in next week or so.

@metam1nd
Copy link

metam1nd commented Dec 3, 2024

I have the exact same problem, I also compiled from source but same thing. I am on Windows 11 24H2, Intel 13600k with newest microcode updates (most recent UEFI version installed). On a friends machine with an AMD Ryzen (don't remember the exact model) and also on Win11 24H2, still the same error. Last but not least I tried it in a Win11 VM on my machine using Hyper-V and still nothing.

Got any more troubleshooting approaches for me?

@KeinNiemand
Copy link
Owner

KeinNiemand commented Dec 4, 2024

You could try Windows 11 22H2 or 23H2 (which is what I'm on and maybe the 24H2 update breaks somethings and it or some insider preview build AkaraVortexwas using seems to be a common problem for everyone who has the issue ), or try a clean windows install with clean default bios setting. I have no clue what exactly is causing this error on some system. I have no idea what exactly is causing it to fail on some systems but not others, and it seems kind of
It's probably some sort of bug in EasyHook (the library I use to do the injecting), but I currently don't have the time to try and replace that library.

@KeinNiemand
Copy link
Owner

Try again with the new 2.3.0 version, it no longer uses EasyHook to inject the Dll (which is what's going wrong with this error) and see if this new version works.

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

No branches or pull requests

3 participants