Page 1 of 1

Unhandled exception

Posted: Wed 21 Aug 2013 09:00
by thiruppathi
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

Re: Unhandled exception

Posted: Wed 21 Aug 2013 10:24
by Zero-G.
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

Re: Unhandled exception

Posted: Wed 21 Aug 2013 11:37
by MariiaI
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.

Re: Unhandled exception

Posted: Thu 22 Aug 2013 07:41
by thiruppathi
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.

Re: Unhandled exception

Posted: Mon 26 Aug 2013 10:08
by thiruppathi
Hi,

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

Thanks

Re: Unhandled exception

Posted: Tue 27 Aug 2013 11:53
by Shalex
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