Open Segachief opened 2 years ago
( As this issue is quite old - I'll create a new linked issue.. https://github.com/modelsbuilder/ModelsBuilder.Original/issues/259 )
I have the same issue - Umbraco 8.13.1 - added the web.config line etc. If we do anything in the backoffice with doctypes etc, We get stackoverflow after the old generated models has been deleted, and before the new is generated. After this the site will not start - Only solution to get the site restarted is to undo the deletion of the models (GIT undo changes).
Actual exception is in System.Collections.Generic.Dictionary.FindEntry() where key is IListableContent.
I've checked for looping compositions - any other ideas?
Using VS2022Ent - 64bit - Version 17.8.5
Hi all,
We've encountered a problem with one of our repos wherein the Modelbuilder custom tool is no longer working and throws an error within which the exception message states 'Object reference not set to an instance of an object'. It seems to be the same as the closed issue encountered here: #160 (was unsure whether to post in a closed issue or open a new one; apologies if the former is preferred).
We have
<add
key="Umbraco.ModelsBuilder.LanguageVersion" value="CSharp6" />` within our web.config from prior to this bug (as per one user's recommendation on the #160 issue) and our Umbraco version is 7.13.1. Any information on things to try or what the possible underlying cause could be would be appreciated.This is the full output for the error:b0()\r\n
at System.Collections.Concurrent.ConcurrentDictionaryb 9(Object instance, Object[] methodParameters)\r\n
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.d0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d 5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Web.Http.Filters.ActionFilterAttribute.d5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d 0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.d2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.d 2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d1.MoveNext()","InnerException":{"Message":"An error has occurred.","ExceptionMessage":"Object reference not set to an instance of an object.","ExceptionType":"System.NullReferenceException","StackTrace":" at Archetype.Extensions.ArchetypeHelper.RetrieveAdditionalProperties(ArchetypePreValue& preValue)\r\n at Archetype.Extensions.ArchetypeHelper.<>cDisplayClass6.b5()\r\n at Umbraco.Core.Cache.DictionaryCacheProviderBase.<>cDisplayClass10_0.b 0()"}}
UmbracoModelsBuilder: at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result)
at Umbraco.ModelsBuilder.Api.ApiClient.GetModels(Dictionary
UmbracoModelsBuilder: Starting v8.0.5 04/10/2021 11:27:07. UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code: Exception: Response status code does not indicate success (InternalServerError) {"Message":"An error has occurred.","ExceptionMessage":"Exception while creating a value.","ExceptionType":"System.Exception","StackTrace":" at Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, Func
1 getCacheItem, Nullable1 timeout, Boolean isSliding, CacheItemPriority priority, CacheItemRemovedCallback removedCallback, CacheDependency dependency)\r\n at Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, Func
1 getCacheItem)\r\n at Umbraco.Core.Cache.DeepCloneRuntimeCacheProvider.GetCacheItem(String cacheKey, Func1 getCacheItem)\r\n at Archetype.Extensions.ArchetypeHelper.GetArchetypePreValueFromDataTypeId(Int32 dataTypeId)\r\n at Archetype.PropertyConverters.ArchetypeValueConverter.IsConverter(PublishedPropertyType propertyType)\r\n at System.Linq.Enumerable.WhereEnumerableIterator
1.MoveNext()\r\n at System.Linq.Buffer1..ctor(IEnumerable
1 source)\r\n at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)\r\n at Umbraco.Core.Models.PublishedContent.PublishedPropertyType.InitializeConverters()\r\n at Umbraco.Core.Models.PublishedContent.PublishedContentType.<.ctor>b__3_0(PropertyType x)\r\n at System.Linq.Enumerable.WhereSelectEnumerableIterator
2.MoveNext()\r\n at System.Linq.Buffer1..ctor(IEnumerable
1 source)\r\n at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)\r\n at Umbraco.Core.Models.PublishedContent.PublishedContentType..ctor(IContentTypeComposition contentType)\r\n at Umbraco.Core.Models.PublishedContent.PublishedContentType.CreatePublishedContentType(PublishedItemType itemType, String alias)\r\n at Umbraco.Core.Cache.CacheProviderExtensions.<>c__DisplayClass5_0
1.2.GetOrAdd(TKey key, Func
2 valueFactory)\r\n at Umbraco.Core.Cache.CacheProviderExtensions.GetCacheItem[T](ICacheProvider provider, String cacheKey, Func1 getCacheItem)\r\n at Umbraco.Core.Models.PublishedContent.PublishedContentType.Get(PublishedItemType itemType, String alias)\r\n at Umbraco.ModelsBuilder.Umbraco.Application.GetTypes(PublishedItemType itemType, IContentTypeBase[] contentTypes) in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Umbraco\\Application.cs:line 169\r\n at Umbraco.ModelsBuilder.Umbraco.Application.GetAllTypes() in D:\\d\\Zbu ModelsBuilder-7\\Umbraco.ModelsBuilder\\Umbraco\\Application.cs:line 51\r\n at Umbraco.ModelsBuilder.Api.ApiHelper.GetModels(String modelsNamespace, IDictionary
2 files) in D:\d\Zbu ModelsBuilder-7\Umbraco.ModelsBuilder\Api\ApiHelper.cs:line 13\r\n at Umbraco.ModelsBuilder.Api.ModelsBuilderApiController.GetModels(GetModelsData data) in D:\d\Zbu ModelsBuilder-7\Umbraco.ModelsBuilder.Api\ModelsBuilderApiController.cs:line 65\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>cDisplayClass10.2 ourFiles, String modelsNamespace) at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg)