Memory could not be written
-
Hi There, I am getting error "Memory could not be written" only in release mode and that too not on my machine. I thought of using MAPinfo to get the line number/function call where application is crashing. Unfortunetly address shown in error message doesnt come close to addresses mentioned in my MAP file. I am very very confused, not getting any way to find this crash. My memory address in MAP file starts from "0x00400000" to "0x004002xxxx". Error message shows " The instruction at "0x77fcaea0" referenced memory "some address", memory could not be written. Can somebody please help me in this? I am completely bugged with this error. I am not able to reproduce this error at my end. thanx in advacne, regards, Kavita
-
Hi There, I am getting error "Memory could not be written" only in release mode and that too not on my machine. I thought of using MAPinfo to get the line number/function call where application is crashing. Unfortunetly address shown in error message doesnt come close to addresses mentioned in my MAP file. I am very very confused, not getting any way to find this crash. My memory address in MAP file starts from "0x00400000" to "0x004002xxxx". Error message shows " The instruction at "0x77fcaea0" referenced memory "some address", memory could not be written. Can somebody please help me in this? I am completely bugged with this error. I am not able to reproduce this error at my end. thanx in advacne, regards, Kavita
I know it doesn't really help you, but the chances are you are giving a bad pointer to a function in a DLL. (Ie. every single Win32 API function). What you need is the stack of functions, so you can see the last function of yours to narrow things down. I'm sure there is an article or two here which may be able to help, but thats outside my realm! Iain.
-
Hi There, I am getting error "Memory could not be written" only in release mode and that too not on my machine. I thought of using MAPinfo to get the line number/function call where application is crashing. Unfortunetly address shown in error message doesnt come close to addresses mentioned in my MAP file. I am very very confused, not getting any way to find this crash. My memory address in MAP file starts from "0x00400000" to "0x004002xxxx". Error message shows " The instruction at "0x77fcaea0" referenced memory "some address", memory could not be written. Can somebody please help me in this? I am completely bugged with this error. I am not able to reproduce this error at my end. thanx in advacne, regards, Kavita
Hi, I guess you might be using the COM library. Because some time back i too had the same problem when i was using COM library. So what you need to do just go through the proper usage of the COM library and uninitialize it at some other place. Hopefully it should work Anil Anil Kumar
-
Hi There, I am getting error "Memory could not be written" only in release mode and that too not on my machine. I thought of using MAPinfo to get the line number/function call where application is crashing. Unfortunetly address shown in error message doesnt come close to addresses mentioned in my MAP file. I am very very confused, not getting any way to find this crash. My memory address in MAP file starts from "0x00400000" to "0x004002xxxx". Error message shows " The instruction at "0x77fcaea0" referenced memory "some address", memory could not be written. Can somebody please help me in this? I am completely bugged with this error. I am not able to reproduce this error at my end. thanx in advacne, regards, Kavita
It could also be that you are using a pointer to a heap object, 'delete' was called on the pointer, and then this pointer variable was used again a few lines later in the code. The compiler would not catch this I don't believe, but may have given a warning in the compilation if the warning level was set high enough. Another thing that could be the cause is uninitialized memory. Release mode does not initialize the variables I believe. So you may be using a pointer somewhere that refers to a bogus address. You may already know this, but one thing you could do is to build it in release mode and run it on your machine, trying exactly what the user did, and see if it breaks for you also. If it does, then you know approximately where in the code it crashed and can look into the code to fix it. You have to run it in release mode, for the reason in the previous paragraph. In fact, for this same reason, one should always test in release mode before shipping. David Spain, C++ Applications Programmer
-
Hi There, I am getting error "Memory could not be written" only in release mode and that too not on my machine. I thought of using MAPinfo to get the line number/function call where application is crashing. Unfortunetly address shown in error message doesnt come close to addresses mentioned in my MAP file. I am very very confused, not getting any way to find this crash. My memory address in MAP file starts from "0x00400000" to "0x004002xxxx". Error message shows " The instruction at "0x77fcaea0" referenced memory "some address", memory could not be written. Can somebody please help me in this? I am completely bugged with this error. I am not able to reproduce this error at my end. thanx in advacne, regards, Kavita
Also, about the addresses, they will most likely not be the same as what is on your machine, because it is the memory address used by that machine. These addresses could even differ between different 'runs' of the program. It would depend on where the user's operating system put the program in memory for that particular execution. So using the memory addresses to find the error will not work in this case. One more possibility, which you probably already know about, is that you could have written past the end of an allocated buffer. David Spain, C++ Applications Programmer