Skip to content
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

Add FlickeringText GetReportString null handler #223

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

Fayti1703
Copy link
Contributor

@Fayti1703 Fayti1703 commented Oct 23, 2023

This fixes a base-game issue where exceptions thrown in DisplayModule.Draw could crash the game to desktop, if the Main Menu was bypassed (e.g. by launching an exception with -extstart).

To reproduce the original issue:

  1. Create an Extension with the example broken node
    1. This Extension must have an empty Missions/EmptyDirectory directory.
  2. Connect to the node (connect err::mls_nosvc)
  3. Wait 3 frames
  4. Observe the game hard-crash

This crashes because DisplayModule.Draw calls Utils.SendThreadedErrorReport after 3 draw errors, launches a new thread to run Utils.SendErrorEmail.
While building up the email body, that method calls FlickeringTextEffect.GetReportString, which accesses FlickeringTextEffect.LinedItemTarget.IsDisposed.
If the Main Menu has not been rendered in the current game process execution, FlickeringTextEffect.LinedItemTarget is null, causing a crash.

Example Broken Node:

<Computer id="err::mls_nosvc" name="Mission Listing Server without a serviceName" type="4" ip="err::mls_nosvc">
	<LogoDaemon Name="Daemon To Prevent Crash On initDaemons()" />
	<!-- no 'name' attribute on this element -->
	<variableMissionListingServer articleFolderPath="Missions/EmptyDirectory"  />
</Computer>

Fixes a base-game issue where an Extension launched with `-extstart`
would cause the game to crash if too many errors occured
in `DisplayModule.Draw`.
@Arkhist Arkhist added this to the 5.3.3 milestone Oct 23, 2023
@Arkhist Arkhist merged commit 8cf5df5 into Arkhist:develop Oct 23, 2023
@Fayti1703 Fayti1703 deleted the feature/fix-flicker-report-null branch October 24, 2023 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants