Adding Satisfactory Modding Crash Reporter #142
+1,443
−17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a custom crash reporter for the modding community.
Consists of three simple parts:
Mods can now specify a
CrashReportingEndpoint
inside their.uplugin
file.This endpoint has to be a URL.
When entering the main menu, SML looks at all loaded mods and their endpoints. These will then be compared with a accepted and rejected list of endpoints which is stored in the SML configuration.
Unknown endpoints will then get displayed in a prompt in the main menu with a notice for the player what the prompt is and why it exists. The user can then individually decide which Endpoints he wants to accept, or he can reject or accept all of them. Alternatively he can "alway reject" which will disable the modding crash reporter.
When the prompt get closed and the store action is excuted. The SML config will be now written with the new accepted and rejected list.
The SML configuration also has a option to fully disable the modding crash reporter.
When the crash reporter is disabled, or no endpoint changes are found, then the crash report endpoint prompt wont be shown.
When the crash reporter is not disabled, and a crash occurs, the reporter will be launched.
The reporter will then try to read the SML config and the uplugin files of the mods to figure out about which endpoints we care and are accepted. He then tries to send the log file to these endpoints.
Discord URL will be recognized and a payload will be used, that can be used for a discord webhook, for other URLs a plain text http request containing the report will be sent to the endpoint.
The current crash recognition is based on the
OnShutdownAfterError
core delegate.This is a easy point to hook for error recognition after the crash report it-self got printed to the log.
The
OnSystemError
core delegate would have gotten executed too early.The
OnShutdownAfterError
core delegate gets executed byGError->HandleError()
. This in turn should be executed within the system wide error handler aka. using structured exception handling by the PC.