Print Page | Close Window

Exception caught during entity initialization

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2012
Forum Discription: For .NET 4.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=4258
Printed Date: 10-Apr-2025 at 11:05pm


Topic: Exception caught during entity initialization
Posted By: kdev
Subject: Exception caught during entity initialization
Date Posted: 01-Aug-2013 at 2:35am
Hi,

Lately (since 7.2 I think) I often see this kind of error in my logs :

(DEVFORCE) : 142 : 01/08/2013 11:31:55 :  : IdeaBlade.EntityModel.EntityAspect:<InitializeDefaultValues>b__f : Exception caught during entity initialization: Une exception a été levée par la cible d'un appel.
(DEVFORCE) : 143 : 01/08/2013 11:31:55 :  : IdeaBlade.EntityModel.EntityAspect:<InitializeDefaultValues>b__f : Exception caught during entity initialization: Une exception a été levée par la cible d'un appel.
(DEVFORCE) : 144 : 01/08/2013 11:31:55 :  : IdeaBlade.EntityModel.EntityAspect:<InitializeDefaultValues>b__f : Exception caught during entity initialization: Une exception a été levée par la cible d'un appel.

I tried to find out the cause but with no succes.
Should I be worried about thoses error ? if so, what could be the cause and how to fix it ?

Regards,




Replies:
Posted By: kimj
Date Posted: 01-Aug-2013 at 11:30am

Thanks for reporting this. 

We're seeing the problem with Code First entities in certain situations.  The error is thrown when attempting to initialize default values on the null entity.  DevForce catches and "eats" the error, but the null entity will not be initialized correctly.
 
The problem is mostly harmless, but undesirable.   We'll get in fixed in the next release. 


Posted By: KitKat
Date Posted: 05-Aug-2013 at 6:22am
This issue is causing a lot of pain in debugging our applications.  As the time spend logging all these messages to the output is slowing down the debug time significantly.  Is there any workaround that we can implement?

Thank you,
Kat


Posted By: kimj
Date Posted: 05-Aug-2013 at 2:19pm
No, I'm afraid there's no workaround.  If you're throwing and breaking for first chance exceptions you can turn that off to see if it helps any.  This bug will be fixed in the 7.2.1 release.



Print Page | Close Window