Bug Check 0x18: REFERENCE_BY_POINTER
The REFERENCE_BY_POINTER bug check has a value of 0x00000018. This indicates that the reference count of an object is illegal for the current state of the object.
Important Info If You Have Received a STOP Code
If you received a blue screen error, or stop code, the computer has shut down abruptly to protect itself from data loss. A hardware device, its driver, or related software might have caused this error. If your copy of Windows came with your computer, call the manufacturer of your computer. If you purchased Windows separately from your computer, Microsoft provides support. To find contact info for Microsoft or your computer manufacturer, Contact Support.
If you have experience with computers and want to try to recover from this error, follow the steps provided in the Microsoft article Resolving STOP (Blue Screen) Errors in Windows.
These actions might prevent an error like this from happening again:
- Download and install updates and device drivers for your computer from Windows Update.
- Scan your computer for computer viruses.
- Check your hard disk for errors.
REFERENCE_BY_POINTER Parameters
The following parameters are displayed on the blue screen.
| Parameter | Description |
|---|---|
|
1 |
Object type of the object whose reference count is being lowered. |
|
2 |
Object whose reference count is being lowered. |
|
3 |
Reserved |
|
4 |
Reserved |
Cause
The reference count of an object is illegal for the current state of the object. Each time a driver uses a pointer to an object, the driver calls a kernel routine to increase the reference count of the object by one. When the driver is done with the pointer, the driver calls another kernel routine to decrease the reference count by one.
Drivers must match calls to the routines that increase (reference) and decrease (dereference) the reference count. This bug check is caused by an inconsistency in the object's reference count. Typically, the inconsistency is caused by a driver that decreases the reference count of an object too many times, making extra calls that dereference the object. This bug check can occur because an object's reference count goes to zero while there are still open handles to the object. It might also occur when the object's reference count drops below zero, whether or not there are open handles to the object.
Resolution
Make sure that the driver matches calls to the routines that increase and decrease the reference count of the object. Make sure that your driver does not make extra calls to routines that dereference the object (see Parameter 2).
You can use a debugger to help analyze this problem. To find the handle and pointer count on the object, use the !object debugger command.
kd> !object address
Where address is the address of the object given in Parameter 2.
Send comments about this topic to Microsoft
Build date: 4/9/2013
