InputSystem
InputSystem copied to clipboard
CHANGE: Improve error logging when event get discarded (ISXB-691)
Description
Improves the error logging for the issue ISXB-691 with the amount of events processed by device.
Changes made
PR adds a way of accumulating the total amount of bytes processed during an update call, per device.
Currently, this data will only be present when InputSettings.maxEventBytesPerUpdate
is exceeded in an update call.
But in the future, it could potentially be used as well to present the average of bytes processed per frame for a device in the Input Debugger Window
This logging of extra data will only affect development builds. It allows developers to identify the devices or other issues causing the error.
Notes
I did not see a performance impact when profiling this with the test CorePerformanceTest.Performance_Update10Gamepads
.
To test this the error needs to be raised. Just decrease InputSystem.settings.maxEventBytesPerUpdate
to something like 10 bytes. Try to see the difference between development builds and non-development builds.
Checklist
Before review:
- [x] Changelog entry added.
- Explains the change in
Changed
,Fixed
,Added
sections. - For API change contains an example snippet and/or migration example.
- FogBugz ticket attached, example
([case %number%](https://issuetracker.unity3d.com/issues/...))
. - FogBugz is marked as "Resolved" with next release version correctly set.
- Explains the change in
- [x] Tests added/changed, if applicable.
- Functional tests
Area_CanDoX
,Area_CanDoX_EvenIfYIsTheCase
,Area_WhenIDoX_AndYHappens_ThisIsTheResult
. - Performance tests.
- Integration tests.
- Functional tests
- [ ] Docs for new/changed API's.
- Xmldoc cross references are set correctly.
- Added explanation how the API works.
- Usage code examples added.
- The manual is updated, if needed.
During merge:
- [x] Commit message for squash-merge is prefixed with one of the list:
-
NEW: ___
. -
FIX: ___
. -
DOCS: ___
. -
CHANGE: ___
. -
RELEASE: 1.1.0-preview.3
.
-
Caught a crash when adding a gamepad in order to see what information the error will show. Adding the Editor.log and will try to repro it consistently
Caught a crash when adding a gamepad in order to see what information the error will show. Adding the Editor.log and will try to repro it consistently
Oh interesting. Which Gamepad by the way? Let me know once you manage to reproduce it
Caught a crash when adding a gamepad in order to see what information the error will show. Adding the Editor.log and will try to repro it consistently Editor.log
Oh interesting. Which Gamepad by the way? Let me know once you manage to reproduce it
Xbox series x controller (I think that's the name for the latest one 😅)
@Pauliusd01 has detected some inconsistencies in logging with Xbox controllers on Windows, I'll investigate it once I get an Xbox controller
@Pauliusd01 you can retest with Xbox controllers on Windows
@jfreire-unity It would be great if you could post an example of what gets printed into t his PR, e.g. from your system when breaking the boundary (fine to set low)
@jfreire-unity It would be great if you could post an example of what gets printed into t his PR, e.g. from your system when breaking the boundary (fine to set low)
Added