Reputation: 5566
Whenever I try to launch my app on a machine that isnt mine it crashes at start up. I am at a loss and have done a ton of searching with no resolution. There is no real error I just get the standard windows 7 not responding. All machines are win7Pro 64 with .net4. I am seeing the event viewer logs below.
Event 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: C\Intranet\MarketingRequests.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: a78399b1-ebd8-11e1-9474-f04da20e6eaf
I am also seeing event ID 1026, .net runtime:
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:
at System.Data.Linq.SqlClient.SqlProvider.Execute(System.Linq.Expressions.Expression, QueryInfo, System.Data.Linq.SqlClient.IObjectReaderFactory, System.Object[], System.Object[], System.Data.Linq.SqlClient.ICompiledSubQuery[], System.Object)
at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(System.Linq.Expressions.Expression, QueryInfo[], System.Data.Linq.SqlClient.IObjectReaderFactory, System.Object[], System.Data.Linq.SqlClient.ICompiledSubQuery[])
at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(System.Linq.Expressions.Expression)
at System.Data.Linq.DataQuery1[[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)
at ExpenseReport.frmMain.refreshEmpInfo()
at ExpenseReport.frmMain..ctor()
at ExpenseReport.Program.Main()
Event Xml:
1026
2
0
0x80000000000000
26474
Application
CORRIE-Z.msing.local
Application: ExpenseReport.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
Stack:
at System.Data.Linq.SqlClient.SqlProvider.Execute(System.Linq.Expressions.Expression, QueryInfo, System.Data.Linq.SqlClient.IObjectReaderFactory, System.Object[], System.Object[], System.Data.Linq.SqlClient.ICompiledSubQuery[], System.Object)
at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(System.Linq.Expressions.Expression, QueryInfo[], System.Data.Linq.SqlClient.IObjectReaderFactory, System.Object[], System.Data.Linq.SqlClient.ICompiledSubQuery[])
at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(System.Linq.Expressions.Expression)
at System.Data.Linq.DataQuery1[[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<System.__Canon>)
at ExpenseReport.frmMain.refreshEmpInfo()
at ExpenseReport.frmMain..ctor()
at ExpenseReport.Program.Main()
Upvotes: 0
Views: 6810
Reputation: 55399
It looks like frmMain.refreshEmpInfo
contains a LINQ query that retrieves a record from the database, and the LINQ query calls First()
to get the first record. Is it possible that no records are being returned, which would cause First()
to throw an InvalidOperationException
?
(It might be helpful if you posted the code in frmMain.refreshEmpInfo
. You might also want to wrap that code in a try...catch
block and display the exception details in a message box.)
Upvotes: 2