Uh oh!
There was an error while loading. Please reload this page.
Process: throw ArgumentNullException when ArgumentList contains a null. - #59562
Conversation
ghost
commented
Sep 24, 2021
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process |
Uh oh!
There was an error while loading. Please reload this page.
stephentoub
commented
Sep 24, 2021
How does this fix that issue? |
The reproducer doesn't reproduce the issue. The |
stephentoub
commented
Sep 24, 2021
What null? And if null is being added to the collection and that's the cause, isn't this still throwing an ArgumentNullException, just with a different stack? |
tmds
commented
Sep 24, 2021
The reproducer doesn't reproduce the issue. The stacktrace is correct though. |
stephentoub
commented
Sep 24, 2021
I'm still confused. The purpose of this PR isn't to prevent an exception / change something that wasn't working into something that does work, but rather just improve where an exception comes from. Yes? |
tmds
commented
Sep 24, 2021
Yes, it's validating the user doesn't add When I run: It throws with the stacktrace from the issue. |
stephentoub
commented
Sep 24, 2021
And with this the exception looks like...? |
tmds
commented
Sep 24, 2021
Adding |
am11
commented
Sep 24, 2021
Should we ignore / tolerate null instead? A quick search in dotnet org suggests all occurrences are pretty hard to reproduce: https://github.com/search?q=org:dotnet+"String+reference+not+set+to+an+instance+of+a+String."&type=issues. Thanks for finding out the root-cause! 👍 |
tmds
commented
Sep 24, 2021
We shouldn't allow I don't have a Windows machine. Looking at the code, I expect it to throw also. Now, we'll throw sooner with a more meaningful exception that indicates the input is invalid. |
Uh oh!
There was an error while loading. Please reload this page.
tmds
commented
Oct 19, 2021
@stephentoub I've moved the check into |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
tmds
commented
Oct 26, 2021
Feedback addressed, this should be good to merge. |
stephentoub
commented
Oct 26, 2021
Thanks |
Fixes#44034.