NullReferenceException from RevisionPackaging.Package()
I'm using Courier 2.7.1.
After processing around 520 items, I am getting a null reference exception from inside the Package() call.
[NullReferenceException: Object reference not set to an instance of an object.]
Umbraco.Courier.Core.Packaging.RevisionPackaging.() +797
Umbraco.Courier.Core.Packaging.RevisionPackaging.Package() +35
This is the code:
var engine = new RevisionPackaging(revisionName); engine.PackagedItem += this.engine_PackagedItem; engine.PackagedItemResource += this.engine_PackagedItemResource; engine.AddAllProvidersToQueue(true); engine.Package(); engine.Dispose();
I can catch the PackagingItem event to get the guid of the item that is causing the error, but I'm not sure how to debug this any further without source code of the Courier DLL's.
I actually just pushed a 2.7.2 nightly which fixes a possible null reference in the packaging if you use the api and the AddAllProviders call, give that a try:
NullReferenceException from RevisionPackaging.Package()
I'm using Courier 2.7.1.
After processing around 520 items, I am getting a null reference exception from inside the Package() call.
[NullReferenceException: Object reference not set to an instance of an object.] Umbraco.Courier.Core.Packaging.RevisionPackaging.() +797 Umbraco.Courier.Core.Packaging.RevisionPackaging.Package() +35
This is the code:
var engine = new RevisionPackaging(revisionName);
engine.PackagedItem += this.engine_PackagedItem;
engine.PackagedItemResource += this.engine_PackagedItemResource;
engine.AddAllProvidersToQueue(true);
engine.Package();
engine.Dispose();
I can catch the PackagingItem event to get the guid of the item that is causing the error, but I'm not sure how to debug this any further without source code of the Courier DLL's.
The last two events before it crashes are PackagedQueue and Completing. It never reaches the Completed event.
I think I might have to try .NET reflector next if I can't get any help from here.
Hi Mike
I actually just pushed a 2.7.2 nightly which fixes a possible null reference in the packaging if you use the api and the AddAllProviders call, give that a try:
http://nightly.umbraco.org/UmbracoCourier/2.7.2/nightly%20builds/
/Per
I'm getting a new error with 2.7.2. Its happening even earlier.
[IndexOutOfRangeException: Index was outside the bounds of the array.] Umbraco.Courier.Core.Resource.ToByteArray(String rootDirectory) +222 Umbraco.Courier.RepositoryProviders.Local.GetResourceContents(ItemIdentifier itemId, Type itemType, Resource resource, String revisionAlias) in c:\Program Files (x86)\teamcity\buildAgent\work\ce7e5edc151a5a37\Contrib\Providers\Umbraco.Courier.RepositoryProviders\Local\Local.cs:360 Umbraco.Courier.Core.Packaging.RevisionPackaging.(ItemIdentifier itemId, ItemProvider provider, QueuedItemIdentifier itemInQueue) +1041 [PackageException: Unable to package item 'Document Registration Page Property Data' from provider 'PropertyData' into filename 'Registration Page_1121_Document_data'] Umbraco.Courier.Core.Packaging.RevisionPackaging.(ItemIdentifier itemId, ItemProvider provider, QueuedItemIdentifier itemInQueue) +1795 Umbraco.Courier.Core.Packaging.RevisionPackaging.() +656 Umbraco.Courier.Core.Packaging.RevisionPackaging.Package() +283
If I move the node causing the exception to the recycle bin, then I get another error from a different node:
#additionalfees is a named anchor.
mailto: links are causing the same error
is working on a reply...