none
error MSB3073: The command “staticdv.exe /devenv /check” exited with code -1 RRS feed

  • Question

  • I have a NDIS 6 filter driver. It is a packet capture driver based on the official ndislwf example. The whole project is open sourced on this GitHub repo. npf.sln can be opened via VS2015.

    My problem is the Static Driver Verifier (SDV) doesn't work on my project. When I clicked Driver -> Launch Static Driver Verifier... on VS2015, it popped up the SDV GUI, then I clicked Clean and Start. After a while (3-5 minutes), a window popped up saying SDV encountered an error of unknown origin.. And the Alerts tab of the SDV UI said:

    J:\npcap\packetWin7\npf\npf>cd /d "J:\npcap\packetWin7\npf\npf"   && msbuild "npf.vcxproj" /t:sdv /p:inputs="/devenv /check" /p:configuration="Win7 Release SDV" /p:platform="x64"  
    Microsoft (R) Build Engine version 14.0.25420.1
    Copyright (C) Microsoft Corporation. All rights reserved.
    Build started 7/25/2016 12:42:39 PM.
    Project "J:\npcap\packetWin7\npf\npf\npf.vcxproj" on node 1 (sdv target(s)).
    sdv:
      staticdv.exe /devenv /check
      ---------------------------------------------------------------------
      Microsoft (R) Windows (R) Static Driver Verifier Version 4.0.505.8
      Copyright (C) Microsoft Corporation.  All rights reserved.
      ---------------------------------------------------------------------
      SDV is building for <Win7 Release SDV|x64>
      Build     'npf' ... Done
      Scan      'npf' ... Done
      No reuse data to copy from previous SDV run.
      The finalization step failed for   'npf' .
    C:\Program Files (x86)\Windows Kits\10\build\windowsdriver.Sdv.targets(65,9): error MSB3073: The command "staticdv.exe /devenv /check" exited with code -1. [J:\npcap\packetWin7\npf\npf\npf.vcxproj]
    Done Building Project "J:\npcap\packetWin7\npf\npf\npf.vcxproj" (sdv target(s)) -- FAILED.
    Build FAILED.
    "J:\npcap\packetWin7\npf\npf\npf.vcxproj" (sdv target) (1) ->
    (sdv target) -> 
      C:\Program Files (x86)\Windows Kits\10\build\windowsdriver.Sdv.targets(65,9): error MSB3073: The command "staticdv.exe /devenv /check" exited with code -1. [J:\npcap\packetWin7\npf\npf\npf.vcxproj]
        0 Warning(s)
        1 Error(s)
    Time Elapsed 00:01:30.61

    Then I looked at the StaticDVTrace.log log. It said as below:

    Information:Calling DriverCleanup.
    Information:Creating a new SDV object.
    Information:Loading cache data.
    Information:Calling cleanup routine.
    Information:Creating a new SDV object.
    Information:SetBase this.DdkPath=C:\Program Files (x86)\Windows Kits\10\
    Information:SetBase this.Path=J:\npcap\packetWin7\npf\npf
    Information:SetBase creating the DriverCollection via constructor.
    Information:Driver Constructor:Calling RuleCollection constructor with rule list and rule path
    Information:SetBase this.Environment=WDK
    Information:SetBase Calling InitBaseEnvironment.
    Information:Check that we have driver folder.
    Information:Calling build to get cl and link flags.
    Information:GenerateBuildLogNewCall build.exe.
    Information:GenerateBuildLogNewCall to build.exe worked.
    Information:Build     'npf' ... Done
    Information:Found Sdv links file and attempting to serialize the data into our object model.
    Information:Found Sdv source file and attempting to serialize the data into our object model.
    Information:Found cflags in Sdv source file.
    Information:Slam model equals 
    Information:Slam rules equals 
    Information:Slam Data equals 
    Information:Calling OpenNewConfiguration
    Information:SetBase this.DdkPath=C:\Program Files (x86)\Windows Kits\10\
    Information:SetBase this.Path=J:\npcap\packetWin7\npf\npf
    Information:SetBase  Opening All.sdv to load active rule list.
    Information:OpenMsft Opening All.sdv from:C:\Program Files (x86)\Windows Kits\10\TOOLS\SDV\data\ndis\All.sdv
    Information:OpenMsft Reading :C:\Program Files (x86)\Windows Kits\10\TOOLS\SDV\data\ndis\All.sdv
    Information:OpenMsft Adding :DDIUSAGE.SDV.fsm to the list of rules.
    Information:OpenMsft Adding :IRQL.SDV.fsm to the list of rules.
    Information:OpenMsft Adding :IRQL_SHARED.SDV.fsm to the list of rules.
    Information:OpenMsft Adding :LOCKING.SDV.fsm to the list of rules.
    Information:OpenMsft Adding :MEMORYUSAGE.SDV.fsm to the list of rules.
    Information:OpenMsft Adding :MISCELLANEOUS.SDV.fsm to the list of rules.
    Information:OpenMsft Adding :OIDPROCESSING.SDV.fsm to the list of rules.
    Information:OpenMsft Adding :WARNING.SDV.fsm to the list of rules.
    Information:OpenMsft Adding :.fsm to the list of rules.
    Information:SetBase Calling driver constructor.
    Information:RuleCollection Constructor:Calling Rule Constructor.
    Information:RuleCollection Constructor:add rule object to collection.
    ...
    Information:RuleCollection Constructor:Calling Rule Constructor.
    Information:RuleCollection Constructor:add rule object to collection.
    Information:SetBase this.Environment=WDK
    Information:SetBase Calling InitBaseEnvironment.
    Information:this.NumberOfChecks=0100
    Information:this.NumberOfNotStarted=100
    Information:Opening sdv-default.xml from:C:\Program Files (x86)\Windows Kits\10\TOOLS\SDV\data\ndis
    Information:SdvScan:Local sdv-default.xml found.
    Information:Calling build to get cl and link flags.
    Information:Loading library data from cache at:C:\Program Files (x86)\Windows Kits\10\
    Information:Loading build data.
    Information:Counting the LOC in the driver.
    Information:Loading WDM entry points from :C:\Program Files (x86)\Windows Kits\10\TOOLS\SDV\data\ndis\DdkEntryPoints.xml
    Information:Calling CheckScan to validate we have a valid SDV-map.h file.
    Information:CheckScan:Generating SDV-map.h file via call to SdvMap.
    Information:SdvMap:Iterate over each driver in the collection.
    Information:BuildLib:Create sdv folder.
    Information:BuildLib:Create sdv\scan folder.
    7/25/2016 11:00:08 PM:The SDV-map.h file at: J:\npcap\packetWin7\npf\npf.
    Information:The SDV-map.h file at:J:\npcap\packetWin7\npf\npf does not have the "Approved" flag set to "true."
    Information:Scan      'npf' ... Done
    Information:CheckScan:Calling LoadSdvMap.
    Information:Check if debug flags are set.
    Information:Start sdv scan step via call to SdvScan.
    Information:SdvScan:Calling SetupSdvScanFolders
    Information:SdvScan:Checking if we have a local version of sdv-default.xml
    Information:BuildLib:Create sdv folder.
    Information:BuildLib:Create sdv\scan folder.
    Information:Copying old reuse data for this run...J:\npcap\packetWin7\npf\npf
    Information:No reuse data to copy from previous SDV run.
    Information:Calling the SdvCheck stage.
    Information:SdvCheck:Calling CleanupCflags.
    Information:SdvCheck:Calling SetupSdvCheckFolders.
    Information:SdvCheck:Calling RuleSpec.
    Information:RuleSpec:.
    Information:RuleSpec:Calling CompileStage for 
    Information:RuleSpec:Calling CompileStage for pre_isminiport.fsm
    7/25/2016 11:00:16 PM:The SDV compile step failed.

    I can't tell anything from the error message. Can anybody help me? Thanks!




    • Edited by Yang Luo Tuesday, July 26, 2016 1:14 AM
    Tuesday, July 26, 2016 1:12 AM