Giter Club home page Giter Club logo

Comments (7)

Ryan-rsm-McKenzie avatar Ryan-rsm-McKenzie commented on June 17, 2024

My trampoline doesn't overflow when calculating the range

std::uintptr_t min = a_address >= minRange ? detail::roundup(a_address - minRange, granularity) : 0;
const std::uintptr_t max = a_address < (maxAddr - minRange) ? detail::rounddown(a_address + minRange, granularity) : maxAddr;

from commonlibsse.

65a avatar 65a commented on June 17, 2024

Interesting. I am getting an allocation failure with EngineFixes64 under wine, and was hoping it was a similar issue with calculating the lower bound

https://bugs.winehq.org/show_bug.cgi?id=44893

from commonlibsse.

Ryan-rsm-McKenzie avatar Ryan-rsm-McKenzie commented on June 17, 2024

It's much more likely it simply failed to preload and never allocated a trampoline in the first place

from commonlibsse.

65a avatar 65a commented on June 17, 2024

skse64 plugin preloader - d3dx9_42 exe path: C:\steam\steamapps\common\skyrim special edition\SkyrimSE.exe loaded into SkyrimSE.exe or SkyrimVR.exe, proxying SkyrimSE d3dx9_42 funcs and registering preload hook success

[2021-01-31 20:09:05.232] [info] [main.cpp:137] beginning pre-load patches [2021-01-31 20:09:05.233] [critical] [SKSE/Trampoline.h:187] Failed to handle allocation request

stl::report_and_fail("Failed to handle allocation request"sv);

I think that this means we are failing to allocate the trampoline, called from

https://github.com/aers/EngineFixesSkyrim64/blob/ccde2fdd1a33a356fb43dbb491b868fbddf00508/src/main.cpp#L97

but it's not clear to me how Initialize() gets called, since the error references a line in SKSE_PluginQuery

The reason I suspected the min limit was that wine seems to allocate from the bottom, but any info on how I can debug this further and figure out why it won't load on wine is much appreciated

from commonlibsse.

Ryan-rsm-McKenzie avatar Ryan-rsm-McKenzie commented on June 17, 2024

That fact that it doesn't print the version should tell you it never preloaded
https://github.com/aers/EngineFixesSkyrim64/blob/ccde2fdd1a33a356fb43dbb491b868fbddf00508/src/main.cpp#L86
That trampoline was never allocated, and you can't allocate from nothing, so it fails.

from commonlibsse.

65a avatar 65a commented on June 17, 2024

I assume d3dx9_ dll is supposed to call Initialize() on the DLL? I am definitely seeing the preloader dll get loaded
00c4:trace:loaddll:build_module Loaded L"C:\\steam\\steamapps\\common\\skyrim special edition\\d3dx9_42.dll" at 0000000000420000: native

And I see here: https://github.com/aers/skse64_plugin_preloader/blob/master/d3dx9_42.cpp that it is supposed to trigger the Initialize function in the DLL. The last thing the DLL logs is success.

I'm not sure I understand the detour code, but I see it is doing something with "api-ms-win-crt-runtime-l1-1-0.dll", which is provided by wine runtime and not the windows DLL, which could be the issue?

from commonlibsse.

65a avatar 65a commented on June 17, 2024

That is the problem for wine, since that dll is already intercepted by wine, it never hooks. I compiled skse_plugin_preloader without the initterm dance, and it works fine. Thanks!

from commonlibsse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.