none
How to fix this BSOD ? RRS feed

  • Question

  • I have writtern a driver about PCI device. When I Installed my driver,The BSOD occured. This is the first time I met meet this trouble and I don't know how to find the wrong code. The last line of the BSOD give me the address but I don't know where is this address. Does anyone can help me to fix the BSOD? I will be very grateful for that.

    This is the BSOD which is caused by my PCIDriver(PCIDriver.sys):


    Tuesday, September 6, 2016 2:45 AM

Answers

  • attach a live kernel debugger to the system and debug. if you can't do that, configure the machine to create full KM memory dumps and then run the debugger on the dump file (windbg -z memory.dmp). make sure symbols are correct, then run !analyze -v


    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, September 6, 2016 3:59 AM

All replies

  • attach a live kernel debugger to the system and debug. if you can't do that, configure the machine to create full KM memory dumps and then run the debugger on the dump file (windbg -z memory.dmp). make sure symbols are correct, then run !analyze -v


    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, September 6, 2016 3:59 AM
  •  Thanks for your suggestion . I have use Windbg to find the wrong code. And I find out what is wrong in my code.When I was debugging , I found the code:

    PCM_PARTIAL_RESOURCE_LIST translated; if (stack->Parameters.StartDevice.AllocatedResourcesTranslated) translated = &stack->Parameters.StartDevice.AllocatedResourcesTranslated->List [0].PartialResourceList; else translated = NULL;//程序走到这里设置translated为空 1(my programm run to here)

        KdPrint(("Init the PCI card!\n"));
        status = InitMyPCI(pdx, translated);

    my system chosed "else" and executed the code "translated = NULL;"  And then it came in the function "status = InitMyPCI(pdx, translated)" with the NULL variable "translated". In the function "InitMyPCI", I found  this:
    	BOOLEAN gotinterrupt = FALSE;
    
    	PHYSICAL_ADDRESS  portbase;
    	BOOLEAN gotport = FALSE;
    
    	PCM_PARTIAL_RESOURCE_DESCRIPTOR resourse = &list->PartialDescriptors[0];//在1 中由于这个为空,在把地址赋值resourse的时候出错,程序崩溃(this code give the variable "resourse" a NULL address,which cause BSOD)

    I don't know why the result of code"stack->Parameters.StartDevice.AllocatedResourcesTranslated" is 0 ? Can you explain this? I will be very grateful.

    Wednesday, September 7, 2016 9:34 AM