To access some CRT functionality which requires a per thread data structure. To be precise, you won't get this error when the thread is created, you'll get this error later when you try This error can also happen when you create a thread by using CreateThread or any other function which doesn't use _beginthtread/_beginthreadex. I'm not sure how that can happen during at app startup, that would mean that the system itself is toast.Ģ. This error can occur during app startup when the (non dll) C runtime is initialized. This seems to match your situation because you statically link the C runtime.īut this initialization occurs before your code gets a chance to run and the possible reasons for this include lack of memory and lack of TLS slots. That means you could take a look at it and get an idea about what's going on. The source of the C runtime is included with Visual Studio (check the VS installation folder\VC\crt\src). R6016 is a error generated by the VC runtime. Too bad that the error you are seeing has nothing to do with access violation or any other exception. Oh well, that sounds like the description of an access violation exception. So any type error that accesses a invalid memory error can be causing this problem." "The error you are getting is caused by an access to a memory location outside the bounds that the operating system is allowing and causing an exception. "JDWeng, I agree with everything you just said"Įxcept that what he says has little to do with your problem. Is there some compiler setting somewhere that might influence this error? Or programming mistake? I've only heard about this on Windows 8.1, but I wouldn't read too much into that. This happens very rarely (so I can't track it down), and it's been reported on more than one machine. Not sure if it's relevant, but I haven't overridden the default 1MB reserved stack size or heap size, and the total memory in use by my program is usually quite small (3MB-10MB on a system with 12GB actual RAM, over half of which is unallocated). One user reported this problem when the program was just However, my code only explicitly spawns a new thread in a couple of well-defined cases, neither of which are occurring here (although certainly the Microsoft libraries internally spawn threads at will). Microsoft documentation says this error message is generated when a new thread is spawned, but not enough memory can be allocated for it. My statically-linked Visual C 2012 program sporadically generates a CRTL error: "R6016 - Not enough space for thread data".
0 Comments
Leave a Reply. |