Programming
--
Questions
--
Followers
Top Experts
But on 2 of our customers out of 40000 customers we have this problem. occassionally sometimes every 2 days sometimes every 10 days it varies our service crashes with this in the eventlog
which is from the system
where xxx is the service name.
"Â Application popup: xxx.exe - Application Error : The instruction at "0x77fc95a3" referenced memory at "0x0000302b". The memory could not be "read".
Click on OK to terminate the program
"
Any ideas what can cause this or how may be i can capture this . Ive try catch combinations in all the threads everywhere !!
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
-- Dan
i did a version check things look normal. They have recreated the machine several times...
There seems to be something else going on...
Anyway, the code you send does not need to be a full debug version!. Â Do a release build that contains debug info. Â Then when it crashes, it will show a source code filenames, and line numbers, and a readable Call stack... rather than random numbers.
-- Dan






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
We'd be lost without the local contacts we keep stroked and fed with the latest goodies.
I know what you are saying. I have been their before in different companies !! But this is kind of an unusual customer. When i said Debug version i meant a Release version with pdb stuff. One thing I have a version with the SetUnhandledexception hook and i was talking to these guys to put it on there for 3 weeks. They just did not agree till today morn'. They are huge bank and you know how banks security is... and they use this on 5 production servers. just 1 crashes and it is production. so they were very hesitant to put anything other than the release.
And you know what today they put it on and when it crashes it goes and creates a dmp file but beleive it or not it is a 0 byte file !!
im totally shocked. i have never seen this happen before. So.. Now i have asked them to see if they can install Dr Watson there. May be Dr Watson's hook can do something ??!!
Any other ideas will be helpful

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Do  you use any non-Window's DLLs?
Do you do GetProcAddress()s?
as you see below the read error is always repeated. there is a write error which changes.
Application popup: xxx.exe - Application Error : The instruction at "0x77fc95a3" referenced memory at "0x0000302b". The memory could not be "read".
Application popup: xxx.exe - Application Error : The instruction at "0x77fc8fe3" referenced memory at "0x00003037". The memory could not be "written".
Application popup: xxx.exe - Application Error : The instruction at "0x77fcb5bf" referenced memory at "0x34393234". The memory could not be "written".
A pointer somehow has gotten set to these values:
0x0000302b   "0#"  or maybe "#0"
0x00003037   "07"  or maybe  "70"
0x34393234   "4924" or      "4294"
Since they are all human-readable ASCII character values, there is some likelihood that the root problem is a buffer overflow. Â
Buffer overlow happens when you do (for instance) a strcpy() of, say a 50-byte string into a buffer that this say, 40 bytes long. Â The result is that the end of the string overwrites the next variable in memory. Â If that variable happens to be a pointer, then the next use of that pointer will access an invalid memory location.
It may be possible to isolate the specific error locus. Â
1) Generate a release version identical to that of the customer's, but build it with debugging symbols.
2) Manually place breakpoints at all three of those locations:
   0x77fc95a3
   0x77fc8fe3
   0x77fcb5bf
Run the program, and if (and when) it stops, you can see the code or the call stack to gain the next clue. Â Odds are, it is in a low-level runtime library call, but the call stack will provide a locust in your own code.
-- Dan






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
tried that before. the damn thing never comes to that instruction on my machine. having tried all the various things... the surprising thing is the dump file not getting created on the customer's machine.
ive convinced the customer to rebuild his machine. hopefully the problem will go away after he does that. hoping it goes away. but i still have my doubts. im really suspicious of the code that ive written and have gone thru' i dont know how many lines for the past 20 days.
one thing do you think the access violation will not be caught by the exception handler ?
Thanks
Sometimes you can get a clue by learning, in general what was happening at the time of the error. Â Did I forget to mention that? Â That is in fact, the PRIME way to to start to fix these problems.
Starting with *no* location clue, the way you track these down is to examine all places where you process outside data that has entered into your program... user input, data from files that you generate or others generate, data obtained from the Internet, etc.
But there are many many variables that you cannot control. Â The code could be part of an ActiveX or the customer might have API interception happening, or, well anything.
-- Dan
ntdll.dll is loaded in that address space. so it is failing on an ntdll.dll instruction. this is a huge server environment with 1000s of clients. so itl be tought to know what someone was doing but our logs dont indicate anything unusual. anyways ive asked them to install dr watson on there. let me hope if that can give me any information because the setunhandledexception filter does not seem to be doing anything...
the other thing im suspecting is something to do with our use of DAO 3.6. but i dont know if mdac 2.6 has any bug like this which can crash the system...

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
In our specific case, it turned out that we had a database field that was bigger than the buffer allocated to hold it. Â I believe that the ancient DAO technolgy allocates and binds fixed-length string buffers just as MFC's CRecordset does. Â It shows up as an intermittent error becasue this particular client has entered a string that is longer than normal (in our case, they had a person who lived in a city with a name like
   East Saint Patricks Snake River, IL Â
