Re: Child display driver ... adding PnP crashes!



you need to fix your symbols by executing

..symfix
..reload /f

the issue is probably nowhere near IoAttachDeviceToDeviceStack but you are
getting a false positive b/c the symbols are wrong. i assume KernelWDC_I2C
is your driver, you should fix the symbols for that as well.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


<abhishekbhattacharya@xxxxxxxxxxxxxx> wrote in message
news:1147322936.406009.192090@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello Doron

First of all let me thank you for replying to my posting. I did try to
analyze the crash dump, but couldnot conclusively decide the reason of
the crash, as I am fairly new to windows environment.
To further our discussion I am pasting a copy of the !analyze -v
command results. Please take a look
----------------------------------------------------------------------------------------------------------------------------------------

*******************************************************************************
*
*
* Bugcheck Analysis
*
*
*
*******************************************************************************

SYSTEM_THREAD_EXCEPTION_NOT_HANDLED (7e)
This is a very common bugcheck. Usually the exception address
pinpoints
the driver/function that caused the problem. Always note this address
as well as the link date of the driver/image that contains this
address.
Arguments:
Arg1: c0000005, The exception code that was not handled
Arg2: f789b34a, The address that the exception occurred at
Arg3: f78ea8d0, Exception Record Address
Arg4: f78ea5cc, Context Record Address

Debugging Details:
------------------

***** Kernel symbols are WRONG. Please fix symbols to do analysis.


EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at "0x%08lx"
referenced memory at "0x%08lx". The memory could not be "%s".

FAULTING_IP:
KernelWDC_I2C+434a
f789b34a 83781000 cmp dword ptr [eax+0x10],0x0

EXCEPTION_PARAMETER1: f78ea8d0

CONTEXT: f78ea5cc -- (.cxr fffffffff78ea5cc)
eax=00000000 ebx=00000000 ecx=00000000 edx=00000000 esi=8498a830
edi=84228290
eip=f789b34a esp=f78ea998 ebp=f78ea9c0 iopl=0 nv up ei ng nz ac
pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000
efl=00010292
KernelWDC_I2C+0x434a:
f789b34a 83781000 cmp dword ptr [eax+0x10],0x0
ds:0023:00000010=????????
Resetting default scope

DEFAULT_BUCKET_ID: DRIVER_FAULT

BUGCHECK_STR: 0x7E

LAST_CONTROL_TRANSFER: from f789b0e0 to f789b34a

STACK_TEXT:
WARNING: Stack unwind information not available. Following frames may
be wrong.
f78ea9c0 f789b0e0 00000000 84228290 00000001 KernelWDC_I2C+0x434a
f78ea9e8 8050d085 8498a830 84228290 e195a090 KernelWDC_I2C+0x40e0
f78eaa00 805a4f21 f789b020 00000004 00000001
nt!IoAttachDeviceToDeviceStack+0x137
f78eaac8 805a0c7b 00000000 02000001 00000000 nt!RtlUpperChar+0x2460
f78ead24 80624989 83e28008 00000001 00000000 nt!IoCreateDevice+0x889
f78ead54 8050c438 00000003 805605c0 805694fc
nt!IoReportTargetDeviceChange+0xe68
f78ead7c 804e23b5 00000000 00000000 863c23c8
nt!IoInvalidateDeviceRelations+0x303
f78eadac 80574128 00000000 00000000 00000000 nt!KeRemoveQueue+0x221
f78eaddc 804efc81 804e22f1 00000001 00000000
nt!PsCreateSystemThread+0x70
00000000 00000000 00000000 00000000 00000000
nt!KeInitializeTimerEx+0x1e6


FOLLOWUP_IP:
KernelWDC_I2C+434a
f789b34a 83781000 cmp dword ptr [eax+0x10],0x0

FOLLOWUP_NAME: MachineOwner

SYMBOL_NAME: KernelWDC_I2C+434a

MODULE_NAME: KernelWDC_I2C

IMAGE_NAME: KernelWDC_I2C.sys

DEBUG_FLR_IMAGE_TIMESTAMP: 44450179

STACK_COMMAND: .cxr fffffffff78ea5cc ; kb

