Hi guys:

I was stucked in a problem, the program can be built and run for a about 19 minutes, and then exited with code -1073740940.
I don't know where can find the code means ?
Develop environment : Qt 5.14.0 / Windows 10

After checked my code and did a lot of test , I found that when I disable some code sections, it would run for a long time.
The function was reading a block of dem data from memory, and it runs a about 60 times per second.

Qt Code:
  1. short int* DemPreLoad::LoadDemData_Area()
  2. {
  3. short int* crop = (short int*)malloc(sizeof(short int) * _Terrian_Range * _Terrian_Range*4); // _Terrian_Range is const for 100
  4. Location location = getLocation(); // According to longtitude & latitude caculate which row & col the right data in the dem data map
  5. Location beginlocation;
  6. int beginIndex;
  7.  
  8. beginlocation.col = location.col - _Terrian_Range;
  9. beginlocation.row = location.row - _Terrian_Range;
  10. beginIndex = (int)(beginlocation.col + beginlocation.row * 43200);
  11.  
  12. for (int rows = 0; rows < _Terrian_Range * 2; rows++)
  13. {
  14. for (int cols = 0; cols < _Terrian_Range * 2; cols++)
  15. {
  16. crop[cols + rows * _Terrian_Range*2] = _DataNow[beginIndex + cols];
  17. if (demlow>_DataNow[beginIndex + cols]) demlow=_DataNow[beginIndex + cols];
  18. if (demhigh<_DataNow[beginIndex + cols]) demhigh=_DataNow[beginIndex + cols];
  19. }
  20. beginIndex += 43200;
  21. }
  22.  
  23. return crop;
  24. }
To copy to clipboard, switch view to plain text mode 
My questions are :
1? Where could I find the code means.
2? How could fix the problem(s).

Thanks a lot.