开发者社区> 问答> 正文

c# 线程 运行一段时间会报错?报错

用c# 做的一个winform 程序,里面开启了两个线程,程序运行一段时间就会出错,这个是根据系统日志获取到的信息,请高手帮忙看下是什么问题

Application: MYSQL数据库还原.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.Configuration.ConfigurationErrorsException Stack: at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean) at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(System.Configuration.ConfigurationSchemaErrors) at System.Configuration.Configuration..ctor(System.String, System.Type, System.Object[]) at System.Configuration.ClientConfigurationHost.OpenExeConfiguration(System.Configuration.ConfigurationFileMap, Boolean, System.Configuration.ConfigurationUserLevel, System.String) at NetUtilityLib.ConfigHelper.GetAppConfig(System.String) at MYSQL数据库还原.Form1.DownloadBinlog(Int32, Int32) at MYSQL数据库还原.Form1+<>c__DisplayClass1.<thread>b__0() at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Threading.ThreadHelper.ThreadStart()

展开
收起
爱吃鱼的程序员 2020-06-10 09:59:48 400 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    断点加单步调试F10、F11、F5,看死在哪里。代码多用trycatch。

    2020-06-10 10:00:06
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
多IO线程优化版 立即下载
小程序 大世界 立即下载
《15分钟打造你自己的小程序》 立即下载