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

Use interpolated strings in DataGridView #8699

Merged
merged 3 commits into from
Feb 27, 2023

Conversation

halgab
Copy link
Contributor

@halgab halgab commented Feb 25, 2023

Contributes to #8203

This changes span all the DataGridView-related files. A lot of the changes are about StringBuilder removal.

Test methodology

static code analysis

Test environment

8.0.100-preview.1.23115.2

Microsoft Reviewers: Open in CodeFlow

@ghost ghost assigned halgab Feb 25, 2023
@halgab halgab marked this pull request as ready for review February 25, 2023 13:35
@halgab halgab requested a review from a team as a code owner February 25, 2023 13:35
Copy link
Member

@Tanya-Solyanik Tanya-Solyanik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Tanya-Solyanik
Copy link
Member

No crash dump or screenshots available.

Unhandled exception. System.InvalidOperationException: Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) in //src/System.Windows.Forms/src/System/Windows/Forms/Control.cs:line 6899
at System.Windows.Forms.Control.BeginInvoke(Delegate method, Object[] args) in /
/src/System.Windows.Forms/src/System/Windows/Forms/Control.cs:line 4629
at System.Windows.Forms.WindowsFormsSynchronizationContext.Post(SendOrPostCallback d, Object state) in //src/System.Windows.Forms/src/System/Windows/Forms/WindowsFormsSynchronizationContext.cs:line 93
at Xunit.Sdk.Utilities.SyncContextAwaiter.OnCompleted(Action continuation)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AwaitUnsafeOnCompleted[TAwaiter](TAwaiter& awaiter, IAsyncStateMachineBox box)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.<>c.b__128_1(Object state)
at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
Process terminated. Assertion Failed
Marshaling control should have created its handle in its ctor.
at System.NoAssertContext.NoAssertListener.Fail(String message, String detailMessage) in /
/src/System.Windows.Forms.Primitives/tests/TestUtilities/NoAssertContext.cs:line 104
at System.Diagnostics.TraceInternal.Fail(String message, String detailMessage)
at System.Diagnostics.TraceInternal.TraceProvider.Fail(String message, String detailMessage)
at System.Diagnostics.Debug.Fail(String message, String detailMessage)
at System.Diagnostics.Debug.Assert(Boolean condition, String message)
at System.Windows.Forms.WindowsFormsSynchronizationContext..ctor() in //src/System.Windows.Forms/src/System/Windows/Forms/WindowsFormsSynchronizationContext.cs:line 33
at System.Windows.Forms.WindowsFormsSynchronizationContext.InstallIfNeeded() in /
/src/System.Windows.Forms/src/System/Windows/Forms/WindowsFormsSynchronizationContext.cs:line 150
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(msoloop reason, ApplicationContext context) in //src/System.Windows.Forms/src/System/Windows/Forms/Application.ThreadContext.cs:line 1094
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(msoloop reason, ApplicationContext context) in /
/src/System.Windows.Forms/src/System/Windows/Forms/Application.ThreadContext.cs:line 966
at System.Windows.Forms.Application.DoEvents() in /_/src/System.Windows.Forms/src/System/Windows/Forms/Application.cs:line 794
at Xunit.Sdk.WinFormsSynchronizationContextAdapter.PumpTill(SynchronizationContext synchronizationContext, Task task)
at Xunit.Sdk.ThreadRental.<>c__DisplayClass11_0.b__0()
at System.Threading.Thread.StartCallback()

@halgab
Copy link
Contributor Author

halgab commented Feb 27, 2023

I thought this were intermittent bug failures as the previous commit tripped on the x86 release build. I noticed at least one other pull request that failed on those tests (#6945). I have to say I have absolutely no idea how my changes would affect only this leg on not the others...

Copy link
Member

@lonitra lonitra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@lonitra
Copy link
Member

lonitra commented Feb 27, 2023

Hm.. This call stack is very peculiar and one that I haven't seen before.. We should keep an eye out for this.
@halgab I do not think that has to do with your changes and is most likely due to something that occurred in our test infrastructure. We are currently working on investigating the cause for intermittent failures like this (#8607), but that should not block this PR from going in. I will rerun the tests for this one it.

@lonitra lonitra merged commit 190f292 into dotnet:main Feb 27, 2023
@ghost ghost added this to the 8.0 Preview3 milestone Feb 27, 2023
@halgab halgab deleted the string-interpol-datagrid branch February 27, 2023 21:56
@Tanya-Solyanik
Copy link
Member

@lonitra - this is an old failure - NoAssertContext is not working.

@ghost ghost locked as resolved and limited conversation to collaborators Mar 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants