-
Notifications
You must be signed in to change notification settings - Fork 185
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
Version checking for crash dumper #617
base: main
Are you sure you want to change the base?
Conversation
Draft PR because code currently does not build due to a bunch of seemingly unrelated errors in LiveView.cpp and Dumpers.cpp. @UE4SS any ideas? |
This is caused by |
Just fyi, you don't need to put all functions in the header. It's not a blocking problem, but it's something to keep in mind, at least for future PRs. |
412d1b5
to
c7fabf1
Compare
Need to force crash dump to happen to test crash dumper part. I tried dereferincing null ptr, accessing index out of range of array and infinite recursion, and none of them cause the crash (I put breakpoint on and they are running that code as marked by the tick on breakpoint icon) so I am out of ideas of ways to force a crash. I swear I've done this before successfully... |
I wasn't even aware you could do this, mind showing an example? Or doing it with |
It's as simple as just creating the function in the cpp file, as long as the function is declared before it's called. // UE4SSProgram.hpp
class UE4SSProgram
{
auto some_member_function() -> void;
};
// UE4SSProgram.cpp
// This function can only be called if it's defined before the caller is defined.
// Which means you have to worry about the ordering of functions in the file.
static auto function_name() -> int
{
return 4;
}
// This prevents you from having to worry about the order too much.
// Just put this declaration somewhere far up the file.
// The definition (function body) can be placed anywhere, including after the caller.
static auto other_function() -> void;
auto UE4SSProgram::some_member_function() -> void
{
function_name();
other_function();
}
static auto other_function() -> void
{
// logic for this function
} |
if not latest ue4ss version from github, add to crash dumper messagebox use xrepo libcurl use curl redirect to avoid requiring user agent for api add setting for check chore: changelog
c7fabf1
to
dfcd94b
Compare
Personally, I find the feature unnecessary. Isn't it the first feature that requires an internet connection?
At current state a lot of games require the latest experimental version to work, in such case it's not helpful. Also a lot of users don't even read the log themself, they just post "it doesn't work with game XYZ". |
I think your points here are definitely valid, and I agree to some extent. The feature itself obviously requires an internet connection, but if there isn't a connection, as far as I know it will currently fall to the "a new version is available" case, which isn't great and it would be good if this was changed if this PR goes forward. |
Description
We keep getting issues posted where the user is using an old version of UE4SS that does not work for their game.
Yangff suggested adding information that checks for new versions when crash.
Currently this change is adding the information in the message box that opens when it makes a crash dump, however the code is exposed in UE4SSProgram.hpp so could be used in other places such as in the logs or somewhere more obvious to the user, and it seems useful enough to add in the mod APIs in the future.
Type of change
How Has This Been Tested?
Tested output of warning by temporarily flipping
if (!is_latest_ue4ss_version(latest_version))
condition.Checked that config works as intended.
Need to force crash dump to happen to test crash dumper part.
Checklist