[Live-devel] setlocale 0xc0000374 heap corruption - LOCALE_NOT_USED is OK

Richard Lince richard.lince at bluebox.video
Tue Oct 26 03:42:55 PDT 2021


Hi Ross / others,

Spoken before in the past, very happy and impressed with the set of 
cross platform libraries you've developed.
We've used the server and client class's for some times without issue..

After a weekend of debugging, we came across a strange anomaly that I 
would appreciate your comments on.
Locale.hh on a Windows 10 build.

By default the NEWLOCALE_NOT_USED is defined and works great when we run 
up many streaming windows all in separate process's.
If we use a single process (less memory consumed by NVIDIA graphics) we 
see an access violation in the c runtime setlocale function after a few 
minutes and few client endpoint stream changes. Note, we are using a 
H264 MediaSink client streaming arrangement. The issue is repeatable.

Call stack example (and attached):



Obviously this is not Live555 code. I simply want any light you may be 
able to shed on the issue.
Visual Studio 2015 v140 C++ link, runtime and redistributable build.
Application Verifier did not help.

*Defining LOCALE_NOT_USED eliminates the crash*, we can successfully 
stream 48 1080p 30 H264 streams within a single process, switching the 
URL and rebuilding the Live555 class stack every 30 seconds for 12+ hours.
Heap corruption gone.
What is the consequences of not using the setLocale call in practical 
terms that we need to be concerned about during real world operation?
However, I'm not happy with such a blind fix!

Many thanks in advance.

Best Regards,
Richard Lince,
Founder & Managing Director

bluebox.video <https://www.bluebox.video>
+44(0)7841665146

logo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20211026/e1266d93/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pmifdlbpllkmifcn.png
Type: image/png
Size: 92267 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20211026/e1266d93/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo_email.png
Type: image/png
Size: 6840 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20211026/e1266d93/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LocaleErrStackTrace.png
Type: image/png
Size: 92267 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20211026/e1266d93/attachment-0005.png>


More information about the live-devel mailing list