Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FileDialog crash when bottom 4GB full

in order to catch pointer truncation bugs in 64 bits, I added the code snippet mentioned here that reserves the bottom 4GB of memory so allocs are above 32 bits. In a MFC x64 test app, I call the reservation function first thing in InitInstance(). I then added a button that simply does:

CFileDialog dlg(TRUE);
dlg.DoModal();

Calling DoModal eventually crashes somewhere with a callstack in "no mans land":

>   000000018000163b()  
    0000000100000024()  
    0000000000000001()  

This is not MFC specific since I get the same behavior with a .NET FileDialog. I think it's something out of my hands since the actual fileDialog shows up briefly and then crashes. Feels like a shell extension or something but I can't get where it's coming from since the call stack isn't helping - but I want to find out if there's anything I can do!

If I remove the special reservation function I don't get the crashes anymore.

Puzzled!

like image 860
Francis Boivin Avatar asked Feb 23 '12 13:02

Francis Boivin


1 Answers

I am unable to repro this crash. I created a 64-bit project, added the 4 GB reservation, and opened a file dialog within it. No crash.

Either my repro doesn't match yours, or there is something on your system that is different. You should post your project so that we can remove one of the variables.

Unfortunately I don't remember what a TppWorkerThread is.

Post your project -- all source files, resource files, .vcxproj files, and .sln files. Then we can investigate.

like image 163
Bruce Dawson Avatar answered Oct 21 '22 00:10

Bruce Dawson