Unhandled exception

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
thiruppathi
Posts: 11
Joined: Wed 22 May 2013 08:43

Unhandled exception

Post by thiruppathi » Wed 21 Aug 2013 09:00

Hi,

I am getting this unhandled exception which terminates our service.

Object reference not set to an instance of an object.
at Devart.Data.Linq.Engine.dt.a.a(bo A_0)
at Devart.Data.Linq.Engine.dt.a(bo A_0)
at Devart.Data.Linq.Engine.dt.a(Int32 A_0)
at Devart.Data.Linq.Engine.dt.a(c A_0)
at Devart.Data.Linq.Engine.dt.c.b()

can you please help me on this?

Thanks

Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

Re: Unhandled exception

Post by Zero-G. » Wed 21 Aug 2013 10:24

Hey
I am not a Devart guy, but your Information is not really big.

Most of this Errors come from your code. When something you try to parse is NOTHING.
So, an object what is NOTHING can't be parsed.

Take a look to the variables you give to the linq. - Or it could also be, that a return from the database is nothing.
This could be routed, by using .SingleOrDefault Statment like this:
This code would fail with an error like you got, if no ID with "1" would exist

Code: Select all

Dim myResult = From myQuery In DataContext Where mQuery.ID=1
If myResult.Name = "Something" Then ....
The working code would be:

Code: Select all

Dim myResult = (From myQuery In DataContext Where mQuery.ID=1).SingleOrDefault
If myResult IsNot Nothing Then
...
End If
Hope this will help

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Unhandled exception

Post by MariiaI » Wed 21 Aug 2013 11:37

Please specify the issue in more details:
- the version of LinqConnect you are working with;
- the DBMS you are working with;
- the full stack trace of this exception;
- the scenario in which this error occurs, etc.

If possible, please send us the model/test project and specify the exact steps to reproduce the error.

thiruppathi
Posts: 11
Joined: Wed 22 May 2013 08:43

Re: Unhandled exception

Post by thiruppathi » Thu 22 Aug 2013 07:41

Hi,

Please find the required details as below.

1. Version:-
2. DBMS:- Oracle 11g Express edition
3. Stack trace:-

Application: ABC.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
Stack:
at Devart.Data.Linq.Engine.dt+a.a(Devart.Data.Linq.Engine.bo)
at Devart.Data.Linq.Engine.dt.a(Devart.Data.Linq.Engine.bo)
at Devart.Data.Linq.Engine.dt.a(Int32)
at Devart.Data.Linq.Engine.dt.a(c)
at Devart.Data.Linq.Engine.dt+c.b()


4. Scenario:- I am looking into capture the exact scenarios. As this is a windows service, we are yet to locate the exact place and written trace now to capture. Please note that this error is captured as unhandled exception and stops the service.

Thank you.

thiruppathi
Posts: 11
Joined: Wed 22 May 2013 08:43

Re: Unhandled exception

Post by thiruppathi » Mon 26 Aug 2013 10:08

Hi,

I am not able to locate the exact scenario. Is it possible to analyze using dump?

Thanks

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Unhandled exception

Post by Shalex » Tue 27 Aug 2013 11:53

Please give us the following information:
1) the exact (x.xx.xxx) build of your LinqConnect
2) the full stack trace (you posted only a piece of your call stack)
3) if possible, localize the issue and send us a small test project with the DDL/DML script for reproducing

Post Reply