My application works properly except in some cases I get this error
R6016 not enough space for thread data
So I am now investigating why I get this error. I am not surre If my app is causing this or something in the backend.
Here is a xml from the windows event log of the error
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-12-17T14:03:36.000000000Z" />
<EventRecordID>333483</EventRecordID>
<Channel>Application</Channel>
<Computer>MY-PC</Computer>
<Security />
</System>
- <EventData>
<Data>apache.exe</Data>
<Data>2.2.19.0</Data>
<Data>4dd7429b</Data>
<Data>ntdll.dll</Data>
<Data>6.1.7601.17725</Data>
<Data>4ec49b8f</Data>
<Data>c0000005</Data>
<Data>000343d6</Data>
</EventData>
also here is a helper information
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Windows Error Reporting" />
<EventID Qualifiers="0">1001</EventID>
<Level>4</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-12-17T14:03:45.000000000Z" />
<EventRecordID>333484</EventRecordID>
<Channel>Application</Channel>
<Computer>MY-PC</Computer>
<Security />
</System>
- <EventData>
<Data>3122334836</Data>
<Data>1</Data>
<Data>APPCRASH</Data>
<Data>Not available</Data>
<Data>0</Data>
<Data>apache.exe</Data>
<Data>2.2.19.0</Data>
<Data>4dd7429b</Data>
<Data>ntdll.dll</Data>
<Data>6.1.7601.17725</Data>
<Data>4ec49b8f</Data>
<Data>c0000005</Data>
<Data>000343d6</Data>
<Data />
<Data />
<Data>C:\Users\MyUserName\AppData\Local\Temp\WERA29B.tmp.WERInternalMetadata.xml</Data>
<Data>C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_SenseWeb.exe_337f61e2ed7abb1fe78d685bd48c832557c6b1_3561c67f</Data>
<Data />
<Data>0</Data>
<Data>8c82cf18-4852-11e2-a5d0-005056c00008</Data>
<Data>0</Data>
</EventData>
</Event>
Why this is happening? What do I do wrong?
There are two possibilities:
On is if you are repeatedly loading and unloading some DLL, causing the system to run out of TLS entries. You should just leave it loaded.
The other is if you are calling TLSAlloc over and over. You should only need to call this a very small number of times.
See this knowledge base article for more information.