Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon steed 376 posts 688 karma points
    Nov 24, 2011 @ 12:12
    Simon steed
    0

    4.7.1. null exceptions with umbraco.cms.businesslogic.cache.Cache.ClearCacheItem(System.String)

    Hi all

    Just upgraded a 4.5.2 site to 4.7.1 and coming across some major issues which are stopping us going live. Basically the site runs ok but when we login and access certain areas, the w3p process is throwing exceptions, the exceptions at the end of this message are from the event log:

    At the point the exceptions are being thrown,  this seems to be triggering it:

    umbraco.library.RefreshContent();
    

    Exceptions

    An unhandled exception occurred and the process was terminated.

    Application ID: /LM/W3SVC/10/ROOT

    Process ID: 2688

    Exception: System.NullReferenceException

    Message: Object reference not set to an instance of an object.

    StackTrace:    at umbraco.cms.businesslogic.cache.Cache.ClearCacheItem(String Key)
       at umbraco.cms.businesslogic.cache.Cache.ClearCacheByKeySearch(String KeyStartsWith)
       at umbraco.content.set_XmlContentInternal(XmlDocument value)
       at umbraco.content.<RefreshContentFromDatabaseAsync>b__2(Object )
       at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

     

    Application: w3wp.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.NullReferenceException
    Stack:
       at umbraco.cms.businesslogic.cache.Cache.ClearCacheItem(System.String)
       at umbraco.cms.businesslogic.cache.Cache.ClearCacheByKeySearch(System.String)
       at umbraco.content.set_XmlContentInternal(System.Xml.XmlDocument)
       at umbraco.content.<RefreshContentFromDatabaseAsync>b__2(System.Object)
       at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
       at System.Threading.ExecutionContext.runTryCode(System.Object)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

     

    Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7a5f8
    Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
    Exception code: 0xc0000005
    Fault offset: 0x0f496415
    Faulting process id: 0xa80
    Faulting application start time: 0x01ccaa91c7672290
    Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
    Faulting module path: unknown
    Report Id: 7e264c2f-1686-11e1-8471-001c420ea859

    Fault bucket , type 0
    Event Name: CLR20r3
    Response: Not available
    Cab Id: 0

    Problem signature:
    P1: w3wp.exe
    P2: 7.5.7601.17514
    P3: 4ce7a5f8
    P4: cms
    P5: 1.0.4281.14852
    P6: 4e798ef9
    P7: 355
    P8: 19
    P9: System.NullReferenceException
    P10:

    Attached files:

    These files may be available here:


    Analysis symbol:
    Rechecking for solution: 0
    Report Id: 7e264c2f-1686-11e1-8471-001c420ea859
    Report Status: 0

     

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Nov 24, 2011 @ 14:24
    Stefan Kip
    0

    I've seen these exceptions too...

  • Simon steed 376 posts 688 karma points
    Nov 24, 2011 @ 14:35
    Simon steed
    0

    I've gotten around it for now by removing the call to RefreshContent() - to be honest i'm not 100% convinced it's required in my instance but it's obviously a core bug that needs resolving

    I'm wondering if it's related to ghost nodes left in the DB after being deleted, this is causing me other issues as well in the site i.e. sort content tree etc, could be related?

  • Stephen 767 posts 2273 karma points c-trib
    Nov 29, 2011 @ 19:08
    Stephen
    0

    Same issue here, currently investigating. If anyone has a clear way to reproduce, I'm interested.

  • Stephen 767 posts 2273 karma points c-trib
    Nov 29, 2011 @ 19:18
    Stephen
    0

    Looking at the code, the only thing that seem to possibly go wrong is the entire HttpRuntime.Cache to become null at some point -- which could make sense because we see these errors when the application restarts (deploy, update, whatever). Since the code is running is a background thread, the whole app seem to be able to restart while the thread keeps running on itself.

    Still trying to fully understand what's going on...

  • Simon steed 376 posts 688 karma points
    Nov 29, 2011 @ 20:10
    Simon steed
    0

    Good stuff for getting stuck in, i've not had time due to client work coming in thick and fast :-)

    For me, reproducing was after editing document properties, saving, publishing then calling the RefreshContent method

    Simon

  • Dan Søgaard 1 post 21 karma points
    Nov 30, 2011 @ 22:46
    Dan Søgaard
    0

    HAJ HAJ

    I have just upgraded a site from 4.5.1 to 4.7.1 and experiencing the exact same error.

    Every time I do a "Republish entire site" from inside the backoffice, the w3wp.exe process crashes with the above stacktrace.

    Looking at the setter for "protected virtual XmlDocument XmlContentInternal" in umbraco/presentation/content.cs, (http://umbraco.codeplex.com/SourceControl/changeset/view/20be2d518820#umbraco%2fpresentation%2fcontent.cs), it looks like this methodcall is the culprit: Cache.ClearCacheByKeySearch("macroHtml_");

    Hmm caching and macros...

    Now after some testing it looks like the error only occurs if any of the macros have caching enabled ("Cache Period" > 0)

    \Dan

  • Henri Toivonen 77 posts 111 karma points
    Jan 02, 2012 @ 11:27
    Henri Toivonen
    0

    Seeing this too, any news regarding fix?

  • Stephen 767 posts 2273 karma points c-trib
    Jan 10, 2012 @ 12:42
    Stephen
    0

    Running with a custom patch for about 2 weeks and not seeing the error anymore. Will try to push the patches before 4.7.1.1 is out but I might be late...

  • Henri Toivonen 77 posts 111 karma points
    Jan 10, 2012 @ 12:44
    Henri Toivonen
    0

    You better hurry, I think Niels wants to release asap. ;)

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Jan 10, 2012 @ 12:54
    Niels Hartvig
    0

    Stéphane pinged me and I'll add his patch as it's straight forward - any work item to relate this to?

  • Stephen 767 posts 2273 karma points c-trib
    Jan 10, 2012 @ 13:13
    Stephen
    0

    Managed to check with Niels. Patch should be in 4.7.1.1.

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Jan 10, 2012 @ 13:29
    Niels Hartvig
    0

    It's in and build no. 474 will be 4.7.1.1 unless we discover any surprises during today:

    http://nightly.umbraco.org/umbraco%204.7.1/4.7.1/4.7.1.474.zip

Please Sign in or register to post replies

Write your reply to:

Draft