Reading old state file with newer version of ParaView

Problem: A state file that was generated with a custom application based on ParaView 5.8 crashes the program if I want to load it with an updated custom application based on PV 5.10.

I found out that there is one Property tag "Cues" in that state file that triggers the crash, so if I remove it manually, I can avoid it:

      <Property name="Cues" id="85200.Cues" number_of_elements="7">
        <Proxy value="85202"/>
        <Proxy value="126582"/>
        <Proxy value="126585"/>
        <Proxy value="126588"/>
        <Proxy value="126591"/>
        <Proxy value="126598"/>
        <Proxy value="126603"/>
        <Domain name="groups" id="85200.Cues.groups"/>
      </Property>

Now I know that according to the “ParaView philosophy”, backwards compatibility for state files is never guaranteed - and I understand that otherwise updates would be very much blocked.

Still I would like to avoid this crash for the customers, because some may hesitate to go for the update at all.

I know that I can probably do it with some “dirty hacks” inside the ParaView code, but maybe there is also an elegant solution for such kind of trouble!?

It is guaranteed, this is a bug. please share a simple state file to reproduce.

It is happening in an extremely large one!

So either I manage to get it stripped down while keeping the bug, or I find another reason for the failure on my way there…

What is in the groups property?

It was a long way to go, but I finally managed to get it done: Generate an absolute mini-example that still shows the crash with PV 5.10.1: see here.

minimodel_crash.zip (59.7 KB)

That ZIP package contains a text with a summary of my findings so far, including what I found using the debugger.

There are two state files: one was generated by stripping down the original problem state file (from a customer), even replacing the real model files with a simple dummy. The other was generated from scratch by just putting together the proper reader plus filter in the pipeline: The latter loads just fine with PV 5.10.1 while the first does not.

Meaning: The customer originally did a lot of “playing around” with animations and whatever before writing the state file, and the “traces” of all this are still within the stripped down file and causing the problem.

Thanks a lot @cobo !

Confirmed, here is the backtrace:

Thread 1 "paraview" received signal SIGSEGV, Segmentation fault.
0x00007ffff6b2bb0e in pqAnimationViewWidget::pqInternal::cueName (this=0x555555aa6560, cue=0x55555ccc9200) at /home/glow/dev/paraview/pv1/src/Qt/Components/pqAnimationViewWidget.cxx:196
warning: Source file is more recent than executable.
196           QString p = QCoreApplication::translate("ServerManagerXML", pty->GetXMLLabel());
(gdb) print pty
$1 = (vtkSMProperty *) 0x0
(gdb) bt
#0  0x00007ffff6b2bb0e in pqAnimationViewWidget::pqInternal::cueName (this=0x555555aa6560, cue=0x55555ccc9200) at /home/glow/dev/paraview/pv1/src/Qt/Components/pqAnimationViewWidget.cxx:196
#1  0x00007ffff6b2568d in pqAnimationViewWidget::onSceneCuesChanged (this=0x555555b2bf20) at /home/glow/dev/paraview/pv1/src/Qt/Components/pqAnimationViewWidget.cxx:514
#2  0x00007ffff6b2f20e in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (pqAnimationViewWidget::*)()>::call(void (pqAnimationViewWidget::*)(), pqAnimationViewWidget*, void**) (f=(void (pqAnimationViewWidget::*)(pqAnimationViewWidget * const)) 0x7ffff6b2556a <pqAnimationViewWidget::onSceneCuesChanged()>, 
    o=0x555555b2bf20, arg=0x7fffffffc760) at /usr/include/qt/QtCore/qobjectdefs_impl.h:152
#3  0x00007ffff6b2ef75 in QtPrivate::FunctionPointer<void (pqAnimationViewWidget::*)()>::call<QtPrivate::List<>, void>(void (pqAnimationViewWidget::*)(), pqAnimationViewWidget*, void**) (f=(void (pqAnimationViewWidget::*)(pqAnimationViewWidget * const)) 0x7ffff6b2556a <pqAnimationViewWidget::onSceneCuesChanged()>, o=0x555555b2bf20, 
    arg=0x7fffffffc760) at /usr/include/qt/QtCore/qobjectdefs_impl.h:185
