电脑环境: Windows 11, version 22H2
我希望设置一下程序开机自启, 动了下任务计划程序库(按照https://zhuanlan.zhihu.com/p/113767050的方法), 但是之后发现程序出现闪退的问题:
我运行程序之后, 右下角出现图标, 但是我无法点击这个图标出现客户端, 并且几秒后图标消失.
计算机管理-日志中有两个报错
报错1: 事件1026 .NET runtime
应用程序: AppTime.exe
Framework 版本: v4.0.30319
说明: 由于未经处理的异常,进程终止。
异常信息: System.Data.SQLite.SQLiteException
在 System.Data.SQLite.SQLite3.Prepare(System.Data.SQLite.SQLiteConnection, System.String, System.Data.SQLite.SQLiteStatement, UInt32, System.String ByRef)
在 System.Data.SQLite.SQLiteCommand.BuildNextCommand()
在 System.Data.SQLite.SQLiteDataReader.NextResult()
在 System.Data.SQLite.SQLiteDataReader..ctor(System.Data.SQLite.SQLiteCommand, System.Data.CommandBehavior)
在 System.Data.SQLite.SQLiteCommand.ExecuteReader(System.Data.CommandBehavior)
在 System.Data.Common.DbDataAdapter.FillInternal(System.Data.DataSet, System.Data.DataTable[], Int32, Int32, System.String, System.Data.IDbCommand, System.Data.CommandBehavior)
在 System.Data.Common.DbDataAdapter.Fill(System.Data.DataTable[], Int32, Int32, System.Data.IDbCommand, System.Data.CommandBehavior)
在 System.Data.Common.DbDataAdapter.Fill(System.Data.DataTable)
在 AppTime.DB.b__9_0(System.Data.Common.DbCommand)
在 AppTime.DB.execute[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Func`2<System.Data.Common.DbCommand,System.__Canon>, System.String, System.Object[])
在 AppTime.DB.ExecuteTable(System.String, System.Object[])
在 AppTime.DB.ExecuteDynamic(System.String, System.Object[])
在 AppTime.Recorder.GetApp(System.Diagnostics.Process)
在 AppTime.Recorder.GetWin(System.Diagnostics.Process, System.String)
在 AppTime.Recorder.RecorderThreadProc()
在 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
在 System.Threading.ThreadHelper.ThreadStart()
报错2: 事件1000 程序崩溃
错误应用程序名称: AppTime.exe,版本: 1.0.0.0,时间戳: 0x5f62d348
错误模块名称: KERNELBASE.dll,版本: 10.0.22621.2715,时间戳: 0x10f6a783
异常代码: 0xe0434352
错误偏移量: 0x000000000006565c
错误进程 ID: 0x0x1FFC
错误应用程序启动时间: 0x0x1DA1AFFBB514984
错误应用程序路径: xxxxxxxx\AppTime.exe (xxxxx为应用根目录位置)
错误模块路径: C:\WINDOWS\System32\KERNELBASE.dll
报告 ID: a84964df-ddcc-4a9f-9dbf-91e402e9a476
错误程序包全名:
错误程序包相对应用程序 ID: