0

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.IQueryable1) 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.IQueryable1<System.__Canon>) at ExpenseReport.frmMain.refreshEmpInfo() at ExpenseReport.frmMain..ctor() at ExpenseReport.Program.Main()

Sealer_05
  • 5,346
  • 8
  • 35
  • 53
  • 2
    "All machines are win7Pro 64". Is your machine perhaps 32bit, and you have a 32bit dependency, while it's just that all the others are 64bit? If this is true, and you compiled with the "Any CPU" target option, that would produce exactly this error, or very close to it. – Joel Coehoorn Aug 22 '12 at 02:25
  • My machine is 32 bit. I figured out the problem. It was sql database permissions. – Sealer_05 Aug 22 '12 at 15:00

1 Answers1

2

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.)

Michael Liu
  • 52,147
  • 13
  • 117
  • 150
  • 1
    After thinking about your answer I figured out why it wasnt working. I did not have sql database permissions set up correctly. – Sealer_05 Aug 22 '12 at 15:01