Conversation
… + add manual spans/breadcrumbs surrounding this
- auto-select 'Enter Name' on game-over - navigate to the correct fields if deselected - fix double-post possibility
- 'animated' pop-in - shows score before triggering name field
| // WARNING, this also crashes in the Editor (on purpose, to easily test) | ||
| forceCrashAction.performed += _ => | ||
| { | ||
| Debug.Log("ForceCrash triggered via input."); | ||
| Marshal.ReadInt32(IntPtr.Zero); // null pointer dereference — works on all platforms | ||
| }; |
There was a problem hiding this comment.
our other 'crash on game over' does not trigger in the Editor, which makes sense since this also does crash the Editor itself... we could add the same safeguard here, I just kept it like this to make testing slightly easier.
|
@sentry review |
| false, // multiline | ||
| false, // secure | ||
| false, // alert | ||
| _nameField.placeholder.GetComponent<TextMeshProUGUI>().text // placeholder text |
There was a problem hiding this comment.
Bug: A potential NullReferenceException exists when opening the on-screen keyboard. The code accesses _nameField.placeholder without checking if it's null, which can cause a crash.
Severity: HIGH
Suggested Fix
Use the null-conditional operator (?.) and null-coalescing operator (??) to safely access the placeholder text and provide an empty string as a fallback: _nameField.placeholder?.GetComponent<TextMeshProUGUI>()?.text ?? "".
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: Assets/Scripts/UI/ScorePoster.cs#L192
Potential issue: The code at `ScorePoster.cs:192` attempts to get the placeholder text
for the on-screen keyboard using
`_nameField.placeholder.GetComponent<TextMeshProUGUI>().text`. However, the
`_nameField.placeholder` property can be null if it's not assigned in the Unity editor.
This will cause a `NullReferenceException` when `GetComponent` is called on a null
object. A second `NullReferenceException` can occur if the placeholder exists but lacks
a `TextMeshProUGUI` component, as `.text` would be accessed on a null result. This will
crash the application on touch-supported devices when the user tries to enter their
name.
Did we get this right? 👍 / 👎 to inform future reviews.
| _buttonText.text = "Retry"; | ||
| uploadTransaction.Finish(SpanStatus.InternalError); | ||
| } | ||
| } |
There was a problem hiding this comment.
Bug: An HttpClient instance is created in Start() but is never disposed in OnDestroy(), causing a resource leak every time the scene is reloaded on non-Switch platforms.
Severity: MEDIUM
Suggested Fix
Implement the IDisposable interface on the ScorePoster class and call _httpClient?.Dispose() within the Dispose method. Then, call this Dispose method from OnDestroy() to ensure the HttpClient is properly cleaned up when the object is destroyed.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: Assets/Scripts/UI/ScorePoster.cs#L142
Potential issue: On non-Switch platforms, an `HttpClient` instance is created in the
`Start()` method of the `ScorePoster` component but is never disposed. Because the
`ScorePoster` is destroyed and recreated every time the scene is reloaded (e.g., when
the player clicks "Try Again"), a new `HttpClient` is leaked with each playthrough. This
consumes system resources like connection sockets, which can lead to performance
degradation, connection failures, or crashes over extended sessions, particularly in a
demo environment.
Did we get this right? 👍 / 👎 to inform future reviews.
Adds a bunch of QoL and fixes for us to be able to demo at GDC 2026 using our handhelds
ℹ️ This PR is not necessarily meant to be merged into
mainin full; there is some pure QoL, but the GDC specific 'DLC' changes could be left on this branch. We might split this up into a separate PR that brings only the relevant stuff over into mainDemoConfig.asset(_apiUrl,user.Usernameanduser.Password),packages-lock.json,SentryOptions.asset(<Dsn>k__BackingField))Overview
fixes
UnityWebRequestinstead ofhttpClient.enter namefield once everything is loaded. This will trigger the built-in keyboards on our handhelds. When deselecting the field, we navigate to the 'submit' button, so users just confirm by X/A to send their score.Utils.ForceCrash, since the latter did not work on Switch.cosmetic changes
DLCicon to be GDC editionco-authored by Claude