Comments (11)
Unable to replicate. I'm reworking how the hooks work internally though.
from reframework.
Is it a work in progress change or has it been included in the latest release, nightly or otherwise? I'd be happy to test it again whenever the hook rework is available.
from reframework.
I've pushed my changes for the hooks.
However, I could see this still happening if you're hooking one function, and then calling getSkillData
from within the hook, while it's already hooked. Were you doing this previously?
from reframework.
No, not at all. As mentioned, the freeze occurs for me even without any logic within the hook. I'll test it again tomorrow morning with the new changes.
Granted it's not reproducible though, it might be related to the fact that it's part of a pretty massive project, which already contains a ton of different hooks and functions. I doubt there's a correlation, but maybe there's something in that.
I'll tell you how it goes.
EDIT: Oh wait, I suppose you mean first hooking onto a different function which calls getSkillData
in addition to having hooked that function. My mind had immediately hopped to accidental recursion into stack overflowing. I suppose there's a chance I've made a combo like that; As I said, it's a huge and diverse project, so it's not unlikely there's something like that in there somewhere.
from reframework.
Seems to work properly with the newest version.
Now, I've had some issues in the past where hooks and such would stop working even through game restarts due to some kind of system instability of sorts (I genuinely have no clue either), and those issues would be solved by system restarts. Seeing as how I was testing this on a different system, I gave it a shot with the old version as well in order to see if it wasn't system specific, and sure enough: it did freeze on this system as well. So, that means the new hook system did in fact fix something, so thanks a lot for looking into it! 🎉
from reframework.
I should mention that these changes have removed the guarantee between pre and post that the entire hook will be locked down across threads. Meaning that saving some of the args to use in post may break now if it's a method called on multiple threads.
I'm still playing around with this and thinking of possible solutions that won't break old scripts that were relying on this guarantee.
from reframework.
Nightly release will have a thread
API for those instances where you absolutely need something you can only get in the pre
hook but need to use it in the post
hook for some reason. Many cases this may not matter, but to be absolutely correct, then use the thread
API, like this:
local pawn_t = sdk.find_type_definition("app.Pawn")
sdk.hook(
pawn_t:get_method("updateMove"),
function(args)
local storage = thread.get_hook_storage()
storage["this"] = sdk.to_managed_object(args[2])
end,
function(retval)
local this = thread.get_hook_storage()["this"]
print("this: " .. tostring(this:get_type_definition():get_full_name()))
return retval
end
)
This is only necessary if the hooked function seems to be getting called very frequently, and from multiple threads.
Docs: https://cursey.github.io/reframework-book/api/thread.html
from reframework.
381c677 should be the final commit that resolves any issues with the new hooking system. Let me know if these new changes still work as intended.
from reframework.
I'll check it as soon as I have time. Thanks for your hard work! I take it this will become a main branch feature at some point?
from reframework.
It already is on master branch. Unless you mean uploaded to Nexus, then sure. I'm pretty busy with working on the C# API and Dragon's Dogma 2 so don't know when that will happen.
from reframework.
Ah, I meant the master branch, but it would also be neat to have it on nexus so that people won't have too much trouble getting their hands on it, but there's no haste. The mod won't be out for at least a few months, so it can wait until you have more time on your hands.
I've also gotten to test things now, and I'm glad to see that the whole hook args thing isn't as breaking as it sounded. I'll still upgrade my old functions to use the new thread storage, but it's nice to see that my old mods likely won't be affected.
Again, thanks for your hard work!
from reframework.
Related Issues (20)
- Enabling vertical FOV does nothing and using vertical FOV override affects HUD
- REFramework Caused RE4 To Crash Even After Using Fresh Download HOT 6
- Resident Evil 4 Remake Crashes
- RE4R crash
- DD2 Random Crashes with 816 HOT 2
- RE8 controllers doesn't work HOT 1
- Can't change the camera to first person in RE 8 DLC Shadow of Rose VR
- WHOLE PC freeze after using REFramework on RE4 HOT 3
- DD2 : Crash on launch if i remove openvr and openxr on Linux/Proton HOT 1
- DD2 - Returning sdk.create_managed_string(str) crashes the game. HOT 1
- imgui.input_text boxes deselect, preventing text input HOT 4
- RE2 reframework does not initialize "exception thrown" HOT 2
- re4 Game crashes when opening HOT 10
- How to turn off VR-controllers vibration
- RE8: How to stop horizontal camera movement?
- RE8 Crashes on Startup
- RE7 crashes on logos
- RE4 Crashing With Scope Deinterlacing HOT 1
- RE7 Main Menu unusable - cutscenes unwatchable HOT 5
- [MHR] - Inputs being registered to the game at all times (with Input Passtrough off)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reframework.