which was 31 characters long where we had provided a generous 30 character buffer. :)
-- Dan
Here are a few ideas. Â You said somewhere above that they have 5 systems and it is failing on 1. Â You've checked your app's DLL's and MDAC across the boxes, but there might be some more to check to0. Â Check ntdll.dll and check the drivers for the particular type of database your are writing too (i.e. Sybase) for consistency across all 5. Â Are you using a DSN for your database call? Â If so, make sure they are identical across all 5. Â Where you ever able to get a Dr. Watson log?
Tim






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Tim
Application exception occurred:
    App:  (pid=956)
    When: 4/10/2003 @ 08:12:21.210
    Exception number: c0000005 (access violation)
 956 xxx.exe
  0 _Total.exe
{{ 1.8 MB comment text deleted -- Dan Rollins / EE Page Editor }}

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
I don't know if this will help, but I'm going to put it out there for you. Â
I was having exact same crash in a program that was calling a DLL that I had written. Â It appears that the problem is fixed now so let me tell you what I did to fix it. Â The functions in my DLL were being called by a multithreaded program. Â I had compiled my DLL with the multithreaded option, but at some point along the way, I had set it to use the runtime "Debug Multithreaded". Â I changed this to "Debug Multithreaded DLL." and the program has been running for 6 hours without a crash (it was crashing as often as every two or three minutes). Â I also had to copy msvcrtd.dll to my test server as it wasn't installed on it by anything else.
Here are some of the crashes this issue was causing:
Application Error : The instruction at "0x77fc911e" referenced memory at "0x0b578795". The memory could not be "read".
Application Error : The instruction at "0x77fc8eff" referenced memory at "0x00000000". The memory could not be "read".
Application Error : The instruction at "0x77fc9234" referenced memory at "0x00000000". The memory could not be "written".
Application Error : The instruction at "0x77fcb5bf" referenced memory at "0x00000000". The memory could not be "written".
Application Error : The instruction at "0x77fc8dbd" referenced memory at "0x00000000". The memory could not be "written".
Application Error : The instruction at "0x77fc8da5" referenced memory at "0x0053002a". The memory could not be "read".
These settings are in the Project Settings Dialog on the C/C++ tab in the Category "Code Generation".
Note also that it's not enough for your code to use the proper Multithreaded libraries--all of the code, including DLLs, in your program need to use the proper libraries. Â So it might not be your code but a third party DLL you are using.
Hope this helps, or at least kickstarts your debugging grey matter.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
I also hate it when my support staff does this to me. But correct me if im wrong there is no way to attach a file to the comment . right ?
Again, sorry for the entire contents pasted...
Tim

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
SP3
Exchange2000-KB870540-v2-x
Exchange2000-KB894549-x86-
The last of the three patches requires the previous two and it fixes some denial of service buffer overruns (aka junior programmer coding errors) in exchange/smtp associated with DNS name resolution calls.
Cheers,
Sam






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Programming
--
Questions
--
Followers
Top Experts
Programming includes both the specifics of the language you’re using, like Visual Basic, .NET, Java and others, but also the best practices in user experience and interfaces and the management of projects, version control and development. Other programming topics are related to web and cloud development and system and hardware programming.