MantisBT - ParaView
View Issue Details
0006565ParaView(No Category)public2008-03-07 15:332009-05-13 13:47
Clinton Stimpson 
Zhanping Liu 
normalminoralways
closedfixed 
 
3.6 
0006565: Exodus writer crash on data arrays without names
Create a line source,
clean to grid filter
then save data as an exodus file.

The line source added a TCoords array without a name, and the Exodus writer shouldn't crash on that.

The line source should probably give that array a name too.
No tags attached.
jpg junkScreen.JPG (188,900) 2008-11-19 18:12
https://www.vtk.org/Bug/file/6854/junkScreen.JPG
jpg

txt Log_vtkLineSource.txt (689) 2008-11-20 10:08
https://www.vtk.org/Bug/file/6855/Log_vtkLineSource.txt
txt Log_vtkExodusIIWriter.txt (2,264) 2008-11-20 10:09
https://www.vtk.org/Bug/file/6856/Log_vtkExodusIIWriter.txt
cxx vtkExodusIIWriter.cxx (92,087) 2008-11-20 10:09
https://www.vtk.org/Bug/file/6858/vtkExodusIIWriter.cxx
Issue History
2008-03-07 15:33Clinton StimpsonNew Issue
2008-04-10 17:13Ken MorelandCategoryDevelopment => 3.6
2008-09-23 11:23Berk GeveciStatusbacklog => tabled
2008-09-23 11:23Berk GeveciAssigned To => Zhanping Liu
2008-10-10 16:32Zhanping LiuNote Added: 0013849
2008-10-10 16:32Zhanping LiuStatustabled => @80@
2008-10-24 20:09Alan ScottNote Added: 0013930
2008-10-24 20:09Alan ScottStatus@80@ => @20@
2008-10-24 20:09Alan ScottResolutionopen => reopened
2008-10-24 22:13Zhanping LiuNote Added: 0013933
2008-10-24 22:14Zhanping LiuStatus@20@ => @80@
2008-10-24 23:08Clinton StimpsonNote Added: 0013934
2008-10-24 23:08Clinton StimpsonStatus@80@ => @20@
2008-10-25 01:42Zhanping LiuNote Added: 0013935
2008-10-25 01:43Zhanping LiuStatus@20@ => @80@
2008-11-13 09:22Utkarsh AyachitNote Added: 0014098
2008-11-19 18:12Alan ScottNote Added: 0014141
2008-11-19 18:12Alan ScottStatus@80@ => @30@
2008-11-19 18:12Alan ScottFile Added: junkScreen.JPG
2008-11-19 18:15Alan ScottNote Added: 0014142
2008-11-19 18:15Alan ScottStatus@30@ => @20@
2008-11-19 18:55Clinton StimpsonNote Added: 0014146
2008-11-20 10:08Zhanping LiuFile Added: Log_vtkLineSource.txt
2008-11-20 10:09Zhanping LiuFile Added: Log_vtkExodusIIWriter.txt
2008-11-20 10:09Zhanping LiuFile Added: vtkExodusIIWriter.h
2008-11-20 10:09Zhanping LiuFile Added: vtkExodusIIWriter.cxx
2008-11-20 10:13Zhanping LiuFile Deleted: vtkExodusIIWriter.h
2008-11-20 10:33Zhanping LiuNote Added: 0014148
2008-11-20 10:34Zhanping LiuStatus@20@ => @80@
2008-11-20 10:55Utkarsh AyachitNote Added: 0014149
2008-12-04 22:02Alan ScottNote Added: 0014297
2008-12-04 22:02Alan ScottStatus@80@ => closed
2008-12-04 22:02Alan ScottResolutionreopened => fixed
2009-05-13 13:47Utkarsh AyachitTarget Version => 3.6
2011-06-16 13:10Zack GalbreathCategory => (No Category)

Notes
(0013849)
Zhanping Liu   
2008-10-10 16:32   
The bug has been fixed.

It was due to not providing a name for

   ==========================
   vtkFloatArray *newTCoords;
   ==========================
  
   in vtkLineSource::RequestData() --- line 85 ~ line 88

   =====================================
   newTCoords = vtkFloatArray::New();
   newTCoords->SetNumberOfComponents(2);
   newTCoords->Allocate(2*numPts);
   newLines = vtkCellArray::New();
   =====================================
   
   which is, though, then evaluated in tkExodusIIWriter::FlattenOutVariableNames() --- line 1027 --- through

   ======================================
   if (strlen(nms[i]) > MAX_STR_LENGTH-2)
   ======================================

   Now a name "Texture Coordinates" has been provided in the very segment

   ==========================================
   newTCoords = vtkFloatArray::New();
   newTCoords->SetNumberOfComponents(2);
   newTCoords->Allocate(2*numPts);
   newTCoords->SetName("Texture Coordinates");
   ===========================================

   and the bug is hence fixed.

   Thanks for reporting the bug.

   new revision: 1.48; previous revision: 1.47
