New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

w3p crash when using copy to or renaming item #222

Closed
Rclemens opened this Issue May 12, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@Rclemens

Rclemens commented May 12, 2017

Hi, I think I'm having a bug or am doing something terribly wrong

We were using unicorn 2 and I've updated the solution to unicorn 3.3.2 (with SC 8.2 update 1) following the update steps in your blog. I've deleted the old serialization.config and adjusted the new configs. After that I could do a full serialization of the database. That went without any big issues

Now I see that sometimes when I edit or use the copy-to option my just w3p process crashes. Attaching this crash to my visual studio just tells me there is a nullref exception. The new or changed item is on disk, so that part works.

Any idea's what I could be doing wrong?

@kamsar

This comment has been minimized.

Show comment
Hide comment
@kamsar

kamsar May 12, 2017

Collaborator

Can you provide the stack trace of your exception?

Collaborator

kamsar commented May 12, 2017

Can you provide the stack trace of your exception?

@Rclemens

This comment has been minimized.

Show comment
Hide comment
@Rclemens

Rclemens May 15, 2017

Hi,

I'm getting this in the eventviewer:
A Webhost unhandled exception occurred. Sender Information: System.AppDomain/2129745 Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Unicorn.Data.DataProvider.UnicornDataProvider.RemoveItemFromCaches(IItemMetadata metadata, String databaseName) at Rainbow.Storage.SerializationFileSystemDataStore.<>c__DisplayClass23_0.<CreateTree>b__0(IItemMetadata metadata) at Rainbow.Storage.SerializationFileSystemTree.HandleDataItemChanged(String path, TreeWatcherChangeType changeType) at Rainbow.Storage.TreeWatcher.FlushEvents(Object ignored) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.TimerQueueTimer.CallCallback() at System.Threading.TimerQueueTimer.Fire() at System.Threading.TimerQueue.FireNextTimers() Process Name: w3wp Process ID: 6464

Hi,

I'm getting this in the eventviewer:
A Webhost unhandled exception occurred. Sender Information: System.AppDomain/2129745 Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Unicorn.Data.DataProvider.UnicornDataProvider.RemoveItemFromCaches(IItemMetadata metadata, String databaseName) at Rainbow.Storage.SerializationFileSystemDataStore.<>c__DisplayClass23_0.<CreateTree>b__0(IItemMetadata metadata) at Rainbow.Storage.SerializationFileSystemTree.HandleDataItemChanged(String path, TreeWatcherChangeType changeType) at Rainbow.Storage.TreeWatcher.FlushEvents(Object ignored) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.TimerQueueTimer.CallCallback() at System.Threading.TimerQueueTimer.Fire() at System.Threading.TimerQueue.FireNextTimers() Process Name: w3wp Process ID: 6464

@kamsar

This comment has been minimized.

Show comment
Hide comment
@kamsar

kamsar May 15, 2017

Collaborator

The relevant code is here https://github.com/kamsar/Unicorn/blob/master/src/Unicorn/Data/DataProvider/UnicornDataProvider.cs#L754

Are you using link db or search index update support?

I can see that there is an issue here at the very least in that the method should trap exceptions and log them (since it runs on an event handling thread, and as you could background exceptions terminate the app pool). I've definitely not seen this particular issue before.

You might also give it a try with the current Unicorn 4 prerelease version. It's basically ready to go and I've used it on production projects that are live, it's just a matter of making the time to do a proper release; Dlilithium is the only semi-experimental part and it's off by default :)

Collaborator

kamsar commented May 15, 2017

The relevant code is here https://github.com/kamsar/Unicorn/blob/master/src/Unicorn/Data/DataProvider/UnicornDataProvider.cs#L754

Are you using link db or search index update support?

I can see that there is an issue here at the very least in that the method should trap exceptions and log them (since it runs on an event handling thread, and as you could background exceptions terminate the app pool). I've definitely not seen this particular issue before.

You might also give it a try with the current Unicorn 4 prerelease version. It's basically ready to go and I've used it on production projects that are live, it's just a matter of making the time to do a proper release; Dlilithium is the only semi-experimental part and it's off by default :)

@kamsar kamsar added the bug label May 15, 2017

kamsar added a commit that referenced this issue May 16, 2017

Add background exception handler and some extra null checks that _sho…
…uldn't_ be needed, but also won't hurt anything.

See #222
@kamsar

This comment has been minimized.

Show comment
Hide comment
@kamsar

kamsar May 16, 2017

Collaborator

Relevant catching and some speculative null checks have been added to Unicorn 4.0-pre09 which is on NuGet.

Collaborator

kamsar commented May 16, 2017

Relevant catching and some speculative null checks have been added to Unicorn 4.0-pre09 which is on NuGet.

@kamsar kamsar added the fix-pending label May 16, 2017

@Rclemens

This comment has been minimized.

Show comment
Hide comment
@Rclemens

Rclemens May 17, 2017

Hi @kamsar, upgrading to Unicorn 4.0-pre09 solved this problem for me. Thanks for your help

Hi @kamsar, upgrading to Unicorn 4.0-pre09 solved this problem for me. Thanks for your help

@Rclemens Rclemens closed this May 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment