应用程序exe在启动时崩溃.出现故障的模块路径c:windowssyswow64kernalbase.dll



每当我试图在非我的机器上启动我的应用程序时,它在启动时就会崩溃。我不知所措,做了大量的搜索,但没有下定决心。没有真正的错误,我只是得到标准窗口7没有响应。所有机器都是带有.net4的win7Pro 64。我看到下面的事件查看器日志。

事件id 1000:

Faulting application name: MarketingRequests.exe, version: 1.0.0.0, time stamp: 0x5033e787
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4a5bdbdf
Exception code: 0xe0434352
Fault offset: 0x0000b9bc
Faulting process id: 0x1ecc
Faulting application start time: 0x01cd7fe56831cfd9
Faulting application path: CIntranetMarketingRequests.exe
Faulting module path: C:Windowssyswow64KERNELBASE.dll
Report Id: a78399b1-ebd8-11e1-9474-f04da20e6eaf

我还看到事件ID 1026,.net运行时:

Log Name:      Application
Source:        .NET Runtime
Date:          8/21/2012 9:08:53 PM
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      CORRIE-Z.msing.local
Description:
Application: ExpenseReport.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
Stack:

位于System.Data.Linq.SqlClient.SqlProvider.Execute(System.Linq.Expression,QueryInfo,System.Data.Lin.SqlClient.IObjectReaderFactory,System.Object[],System.Object[],System.Data.Linq.SqlClient.ICompiledSubQuery[],System.Object)位于System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(System.Linq.Expressions.Expression,QueryInfo[],System.Data.Lin.SqlClient.IObjectReaderFactory,System.Object[],System.Data_Linq.SqlClient.ICompiledSubQuery[])位于System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(System.Linq.Expressions.Expression)在System.Data.Linq.DataQuery 1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].System.Linq.IQueryProvider.Execute[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Linq.Expressions.Expression) at System.Linq.Queryable.First[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Linq.IQueryable 1)位于ExpenseReport.frmMain.refreshEmpInfo()位于ExpenseReport.frmMain.ctor()在ExpenseReport.Program.Main()

事件Xml:10262.00x8000000000000026474应用CORRIE-Z.msing.local应用程序:ExpenseReport.exe框架版本:v4.0.30319描述:由于出现未处理的异常,进程已终止。异常信息:System.InvalidOperationException堆栈:位于System.Data.Linq.SqlClient.SqlProvider.Execute(System.Linq.Expression,QueryInfo,System.Data.Lin.SqlClient.IObjectReaderFactory,System.Object[],System.Object[],System.Data.Linq.SqlClient.ICompiledSubQuery[],System.Object)位于System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(System.Linq.Expressions.Expression,QueryInfo[],System.Data.Lin.SqlClient.IObjectReaderFactory,System.Object[],System.Data_Linq.SqlClient.ICompiledSubQuery[])位于System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(System.Linq.Expressions.Expression)在System.Data.Linq.DataQuery 1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].System.Linq.IQueryProvider.Execute[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Linq.Expressions.Expression) at System.Linq.Queryable.First[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Linq.IQueryable 1<系统__佳能>)位于ExpenseReport.frmMain.refreshEmpInfo()位于ExpenseReport.frmMain.ctor()位于ExpenseReport.Program.Main()

看起来frmMain.refreshEmpInfo包含一个从数据库中检索记录的LINQ查询,并且LINQ查询调用First()来获取第一条记录。是否可能没有返回任何记录,从而导致First()抛出InvalidOperationException

(如果您在frmMain.refreshEmpInfo中发布代码,可能会有所帮助。您可能还想将该代码包装在try...catch块中,并在消息框中显示异常详细信息。)

最新更新