microsoft / vscode-powerquery-sdk

Power Query Connector Development SDK for VS Code
MIT License
71 stars 11 forks source link

The process was terminated due to an unhandled exception. #291

Closed 0xNinshu closed 7 months ago

0xNinshu commented 12 months ago

Preflight Checklist

Power Query SDK

0.2.3

Regression From

No response

Platform

Windows

Architecture

x64

OS Version

Windows 11 Pro - Version: 22H2, Build: 22621.2506

VSCode version

1.84.1

PQSdkTool Path

c:\Users\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.2.3-win32-x64.nuget\Microsoft.PowerQuery.SdkTools.2.114.4\tools

Bug Description

I noticed that this issue was in my event log. I was not using the vscode extension, and for some reason the PQServiceHost.exe is running in the background and failing. This event appears multiple times within a day.

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
  <Provider Name=".NET Runtime" /> 
  <EventID Qualifiers="0">1026</EventID> 
  <Version>0</Version> 
  <Level>2</Level> 
  <Task>0</Task> 
  <Opcode>0</Opcode> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2023-11-05T18:26:48.9112643Z" /> 
  <EventRecordID>95982</EventRecordID> 
  <Correlation /> 
  <Execution ProcessID="30460" ThreadID="0" /> 
  <Channel>Application</Channel> 
  <Computer>ASUS-DESKTOP</Computer> 
  <Security /> 
  </System>
<EventData>
  <Data>Application: PQServiceHost.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.ComponentModel.Win32Exception at System.Diagnostics.ProcessManager.OpenProcess(Int32, Int32, Boolean) at System.Diagnostics.Process.GetProcessHandle(Int32, Boolean) at System.Diagnostics.Process.get_HasExited() at PQServiceHost.Program.RunningInstance() at PQServiceHost.Program.Main(System.String[])</Data> 
  </EventData>
  </Event>

Steps to Reproduce

I am unsure of how to repro the issue, since I was not using the power query sdk / vscode extension when it happened.

Actual Experience

I am unsure of how to repro the issue, since I was not using the power query sdk / vscode extension when it happened.

Expected Experience

No response

Additional Context

No response

mattmasson commented 11 months ago

Thank you for the report - I believe I've found the problem.

In the meantime, you can turn off the use of the PQTest service host in the configuration options:

configuration option id: powerquery.sdk.features.useServiceHost

image

mattmasson commented 7 months ago

This should be resolved in the 0.3.1 release (sdktools 2.127.2).