Closed AnnznnA closed 2 months ago
Please change bUseUObjectArrayCache
default to false in future releases and add to the documentation of FindFirstOf and FindAllOf how to cache objects (like in UEHelpers).
I see some mod creators calling FindFirstOf in hooked functions that gets called each frame on objects that exist the whole game long (until leaving into main menu).
@AnnznnA To answer your question, yes. All hooks will be executed. In which order depends on the order in which the mods were loaded.
Didn't he say above setting it to false is causing crashes sometimes? What issue is it causing when true and the GUI is not enabled?
Anyone can also do a pull request for the documentation.
Didn't he say above setting it to false is causing crashes sometimes?
Then it would stand out earlier that something needs fixing. bUseUObjectArrayCache just makes too huge difference in performance for most games. The lag spikes are otherwise the main reason why people don't like to use UE4SS mods.
Anyone can also do a pull request for the documentation.
I'm just testing waters here. If people who know UE4SS code better than I agree,
We should just remove bUseUObjectArrayCache completely. It's not very useful, and it seems to be causing lots of problems.
Didn't he say above setting it to false is causing crashes sometimes?
Then it would stand out earlier that something needs fixing. bUseUObjectArrayCache just makes too huge difference in performance for most games. The lag spikes are otherwise the main reason why people don't like to use UE4SS mods.
The stability of it was fixed since the last release. Hasn't made it into a release yet.
Didn't he say above setting it to false is causing crashes sometimes?
Then it would stand out earlier that something needs fixing. bUseUObjectArrayCache just makes too huge difference in performance for most games. The lag spikes are otherwise the main reason why people don't like to use UE4SS mods.
The stability of it was fixed since the last release. Hasn't made it into a release yet.
But this guy is using it with wukong, which uses the experimental version. nvm, this is in reply to someone else
I can advise users turn off the [bUseUObjectArrayCache] setting,This solves a lot of problems in previous versions。 I did need this setting when developing, however it seems that my suggestion to have users turn off this setting is causing the problem, and I wonder if there is a possible reason why I wouldn't have replied to these customers In [BlackMythWukong] version
Please change
bUseUObjectArrayCache
default to false in future releases and add to the documentation of FindFirstOf and FindAllOf how to cache objects (like in UEHelpers). I see some mod creators calling FindFirstOf in hooked functions that gets called each frame on objects that exist the whole game long (until leaving into main menu).@AnnznnA To answer your question, yes. All hooks will be executed. In which order depends on the order in which the mods were loaded. I think so, but the order is really important for users to download multiple mods. UE4SS Documentation Suggest me *don't duplicate the NotifyOnNewObject call for the same class multiple times . if it's the same[RegisterHook]
Can you please rephrase or explain a bit more about when there are crashes or issues? I'm confused if it's when ObjectArrayCache is on or off for the wukong upload
Can you please rephrase or explain a bit more about when there are crashes or issues? I'm confused if it's when ObjectArrayCache is on or off for the wukong upload
Two issues I collected,unfortunately, I am unable to reproduce it myself [When first opened the game][common] The first common example is that after entering the game, the game crashes without leaving any dmp files, the game process is closed, and there are no dmp files related to ue4ss or ue_5.0. Since the user did not record or screenshot information, I speculate that the mod was not loaded at that time, because as long as they entered the game, the mod could run stably. an important description is that in this situation, the game often crashes once when opened, and the second time it is opened, it can enter
[When using the module][specialcase] There is another exception, some users have installed many mods and the mods crash. I think this is a mod problem,I am requesting the dmp file
[Uploading crash_2024_08_24_13_17_18.zip…]()
Can you please rephrase or explain a bit more about when there are crashes or issues? I'm confused if it's when ObjectArrayCache is on or off for the wukong upload
Two issues I collected,unfortunately, I am unable to reproduce it myself [When first opened the game][common] The first common example is that after entering the game, the game crashes without leaving any dmp files, the game process is closed, and there are no dmp files related to ue4ss or ue_5.0. Since the user did not record or screenshot information, I speculate that the mod was not loaded at that time, because as long as they entered the game, the mod could run stably. an important description is that in this situation, the game often crashes once when opened, and the second time it is opened, it can enter
[When using the module][specialcase] There is another exception, some users have installed many mods and the mods crash. I think this is a mod problem,I am requesting the dmp file
Today I conducted a careful verification of these issues. Because of my suggestion, some users attempted to change the setting to false and occasionally experienced crashes. They believed it was a configuration issue, but after changing it back to true, they were able to run normally. This should be an accidental event. I tested it remotely using these users' devices, and in fact, this configuration should be irrelevant. I'm sorry for the incorrect issue I gave. The reason for this is that the game seems to be more prone to crashing after using Lua scripts or blueprint mods even without loading any mods.
Resolved
I just wanted to add that after testing fixed UObjectArrayCache in recent experiment versions over many weeks, while performance has improved greatly, the difference between on and off is still noticeable.
Mainly when switching between different levels.
In my case it's the game Abiotic Factor, with bUseUObjectArrayCache = true
I still get massive "lag" spikes while traveling between two levels aka. objects are getting loaded and unloaded. With bUseUObjectArrayCache = false
the translation happens fluid.
I just wanted to add that after testing fixed UObjectArrayCache in recent experiment versions over many weeks, while performance has improved greatly, the difference between on and off is still noticeable. Mainly when switching between different levels. In my case it's the game Abiotic Factor, with
bUseUObjectArrayCache = true
I still get massive "lag" spikes while traveling between two levels aka. objects are getting loaded and unloaded. WithbUseUObjectArrayCache = false
the translation happens fluid.
Having bUseUObjectArrayCache = true
does two things:
UObjectGlobals::FindObject
, and therefore in StaticFindObject
, because that's just a wrapper for FindObject
.
It's also used in the actors CSV & JSON generator.
The searcher pools are invalidated in FClassDeleteListener::NotifyUObjectDeleted
in ClassListener.cpp.
The pools are populated during init, and in the following places: HookedUStructLink
, and HookedStaticConstructObjectPost
.Unless the problem can be tracked down and fixed, my suggestion is to remove the option from the config file, removal or at least temporary stoppage of the usage of the searcher pool system, and let the live view register its listeners regardless since those shouldn't affect the game unless you're developing mods which is an acceptable annoyance I think.
Unless the problem can be tracked down and fixed, my suggestion is to remove the option from the config file, removal or at least temporary stoppage of the usage of the searcher pool system, and let the live view register its listeners regardless since those shouldn't affect the game unless you're developing mods which is an acceptable annoyance I think.
Actually, this is a relatively acceptable thing, I think the default configuration is safe, I can't understand why users would change the configuration themselves if they don't develop mods, maybe they copied ue4ss from some modders and kept the developer configuration. In short, none of these issues are the main problems.
By the way, I'm more supportive of this feature, and I'm hoping that LiveView's fuzzy query results can be sorted by class name first, because I often search for full class names, and because there are substrings in multiple results, there are too many results to find, and even a button to sort the search results I'm willing to accept, because I don't want to use lua code to output these tests.It makes sense to look for objects directly with LiveView
I don't think it will have a big impact on the sorting of search results, but I don't have the ability to modify the source code。 This is certainly not a Issues, and based on your reply to this closure, I thought I could make a request in passing, which of course is not necessary
I recommend that users set [bUseUObjectArrayCache] to false when using the mod, and then recently there have been many users who set it to false and it crashes, and the configuration is true but it works normally, whether there is a problem with this parameter
And I may have another question, if two different modules hook the same function at the same time, will it be merged automatically like this ModA:
ModB: