Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » ArrayCtrl Write To Freed Memory Detected
ArrayCtrl Write To Freed Memory Detected [message #34824] |
Tue, 13 December 2011 21:25 |
r1kon
Messages: 7 Registered: January 2011
|
Promising Member |
|
|
I have a program with a few threads, with one in particular that receives data from a socket and writes it to an array control in a tab:
splits = Split(work, ',' ,true); //split it all by comma
int theCount = splits.GetCount(); //number
for(int i = 0; i < tabConnectionLayout.arr.GetCount(); i++)
{
tabConnectionLayout.arr.Set(i,0,splits[1]);
tabConnectionLayout.arr.Set(i,1,splits[2]);
tabConnectionLayout.arr.Set(i,2,splits[3]);
tabConnectionLayout.arr.Set(i,3,splits[4]);
tabConnectionLayout.arr.Set(i,4,splits[5]); //<-- THIS is where it crashes
}
The interesting thing is that the program can run for hours without problems or simply minutes. The crash itself is a PANIC: Writes to freed blocks detected, the break is at the commented line above (I've verified the data is correct, proper sizes in "splits" as well). The log file shows writing to a section of memory that says "FreeFreeFreeFreeFree", etc.
What could be the issue here? I didn't know there would be a problem with writing to an array control like that? Could that be what is happening?
I'm running up the wall on this one, very hard to debug considering the crash is kind of random, but is always the same message. Any help at all would be GREATLY appreciated!
-Kevin
|
|
|
Goto Forum:
Current Time: Fri Sep 20 17:22:10 CEST 2024
Total time taken to generate the page: 0.02632 seconds
|