I don't understand this bug fix from years ago

Ben Rush ben at ben-rush.net
Mon Sep 23 15:08:50 UTC 2019


https://sourceforge.net/p/gstreamer/mailman/message/26689776/

That's the conversation about the bug, and here's the line:

https://github.com/GStreamer/gstreamer/blob/master/gst/gsttask.c#L134

The reason this is done is:

https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-set-a-thread-name-in-native-code?view=vs-2019


It's manually tossing an exception (RaiseException). But we can use
SetThreadDescription now in 2017+. I get that it's important to support
older versions of Visual Studio, but if it's only valuable for them while
debugging, why not wrap it in
https://docs.microsoft.com/en-us/windows/win32/api/debugapi/nf-debugapi-isdebuggerpresent?redirectedfrom=MSDN?
In all other crashing instances, this method isn't valuable.

The problem is that when you register a global error watcher via vectored
exception handling, this error floods your logs regardless of whether it's
caught. I can filter by  0x406D1388, but I argue it's not really a good
thing to do. Also: it's not as useful as SetThreadDescription for us using
more modern versions of VS and Windows.

Does anybody know any history behind this besides what I've found?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190923/30bbd8f9/attachment.html>


More information about the gstreamer-devel mailing list