(0013930)
Alan Scott   
2008-10-24 20:09   
This still crashes as of the current ParaView trunk. You list lines changed, but not the name of the file. Thus, I cannot check to see if I have pulled this file.
(0013933)
Zhanping Liu   
2008-10-24 22:13   
As mentioned in my explanation on Oct 10, I made the fix in vtkLineSource::RequestData(), a function which is certainly in file vtkLineSource.cxx because the name of a VTK class (here "vtkLineSource") is the same as the name of the associated "cxx" file (here "vtkLineSource.cxx" under "ParaView3\VTK\Graphics\"). Please note that there is no change to vtkExodusIIWriter.cxx regarding this fix.

Now this issue can be closed. If you find further problems, please let me know.
(0013934)
Clinton Stimpson   
2008-10-24 23:08   
I had an issue with another data set. I wanted the Exodus reader fixed so it would check for null pointers and not crash. I simply used a vtkLineSource to reproduce the problem I was seeing.
(0013935)
Zhanping Liu   
2008-10-25 01:42   
Sorry, but I do not understand the problem you have right now. Since a name ("Texture Coordinates") has been assigned in vtkLineSource::RequestData(), no null pointers are now checked in tkExodusIIWriter::FlattenOutVariableNames(). If you still find further problems with vtkLineSource COUPLED WITH vtkExodusIIWriter, please let me know and also please upload your dataset or please tell me the exact procedures used to reproduce the problem. For problems not caused by vtkLineSource COUPLED WITH vtkExodusIIWriter, please create a new report.

Thanks.
(0014098)
Utkarsh Ayachit   
2008-11-13 09:22   
Nathan has already (on Nov 07, 2008) committed a fix to the writer so that it produces an error message "Array in input has Null name, cannot proceed" and does not crash. I tested the same by locally reverting the changes to vtkLineSource.cxx and saving the file as exodus. I got the nice error message without any crashes.
(0014141)
Alan Scott   
2008-11-19 18:12   
It still crashes for me. I am attaching a screenshot from how it crashed.

Clint - can you replicate this fix?

alan
(0014142)
Alan Scott   
2008-11-19 18:15   
Sorry, should have been moved to feedback.
(0014146)
Clinton Stimpson   
2008-11-19 18:55   
That error message means that the exodus writer is not available.

Someone asked me today about the exodus code and found it had been disabled in VTK recently. Perhaps that's why you're having that problem. Paraview shouldn't crash in that case either, so that looks like another bug report :)
(0014148)
Zhanping Liu   
2008-11-20 10:33   
It seems fixing this bug has become complicated.

When I was fixing this bug in Oct, the version of vtkExodusIIWriter.cxx on my PC is 1.23 (2008/4/28 20:28:42. In other words, I forgot to update it with the then latest version 1.26. see "vtkExodusIIWriter.cxx" and "Log_vtkExodusIIWriter.txt" for version 1.23 and the log). Thus I made changes to ONLY vtkLineSource.cxx (see "Log_vtkLineSource.txt" from the atatchment for the log) and the bug was just fixed.

    In a word, this bug was fixed based on version 1.23 of vtkExodusIIWriter.cxx. As vtkExodusIIWriter.cxx has been modified so much since Sept 26, the bug might appear again.

    According to Clinton, the exodus writer is not available now. Fixing the bug is more complicated.

    I apologize for not updating vtkExodusIIWriter.cxx timely before fixing the bug.

    Thanks.
(0014149)
Utkarsh Ayachit   
2008-11-20 10:55   
In conclusion:
* When Alan tried to reproduce this bug someone had (apparently) disabled the writer. Now it looks like the writer is back enabled and hence should work as expected.
* ParaView is not crashing, it's 'aborting' -- giving up since it does not know what to do if it cannot create the requested VTKObject. It's the developer error that one simply disabled the Exodus writer without disabling it's use in ParaView. This a temporary bug and now seems to be non-issue since the writer is enabled.
* Nathan has fixed the original issue in the writer to not crash but spit out an error when non-named arrays are encountered.
(0014297)
Alan Scott   
2008-12-04 22:02   
Tested client/server.