U4-3665 - Media Cache crashes totally

Created by Mads Jørgensen 21 Nov 2013, 21:41:03 Updated by Sebastiaan Janssen 31 Jan 2014, 12:19:27

Duplicates: U4-4144

Relates to: U4-4144

Getting following message from Umbraco, when media cache times out. As long as in preview everything's fine, but when out of preview it crashes.

The cshtml creating this is:

@foreach (var proj in CurrentPage.Children.Where("Visible")) {

}

It seems that @Umbraco.TypedMedia reads from an image cache, wich really crashes loads of the time! When outputting the variable within proj.listImage, it outputs totally correct.

Solution runs SQL CE by the way.

[ArgumentNullException: Value cannot be null. Parameter name: propertyType] Umbraco.Core.Models.PublishedContent.PublishedPropertyBase..ctor(PublishedPropertyType propertyType) +62 Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedProperty..ctor(PublishedPropertyType propertyType, Boolean isPreviewing) +18 Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedProperty..ctor(PublishedPropertyType propertyType, Boolean isPreviewing, String propertyData) +21 Umbraco.Web.PublishedCache.XmlPublishedCache.DictionaryPublishedContent..ctor(IDictionary2 valueDictionary, Func2 getParent, Func2 getChildren, Func3 getProperty, Boolean fromExamine) +2390 Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache.ConvertFromXPathNavigator(XPathNavigator xpath) +920 Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache.GetUmbracoMedia(Int32 id) +350 Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache.GetById(UmbracoContext umbracoContext, Boolean preview, Int32 nodeId) +9 Umbraco.Web.PublishedCache.ContextualPublishedCache1.GetById(Boolean preview, Int32 contentId) +38 Umbraco.Web.UmbracoHelper.TypedMedia(Int32 id) +38 ASP._Page_Views_ProjectList_cshtml.Execute() in d:\web\localuser\rumarkitektur.dk\public_html\Views\ProjectList.cshtml:15 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +103 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +76 System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +235 System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107 Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +93 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +291 System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13 System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +23 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +245 System.Web.Mvc.<>c__DisplayClass1c.b__19() +22 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +245 System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +22 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult) +176 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +311 System.Web.Mvc.<>c__DisplayClass1d.b__19() +23 System.Web.Mvc.Async.<>c__DisplayClass1.b__0() +19 System.Web.Mvc.Async.<>c__DisplayClass81.<BeginSynchronous>b__7(IAsyncResult _) +10 System.Web.Mvc.Async.WrappedAsyncResult1.End() +55 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +39 System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +23 System.Web.Mvc.Async.WrappedAsyncResult1.End() +55 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +29 System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10 System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25 System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23 System.Web.Mvc.Async.WrappedAsyncResult1.End() +55 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +31 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9514812 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

Comments

Mads Jørgensen 21 Nov 2013, 21:48:37

If i preview the specific page (The one loading images), it'l regenerate the image cache. Will keep an eye on wether it's breaking down from time to time, or if it's related to other stuff happening during development. Have to say though, I'm no .NET wizard, so it's not other than plain Razor I'm doing.


Stephan 21 Nov 2013, 22:00:54

Will have a look at that one.


Jeavon Leopold 22 Nov 2013, 08:39:14

Are you sure one of the media items in hasn't been deleted? Seems this might be the same issue as http://issues.umbraco.org/issue/U4-3630


Mads Jørgensen 23 Nov 2013, 07:29:27

Hey, pretty sure all the media items in there. There's been no changes to the media section at all, from working to not working, and it all worked like a charm after a preview. Anywho, it's not a YSOD thing is it?


Jeavon Leopold 25 Nov 2013, 09:30:24

Indeed, it certainly shouldn't cause a YSOD. You can try a workaround to see if it is a certain item that is invalid/deleted: {code:c#} @foreach (var proj in CurrentPage.Children.Where("Visible")) {

Priority: Normal

Type: Bug

State: Duplicate

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.0.0

Due in version:

Sprint:

Story Points:

Cycle: