-
June 1st, 2007, 11:54 PM
#1
how to fix this problem "The instruction at "0x7c911e58"referenced memory at"0x000000
HI,
Plase tell me how to fix this problem "The instruction at "0x7c911e58"referenced memory at"0x00000000".The memory could not be "read". My Application is using Hp Printer to print. First time its printing fine. Second or third time i am getting this problem.
Thanks.
-
June 2nd, 2007, 12:05 AM
#2
Re: how to fix this problem "The instruction at "0x7c911e58"referenced memory at"0x000000
You are trying to reference a "null" object. Use the debugger to trap where this is occuring, and rectify the problem
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
June 2nd, 2007, 01:02 AM
#3
Re: how to fix this problem "The instruction at "0x7c911e58"referenced memory at"0x000000
Thanks
TheCPUWizard
HOW CAN i DEBUB THE PROBLEM IS OCCURING IN RELEASE MOD NOT IN DEBUG MODE.
-
June 2nd, 2007, 02:18 AM
#4
Re: how to fix this problem "The instruction at "0x7c911e58"referenced memory at"0x000000
just put MessageBox() in your code and run the Project . before that Suggest you run your Project and Check all the Condition for memory allocation and free them .
Thanx
-
June 2nd, 2007, 02:51 AM
#5
Re: how to fix this problem "The instruction at "0x7c911e58"referenced memory at"0x000000
Originally Posted by laserwave
Thanks
TheCPUWizard
HOW CAN i DEBUB THE PROBLEM IS OCCURING IN RELEASE MOD NOT IN DEBUG MODE.
It's possible to put debugging information into a Release build but it may or may not help you. Writing an error handling class that is enabled by default in Debug mode, disabled in Release mode - but which can be optionally re-enabled is by far the best way to debug Release build problems. Unfortunately, it's often dificult to add such a class to a program 'after the event'. It's much better if you write with the assumption that there'll be bugs and set traps to catch them.
Just to give you a bit more info - this kind of problem is almost always caused by not realising that a pointer needs something to point to. You can't use a pointer like this - although people often do....
Code:
MyObj* ptr;
ptr->PerformSomeAction();
In the above example, the pointer is unitialised (i.e. its value is meaningless). It could (by accident) be pointing to a valid object - or it could point to zero memory - or to some completely random memory. The results of using it are unpredictable but usually catastrophic. This kind of thing is even more dangerous:-
Code:
MyObj* ptr;
if (ptr)
ptr->PerformSomeAction();
In a Debug build, the compiler usually initialises the pointer to a known value. Fortunately, Visual C++ doesn't initialise to NULL - but some compilers do. Therefore that code might behave completely differently in a Release build from how it behaved in the Debug build.
"A problem well stated is a problem half solved.” - Charles F. Kettering
-
June 2nd, 2007, 04:51 AM
#6
Re: how to fix this problem "The instruction at "0x7c911e58"referenced memory at"0x000000
Originally Posted by laserwave
HOW CAN i DEBUB THE PROBLEM IS OCCURING IN RELEASE MOD NOT IN DEBUG MODE.
Take a look at this FAQ...
-
June 2nd, 2007, 08:46 AM
#7
Re: how to fix this problem "The instruction at "0x7c911e58"referenced memory at"0x000000
Originally Posted by laserwave
HOW CAN i DEBUB THE PROBLEM IS OCCURING IN RELEASE MOD NOT IN DEBUG MODE.
The above suggestions are all good ones, but what about the simplest (to implement) of all. Just use Windbg and degug the executable code itself. With a stack trace in place, it should be fairly simple to isolate the issue and put some of the previous suggestions to use, if the root cause of the problem does not immediately reveal itself....
[edit: Please note that deguging is quite similar to debubing ]
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
June 2nd, 2007, 09:13 AM
#8
Re: how to fix this problem "The instruction at "0x7c911e58"referenced memory at"0x00
Originally Posted by humptydumpty
just put MessageBox() in your code and run the Project . before that Suggest you run your Project and Check all the Condition for memory allocation and free them .
Thanx
huh???
As was suggested, add debug information to a release build and run that in the debugger.
-
June 2nd, 2007, 09:54 AM
#9
Re: how to fix this problem "The instruction at "0x7c911e58"referenced memory at"0x00
Address 0x7c911e58 is in ntdll!RtlpCoalesceFreeBlocks. This suggests your application is causing a heap corruption.
-
June 2nd, 2007, 11:12 AM
#10
Re: how to fix this problem "The instruction at "0x7c911e58"referenced memory at"0x00
Originally Posted by googler
Address 0x7c911e58 is in ntdll!RtlpCoalesceFreeBlocks.
Huh? How can you assert something like this? That address might correspond to "ntdll!RtlpCoalesceFreeBlocks" on your machine, and in your specific instance executing one specific executable - but is most likely to be totally different on different machines, with a different memory configuration at that moment.
-
June 2nd, 2007, 03:12 PM
#11
Re: how to fix this problem "The instruction at "0x7c911e58"referenced memory at"0x00
Originally Posted by gstercken
Huh? How can you assert something like this?
It was an educated guess. 32-bit ntdll.dll hasn't changed since August 4th, 2004, and these address ranges are reserved for Microsoft's system dlls.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|