This is a migrated thread and some comments may be shown as answers.

Null reference exception

1 Answer 72 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Constantine
Top achievements
Rank 1
Constantine asked on 30 Mar 2016, 12:15 PM

Hello.

I'm using TDA with a SQLite database. When I use LINQ to get a property, I've got NullReferenceException.

Code of exception:

Telerik.OpenAccess.OpenAccessException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at OpenAccessRuntime.DataObjects.PCStateMan.replacingStringFieldImp(PersistenceCapable pc, FieldMetaData fmd)
   --- End of inner exception stack trace ---
   at OpenAccessRuntime.ExceptionWrapper.Throw()
   at OpenAccessRuntime.DataObjects.PCStateMan.handleException(Exception x)
   at OpenAccessRuntime.DataObjects.PCStateMan.replacingStringFieldImp(PersistenceCapable pc, FieldMetaData fmd)
   at OpenAccessRuntime.DataObjects.SynchronizedStateManagerProxy.GetStringField(PersistenceCapable pc, Int32 field, String currentValue)
   at Bufbif.Domain.BufbifAlgorithm1Event.OpenAccessEnhancedGet_uniqueKey(BufbifAlgorithm1Event owner)
   at Bufbif.Domain.BufbifAlgorithm1Event.get_UniqueKey() in c:\_ccolotiline\Stash\Bufbif\Bufbif\Bufbif.Domain\BufbifAlgorithm1Event.generated.cs:line 474
   at Bufbif.Logic.DBServices.ProcessingService.<>c__DisplayClass58.<SaveCalculatedChartEvents>b__45(IChartEvent x) in c:\_ccolotiline\Stash\Bufbif\Bufbif\Bufbif.Logic\DBServices\ProcessingService.cs:line 347     

1 Answer, 1 is accepted

Sort by
0
Constantine
Top achievements
Rank 1
answered on 30 Mar 2016, 12:18 PM

False submit. Don't know how to edit my post.

Code where I've got exception:

var dualInAlgortihm2 = newEvents.FirstOrDefault(x => x.UniqueKey == protoLink.Link.UniqueKey);

Also there is some multithread work with TDA in my application.

Why this situation can occurred in TDA? 

Tags
Data Access Free Edition
Asked by
Constantine
Top achievements
Rank 1
Answers by
Constantine
Top achievements
Rank 1
Share this question
or