#4  0x00007ffff6b2e8ac in QtPrivate::QSlotObject<void (pqAnimationViewWidget::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x555557123910, r=0x555555b2bf20, a=0x7fffffffc760, ret=0x0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:418
#5  0x00007ffff5abea71 in ?? () from /usr/lib/libQt5Core.so.5
#6  0x00007ffff6684bc1 in pqAnimationScene::cuesChanged (this=0x555556131420) at /home/glow/dev/paraview/pv1/build/Qt/Core/pqCore_autogen/EWIEGA46WW/moc_pqAnimationScene.cpp:376
#7  0x00007ffff66a45b2 in pqAnimationScene::onCuesChanged (this=0x555556131420) at /home/glow/dev/paraview/pv1/src/Qt/Core/pqAnimationScene.cxx:177
#8  0x00007ffff66840fd in pqAnimationScene::qt_static_metacall (_o=0x555556131420, _c=QMetaObject::InvokeMetaMethod, _id=20, _a=0x7fffffffcad0) at /home/glow/dev/paraview/pv1/build/Qt/Core/pqCore_autogen/EWIEGA46WW/moc_pqAnimationScene.cpp:176
#9  0x00007ffff5abec20 in ?? () from /usr/lib/libQt5Core.so.5
#10 0x00007ffff6582e7a in vtkQtConnection::EmitExecute (this=0x5555561304b0, _t1=0x555556303070, _t2=33, _t3=0x0, _t4=0x0, _t5=0x555556130320) at /home/glow/dev/paraview/pv1/build/VTK/GUISupport/Qt/GUISupportQt_autogen/EWIEGA46WW/moc_vtkQtConnection.cpp:145
#11 0x00007ffff65be125 in vtkQtConnection::Execute (this=0x5555561304b0, caller=0x555556303070, e=33, call_data=0x0) at /home/glow/dev/paraview/pv1/src/VTK/GUISupport/Qt/vtkQtConnection.cxx:71
#12 0x00007ffff65be0b2 in vtkQtConnection::DoCallback (vtk_obj=0x555556303070, event=33, client_data=0x5555561304b0, call_data=0x0) at /home/glow/dev/paraview/pv1/src/VTK/GUISupport/Qt/vtkQtConnection.cxx:63
#13 0x00007fffeda56cd7 in vtkCallbackCommand::Execute (this=0x555556130320, caller=0x555556303070, event=33, callData=0x0) at /home/glow/dev/paraview/pv1/src/VTK/Common/Core/vtkCallbackCommand.cxx:42
#14 0x00007fffedcd9589 in vtkSubjectHelper::InvokeEvent (this=0x555556303310, event=33, callData=0x0, self=0x555556303070) at /home/glow/dev/paraview/pv1/src/VTK/Common/Core/vtkObject.cxx:650
#15 0x00007fffedcd9b33 in vtkObject::InvokeEvent (this=0x555556303070, event=33, callData=0x0) at /home/glow/dev/paraview/pv1/src/VTK/Common/Core/vtkObject.cxx:819
#16 0x00007fffedcd9cfe in vtkObject::Modified (this=0x555556303070) at /home/glow/dev/paraview/pv1/src/VTK/Common/Core/vtkObject.cxx:884
#17 0x00007ffff53a08a6 in vtkSMProperty::Modified (this=0x555556303070) at /home/glow/dev/paraview/pv1/src/Remoting/ServerManager/vtkSMProperty.h:499
#18 0x00007ffff5493503 in vtkSMProxyProperty::LoadState (this=0x555556303070, element=0x55555f8b96e0, loader=0x55555812c590) at /home/glow/dev/paraview/pv1/src/Remoting/ServerManager/vtkSMProxyProperty.cxx:458
#19 0x00007ffff546b5ed in vtkSMProxy::LoadXMLState (this=0x5555563024b0, proxyElement=0x55555812c770, locator=0x55555812c590) at /home/glow/dev/paraview/pv1/src/Remoting/ServerManager/vtkSMProxy.cxx:2164
#20 0x00007ffff056b456 in vtkSMAnimationSceneProxy::LoadXMLState (this=0x5555563024b0, element=0x55555812c770, locator=0x55555812c590) at /home/glow/dev/paraview/pv1/src/Remoting/Animation/vtkSMAnimationSceneProxy.cxx:265
#21 0x00007ffff53913cf in vtkSMDeserializerXML::LoadProxyState (this=0x55555812c490, element=0x55555812c770, proxy=0x5555563024b0, locator=0x55555812c590) at /home/glow/dev/paraview/pv1/src/Remoting/ServerManager/vtkSMDeserializerXML.cxx:88
#22 0x00007ffff5390ff8 in vtkSMDeserializerXML::NewProxy (this=0x55555812c490, id=320122, locator=0x55555812c590) at /home/glow/dev/paraview/pv1/src/Remoting/ServerManager/vtkSMDeserializerXML.cxx:58
#23 0x00007ffff548902a in vtkSMProxyLocator::NewProxy (this=0x55555812c590, id=320122) at /home/glow/dev/paraview/pv1/src/Remoting/ServerManager/vtkSMProxyLocator.cxx:111
#24 0x00007ffff5488f6d in vtkSMProxyLocator::LocateProxy (this=0x55555812c590, id=320122) at /home/glow/dev/paraview/pv1/src/Remoting/ServerManager/vtkSMProxyLocator.cxx:88
#25 0x00007ffff54f3377 in vtkSMStateLoader::HandleProxyCollection (this=0x55555812c490, collectionElement=0x55555984a3a0) at /home/glow/dev/paraview/pv1/src/Remoting/ServerManager/vtkSMStateLoader.cxx:430
#26 0x00007ffff54f50b3 in vtkSMStateLoader::LoadStateInternal (this=0x55555812c490, parent=0x55555964f1b0) at /home/glow/dev/paraview/pv1/src/Remoting/ServerManager/vtkSMStateLoader.cxx:666
#27 0x00007ffff54f4559 in vtkSMStateLoader::LoadState (this=0x55555812c490, elem=0x55555964f1b0, keepOriginalId=false) at /home/glow/dev/paraview/pv1/src/Remoting/ServerManager/vtkSMStateLoader.cxx:543
#28 0x00007ffff54c2b20 in vtkSMSessionProxyManager::LoadXMLState (this=0x555556015330, rootElement=0x55555964f1b0, loader=0x0, keepOriginalIds=false) at /home/glow/dev/paraview/pv1/src/Remoting/ServerManager/vtkSMSessionProxyManager.cxx:1244
#29 0x00007ffff53e483c in vtkSMLoadStateOptionsProxy::Load (this=0x55555f50b330) at /home/glow/dev/paraview/pv1/src/Remoting/ServerManager/vtkSMLoadStateOptionsProxy.cxx:670
#30 0x00007ffff79e3086 in pqLoadStateReaction::loadState (filename=..., dialogBlocked=false, server=0x5555560166a0) at /home/glow/dev/paraview/pv1/src/Qt/ApplicationComponents/pqLoadStateReaction.cxx:114

Please open an issue on https://gitlab.kitware.com/paraview/paraview/issues/

FYI @nicolas.vuaille

Done - see here:

https://gitlab.kitware.com/paraview/paraview/-/issues/21782