1
Vote

Crash on committing data

description

The following crash occurred on committing data:
System.NullReferenceException: Object reference not set to an instance of an object.
 at Execom.IOG.Services.Data.CommitDataService.AddNodeToAppendableTreeRecursive(DirectNodeProviderUnsafe`3 delta, Guid nodeId, Dictionary`2 nodeMapping, Dictionary`2 nodeStates, IsolatedChangeSet`3 changeSet) in C:\data\projekti\iog\Execom.IOG\Services\Data\CommitDataService.cs:line 788
 at Execom.IOG.Services.Data.CommitDataService.CreateAppendableChangeSetTree(Guid baseSnapshotId, Guid newSnapshotId, IKeyValueStorage`2 storage, Dictionary`2 nodeMapping, Dictionary`2 nodeStates, IsolatedChangeSet`3 changeSet, Hashtable reusedNodes) in C:\data\projekti\iog\Execom.IOG\Services\Data\CommitDataService.cs:line 594
 at Execom.IOG.Services.Data.CommitDataService.CreateAppendableChangeSet(Guid baseSnapshotId, Guid newSnapshotId, IsolatedChangeSet`3 changeSet) in C:\data\projekti\iog\Execom.IOG\Services\Data\CommitDataService.cs:line 568
 at Execom.IOG.Services.Data.CommitDataService.CreateMergedChangeSet(Guid latestSnapshot, Hashtable subTree, IsolatedChangeSet`3 changeSet, Dictionary`2 intermediateChanges) in C:\data\projekti\iog\Execom.IOG\Services\Data\CommitDataService.cs:line 159
 at Execom.IOG.Services.Data.CommitDataService.AcceptCommit(IsolatedChangeSet`3 isolatedChangeSet) in C:\data\projekti\iog\Execom.IOG\Services\Data\CommitDataService.cs:line 119
 at Execom.IOG.Services.Workspace.WorkspaceFacade.Commit(Guid workspaceId, IsolatedChangeSet`3 changeSet) in C:\data\projekti\iog\Execom.IOG\Services\Workspace\WorkspaceFacade.cs:line 100
 at Execom.IOG.Workspace`1.Commit() in C:\data\projekti\iog\Execom.IOG\Workspace.cs:line 357
In the attachment I added the file with the fix. In the state none of the method AddNodeToAppendableTreeRecursive there is a check if the enumerator != null, but this check is missing in the state modified. It could be that a node is not a parent, and the provider will then not return an enumerator, but null. It seems to me that this check must be also done at the state modified.

file attachments

comments