Hello,

Suddenly we are getting an error:

The errors are random (occur after random admin actions).
This one occurred when saving product variant.

We are almost ready to go live, but we cannot find a problem. How to approach this ?

[DivideByZeroException: Attempted to divide by zero.]
   System.Data.SqlServerCe.NativeMethodsHelper.CompileQueryPlan(IntPtr pQpCommand, String pwszCommandText, ResultSetOptions options, IntPtr[] pParamNames, IntPtr prgBinding, Int32 cDbBinding, IntPtr& pQpPlan, IntPtr pError) +86
   System.Data.SqlServerCe.NativeMethods.CompileQueryPlan(IntPtr pQpCommand, String pwszCommandText, ResultSetOptions options, IntPtr[] pParamNames, IntPtr prgBinding, Int32 cDbBinding, IntPtr& pQpPlan, IntPtr pError) +74
   System.Data.SqlServerCe.SqlCeCommand.CompileQueryPlan() +603
   System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options) +587
   System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery() +21
   System.Data.SqlServerCe.SqlCeMultiCommand.ExecuteNonQuery() +205
   System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues) +168
   System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) +267

[UpdateException: An error occurred while updating the entries. See the inner exception for details.]
   System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) +389
   System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache) +163
   System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options) +609
   System.Data.Entity.Internal.InternalContext.SaveChanges() +120

[DbUpdateException: An error occurred while updating the entries. See the inner exception for details.]
   System.Data.Entity.Internal.InternalContext.SaveChanges() +206
   System.Data.Entity.Internal.LazyInternalContext.SaveChanges() +24
   System.Data.Entity.DbContext.SaveChanges() +20
   Nop.Data.EfRepository`1.Insert(T entity) in c:\WORK\Branchline\RussellHemmings\Site\Libraries\Nop.Data\EfRepository.cs:41
   Nop.Services.Logging.DefaultLogger.InsertLog(LogLevel logLevel, String shortMessage, String fullMessage, Customer customer) in c:\WORK\Branchline\RussellHemmings\Site\Libraries\Nop.Services\Logging\DefaultLogger.cs:144
   Nop.Services.Logging.LoggingExtensions.FilteredLog(ILogger logger, LogLevel level, String message, Exception exception, Customer customer) in c:\WORK\Branchline\RussellHemmings\Site\Libraries\Nop.Services\Logging\LoggingExtensions.cs:39
   Nop.Admin.Controllers.BaseNopController.LogException(Exception exc) +106
   Nop.Admin.Controllers.BaseNopController.OnException(ExceptionContext filterContext) +42
   System.Web.Mvc.Controller.System.Web.Mvc.IExceptionFilter.OnException(ExceptionContext filterContext) +9
   System.Web.Mvc.ControllerActionInvoker.InvokeExceptionFilters(ControllerContext controllerContext, IList`1 filters, Exception exception) +115
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +323
   System.Web.Mvc.Controller.ExecuteCore() +116
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50
   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8969117
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184