-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Description
when calling GetPrintQueues I sometimes get a NullReferenceException (not always)
Reproduction Steps
var server = new System.Printing.PrintServer();
var queues = server.GetPrintQueues(new[] { EnumeratedPrintQueueTypes.Local, EnumeratedPrintQueueTypes.Connections });
Expected behavior
never having a nullreference exception
Actual behavior
sometimes (don't know how to reproduce it) I get a NullReferenceException. (feels like it happens the first time something needs to be initialised.)
Regression?
No response
Known Workarounds
No response
Impact
No response
Configuration
.net 7 latest
windows 10 x64 22h2
vs2022 pro any cpu
Other information
when looking at https://github.com/dotnet/wpf/blob/main/src/Microsoft.DotNet.Wpf/src/System.Printing/ref/System.Printing.cs#L393 I see that it throws null, but I have print queues as a result, sometimes it throws null, but don't know why exactly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels