Two UI exceptions about UI

Topics: Errors
Mar 11, 2016 at 8:13 AM
Edited Mar 11, 2016 at 8:24 AM
My demo code as follows:
using System;
using System.IO;
using Microsoft.Win32.TaskScheduler;

namespace WrapperDemo
{
    internal static class Program
    {
        [STAThread]
        public static void Main(string[] args)
        {
            var ts = new TaskService(null, null, null, null, false);
            var td = ts.NewTask();
            td.Actions.Add(new ExecAction("go"));
            var ted = new TaskEditDialog(ts, td, true, true);
            ted.TaskName = "test";

            try
            {
                ted.ShowDialog();
            }
            catch (Exception e)
            {
                File.WriteAllText(@"D:\tmp\log.txt", e.ToString());
            }
        }
    }
}
switch to "Triggers" tab, and click "new"
I chose the Trigger type to "On an event"
"log" chose to "DebugChannel"
"source" is default : "Microsoft-Office-Business Connectivity Services"
input the "eventID" 1234566

And then I click "OK", and get the exception:
System.Runtime.InteropServices.COMException (0x80070032): (10,257):Subscription:<QueryList><Query Id="0" Path="DebugChannel"><Select Path="DebugChannel">*[System[Provider[@Name='Microsoft-Office-Business Connectivity Services'] and EventID=123456]]</Select></Query></QueryList>
   at Microsoft.Win32.TaskScheduler.V2Interop.ITaskFolder.RegisterTaskDefinition(String Path, ITaskDefinition pDefinition, Int32 flags, Object UserId, Object password, TaskLogonType LogonType, Object sddl)
   at Microsoft.Win32.TaskScheduler.TaskFolder.RegisterTaskDefinition(String Path, TaskDefinition definition, TaskCreation createType, String UserId, String password, TaskLogonType LogonType, String sddl)
   at Microsoft.Win32.TaskScheduler.TaskEditDialog.okBtn_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.RunDialog(Form form)
   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   at System.Windows.Forms.Form.ShowDialog()
   at WrapperDemo.Program.Main(String[] args) in C:\Users\lhuang2\documents\visual studio 2015\Projects\WrapperDemo\WrapperDemo\Program.cs:line 20
======================another expection====================
the demo code is same.
and the trigger is event, too.
I click "Custom" radio botton, and click "Edit Event Filter".
for now, the "Event sources" DropDownList is disable.
but if I choose a or some in "Event logs" DropDownList , the "Event sources" DropDownList become enable.
And I try to choose some item in "Event sources" DropDownList, It crash.




I miss anything? Or there are some BUG?
Coordinator
Mar 12, 2016 at 10:46 PM
Bugs. I have them both fixed for the next release (2.5.16), due shortly. Thanks for helping identify them.