STL or <afxtempl.h>
-
Hello! :) I am making MFC application which is divided into many DLL. I am using STL and having problems with "access violation". Should I use <afxtempl.h> instead, or is there anyway to fix that STL error? Your comments would be appriciated. Sovann :)
-
Hello! :) I am making MFC application which is divided into many DLL. I am using STL and having problems with "access violation". Should I use <afxtempl.h> instead, or is there anyway to fix that STL error? Your comments would be appriciated. Sovann :)
-
Well, when all in one EXE, everything works just fine. Until we break into many DLL and pass/save pointer back/forth, we come to this "access violation". Most of the crash, we have invalid pointer such as 0xfeeefeee or 0xcccdcccd. Sovann :)
-
Well, when all in one EXE, everything works just fine. Until we break into many DLL and pass/save pointer back/forth, we come to this "access violation". Most of the crash, we have invalid pointer such as 0xfeeefeee or 0xcccdcccd. Sovann :)
Hello, I don't know the exact meaning of those addresses, but they have something to do with uninitialized or already deleted pointers. The rule of thumb is that you do not spread your memory management across different modules, that is, you should not allocate a block in your DLL A and free it in another module. Your problem might be here. Maybe you should make a copy of a memory block when it's saved across module boundraries. Hope this helps. Behind every great black man... ... is the police. - Conspiracy brother Blog[^]
-
Hello, I don't know the exact meaning of those addresses, but they have something to do with uninitialized or already deleted pointers. The rule of thumb is that you do not spread your memory management across different modules, that is, you should not allocate a block in your DLL A and free it in another module. Your problem might be here. Maybe you should make a copy of a memory block when it's saved across module boundraries. Hope this helps. Behind every great black man... ... is the police. - Conspiracy brother Blog[^]
Thank you for your comments. I would reconsider the memory management. Sovann.
-
Thank you for your comments. I would reconsider the memory management. Sovann.
-
Thank you very much for your comments. I have read them all. My problem was direct access to STL object in other module. Now I am working on it. Thanks again. Have a nice day! :)