BUCKET_ID: WRONG_SYMBOLS

Followup: MachineOwner
---------

-----------------------------------------------------------------------------------------------------------------------------------
Is the problem with IoAttachDeviceToDeviceStack() ? If so, why does the
system not crash when I comment of the PnP routine?
Looking forward for some tips

Abhishek




Doron Holan [MS] wrote:
where in the routine does the crash occur? what is the bugcheck code and
callstack ? the output of !analyze -v?

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no
rights.


<abhishekbhattacharya@xxxxxxxxxxxxxx> wrote in message
news:1147255691.209968.103360@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello
I want to implement a WDM Child Display Driver and request I2C
interface
from display driver which I am going to use to send the DDC/CI data to
Monitor.
Intially, just to test the I2C interface, I added the I2C routines in
the AddDevice() function and was able to get a pointer for the
I2CInterface. But there might be a problem with this, since I was never
able to call i2copen() function after this.( The system crashes ).

Later I tried to modify the driver, and add the required dispatch
routines. But as soon as i add the PnP dispatch routine the system
crashes!!

My DriverEntry() looks like this
---------------------------------------------------------------------------------------------------------------------------------
DriverObject->MajorFunction[IRP_MJ_CREATE] =
I2C_WDMDispatch;
DriverObject->MajorFunction[IRP_MJ_CLOSE] =
I2C_WDMDispatch;
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] =
I2C_WDMDispatch;
DriverObject->DriverUnload = I2C_WDMDriverUnload;
DriverObject->MajorFunction[IRP_MJ_PNP] = I2C_WDMDispatchPnp;
//PnP routine
DriverObject->MajorFunction[IRP_MJ_POWER] =
I2C_WDMDispatchPower; //Power Mangement
DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] =
I2C_WDMDispatchSystemControl;
DriverObject->DriverExtension->AddDevice = I2C_WDMAddDevice; //
AddDevice
------------------------------------------------------------------------------------------------------------------------------


and the IoCreateDevice function has been called with the following
parameters
--------------------------------------------------------------------------------------------------------------------------
IoCreateDevice ( DriverObject,
// our driver object
sizeof (FDO_DATA), // device object extension
size
NULL, // FDOs do not have
names
FILE_DEVICE_VIDEO, // Video device
FILE_DEVICE_SECURE_OPEN, //
FALSE,
&deviceObject); // The device object
created
----------------------------------------------------------------------------------------------------------------------------

Can anyone give me some tips as to why adding the PnP routine forces
the system to crash
Please let me know if you want some further information
Thanks and regards
Abhishek




.



Relevant Pages

  • Re: x64 XP BSOD on USB device reset or D3 entry
    ... Have you tried running the test with driver verifier with special pool ... I did not assign any cleanup routine to any KMDF object. ... The completion routine only deletes objects that were allocated to ... The exception code that was not handled ...
    (microsoft.public.development.device.drivers)
  • Re: Standby-Sleep Problem
    ... If your driver does not explicitly show up in the crash dump, then it does not mean that the crash is not your driver's fault. ... If you cannot attach a debugger, then you will not be successful in developing your driver. ... Break instruction exception - code 80000003 ...
    (microsoft.public.development.device.drivers)
  • Re: Child display driver ... adding PnP crashes!
    ... the crash, as I am fairly new to windows environment. ... To further our discussion I am pasting a copy of the!analyze -v ... I want to implement a WDM Child Display Driver and request I2C ... But as soon as i add the PnP dispatch routine the system ...
    (microsoft.public.development.device.drivers)
  • Re: x64 XP BSOD on USB device reset or D3 entry
    ... Turning on the WDF verifier stopped the BSODs due to this problem. ... I did not assign any cleanup routine to any KMDF object. ... I'm porting an i386 XP KMDF USB device driver to x64 XP SP2. ... The exception code that was not handled ...
    (microsoft.public.development.device.drivers)
  • Re: x64 XP BSOD on USB device reset or D3 entry
    ... Could you try running your test again with WDF Verifier enabled on your driver? ... I did not assign any cleanup routine to any KMDF object. ... Usually the exception address> pinpoints ...
    (microsoft.public.development.device.drivers)