Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix unsigned integer types (UInt16, UInt32, UInt64) display in event viewer #2321

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

Closed
Copilot wants to merge 2 commits into main from copilot/fix-ulong-event-display

Conversation

Copy link
Contributor

Copilot AI commented Oct 17, 2025
edited
Loading

Problem

Event properties with unsigned integer types (UInt16, UInt32, UInt64) were being displayed as their signed equivalents (short, int, long) in the event viewer. This caused issues when viewing events with large unsigned values, which would appear as negative numbers.

For example, a ulong value like

Original prompt

This section details on the original issue you should resolve

<issue_title>ulong event property is displayed as long in event viewer.</issue_title>
<issue_description>I have a method to write ulong event in my event source:

 [NonEvent]
 private unsafe void WriteEvent(int eventId, ulong arg1)
 {
 if (IsEnabled())
 {
 EventData* descrs = stackalloc EventData[1];
 descrs[0] = new EventData { DataPointer = (IntPtr)(&arg1), Size = 8 };
 WriteEventCore(eventId, 1, descrs);
 }
 }

Yet it is still displayed as a long value inside the events grid view.

Image

Is this expected behavior or fixable?</issue_description>

Comments on the Issue (you are @copilot in this section)

@brianrob I am not surprised at this. Looking at the code - at a minimum, this is coming from the `PayloadFetch` struct, which converts incoming signed and unsigned types into their signed .NET equivalents.

I am not sure how easy this is to fix, but I would hope relatively simple. Let's start with copilot trying to update PayloadFetch to differentiate between signed and unsigned types and see if that solves the problem.

Copilot: Please focus specifically on changing the handling of UInt16, UInt32, and UInt64. Don't touch UInt8. You should be able to update the switch statement to set the .NET type to be the unsigned type that matches the input type, rather than translating to the signed .NET type.</comment_new>
<comment_new>@brianrob
@tomuxmon would you mind testing #2315 and see if that fixes your issue?</comment_new>

Fixes #2309


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

...viewer
Co-authored-by: brianrob <6210322+brianrob@users.noreply.github.com>
Copilot AI changed the title (削除) [WIP] Fix ulong event property display in event viewer (削除ここまで) (追記) Fix unsigned integer types (UInt16, UInt32, UInt64) display in event viewer (追記ここまで) Oct 17, 2025
Copilot AI requested a review from brianrob October 17, 2025 18:43
Copy link
Member

Closed in favor of #2315.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@brianrob brianrob Awaiting requested review from brianrob brianrob is a code owner

@cincuranet cincuranet Awaiting requested review from cincuranet cincuranet will be requested when the pull request is marked ready for review cincuranet is a code owner

@leculver leculver Awaiting requested review from leculver leculver will be requested when the pull request is marked ready for review leculver is a code owner

@mconnew mconnew Awaiting requested review from mconnew mconnew will be requested when the pull request is marked ready for review mconnew is a code owner

@marklio marklio Awaiting requested review from marklio marklio will be requested when the pull request is marked ready for review marklio is a code owner

@StephenMolloy StephenMolloy Awaiting requested review from StephenMolloy StephenMolloy will be requested when the pull request is marked ready for review StephenMolloy is a code owner

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

ulong event property is displayed as long in event viewer.

2 participants

AltStyle によって変換されたページ (->オリジナル) /