Summary
The following error message is displayed when an user attempts to save an analysis file. User is unable to proceed with the save operation.
Error message: Unable to save the file <filename>.dxp
SerializationException at Spotfire.Dxp.Framework:
Attempt to read from a node that is in state 'Disposed': Spotfire.Dxp.Framework.DocumentModel.State.DisposedUndoablePropertyNodeState`1[[Spotfire.Dxp.Data.DataColumnImpl, Spotfire.Dxp.Data, Version=51.0.16511.3878, Culture=neutral, PublicKeyToken=789861576bd64dc5]].
Object reference chain leading to the fault (closest reference first):
Spotfire.Dxp.Application.CustomNodeStandIn.ReferencedColumn
Spotfire.Dxp.Application.CustomNodeStandIn.DataColumns[0]
Spotfire.Dxp.Application.CustomNodes.Nodes[5]
Spotfire.Dxp.Application.Document.CustomNodes
(HRESULT: 8013150C)
Stack Trace:
at Spotfire.Dxp.Framework.Persistence.Xml.SerializationFormatter.Serialize(Object graph)
at Spotfire.Dxp.Framework.Persistence.PersistenceManager.SerializeForPersistence(Stream serializationStream, Object graph, IServiceProvider serviceProvider, PersistenceVersionAttribute compatibilityVersion, SerializationContext oldContext, SystemTypeSerializationSettings systemTypeSerializationSettings)
at Spotfire.Dxp.Framework.Persistence.PersistenceManager.<>c__DisplayClass20_0.<Save>b__0()
at Spotfire.Dxp.Framework.ApplicationModel.Progress.ExecuteSubtask(String title, ProgressOperation operation)
at Spotfire.Dxp.Framework.Persistence.PersistenceManager.Save(DocumentTypes documentType, DocumentNode doc, IDocumentSaveSettings settings, Stream targetStream)
at Spotfire.Dxp.Framework.Persistence.PersistenceManager.SaveToTempFile(DocumentTypes documentType, DocumentNode doc, IDocumentSaveSettings settings, Disposables cleanup, FileMetadata& fileMetadata)
at Spotfire.Dxp.Framework.Persistence.PersistenceManager.Save(DocumentTypes documentType, DocumentNode doc, IDocumentSaveSettings settings, String fileName)
at Spotfire.Dxp.Framework.DocumentModel.DocumentManager`1.<>c__DisplayClass63_0.<Save>b__0()
at Spotfire.Dxp.Framework.ApplicationModel.Progress.<>c__DisplayClass22_0.<Start>b__0()
at Spotfire.Dxp.Framework.ApplicationModel.MonitorableProgress.Start[T](Func`1 action)
at Spotfire.Dxp.Forms.Application.FormsProgressService.ProgressThread.DoOperationLoop()
InvalidOperationException at Spotfire.Dxp.Framework:
Attempt to read from a node that is in state 'Disposed': Spotfire.Dxp.Framework.DocumentModel.State.DisposedUndoablePropertyNodeState`1[[Spotfire.Dxp.Data.DataColumnImpl, Spotfire.Dxp.Data, Version=51.0.16511.3878, Culture=neutral, PublicKeyToken=789861576bd64dc5]]. (HRESULT: 80131509)
Stack Trace:
at Spotfire.Dxp.Framework.DocumentModel.State.DisposedUndoableNodeState.LimitGenerationUsedByRuntimeProperty()
at Spotfire.Dxp.Framework.DocumentModel.UndoableProperty`1.get_Value()
at Spotfire.Dxp.Framework.DocumentModel.DocumentNode.SerializeProperty[T](SerializationInfo info, StreamingContext context, UndoableProperty`1 property, String fieldNameOverride)
at Spotfire.Dxp.Data.DataColumn.GetObjectData(SerializationInfo info, StreamingContext context)
at Spotfire.Dxp.Framework.DocumentModel.Node.System.Runtime.Serialization.ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
at Spotfire.Dxp.Framework.Persistence.PersistenceManager.GetObjectData(Object obj, SerializationInfo info, PrunerBase pruner, StreamingContext context)
at Spotfire.Dxp.Framework.Persistence.PersistenceManager.GetSerializationInfo(Object obj, Type objType, PrunerBase pruner, StreamingContext context)
at Spotfire.Dxp.Framework.Persistence.Xml.SerializationFormatter.SerializeObject(Int64 id, Object obj, Type objType)
at Spotfire.Dxp.Framework.Persistence.Xml.SerializationFormatter.SerializeDocumentNodeWhileSaving(Node node, ReferenceInfo referenceInfo)
at Spotfire.Dxp.Framework.Persistence.Xml.SerializationFormatter.SerializeField(String name, Object obj, Type declaredFieldType, String containingObjTypeName)
Resolution
The error is often caused by user opening an analysis file that contains corrupt reference to data created by Spotfire add-ons such as Lead Discovery. The error can be resolved by performing the following steps. If the error persists or occurs frequently then contact Revvity Signals Support.
1. In the problematic analysis file, insert a new Text Area.
2. Right click the Text area and select [Edit Text area].
3. Click the [Insert Action Control] icon in the Task Icon.
4. Move to [Script]
5. Click [New]
6. Enter "Resolve disposed error" in [Script name].
7. Copy and paste the following IronPython script in [Sciprt]
from System.Reflection import BindingFlags
nodes = Document.CustomNodes
type = nodes.GetType()
removeMethod = type.GetMethod("RemoveStandIns", BindingFlags.NonPublic | BindingFlags.Instance);
removeMethod.Invoke(nodes, None)
8. Click OK to go back to the Action Control dialog.
9. Enter "Resolve disposed error" in [Display name] of Action Control dialog.
10. Click OK to go back to Edit Text Area dialog.
12. Click the [Save] icon in Edit Text Area dialog, then close the dialog.
13. A button "Resolve disposed error" has been created in the Text area.
14. Click the button multiple times until the error has been resolved and analysis file can be saved. More than one click might be necessary.
15. The Text area along with the button can be removed if desired, and analysis file can be saved without error from now on.
Comments
0 comments
Article is closed for comments.