# Help with error message: In vtkDataArray.cxx, line 525 vtkIdTypeArray Type mismatch: Source: float Dest: idtype

**URL:** https://discourse.paraview.org/t/help-with-error-message-in-vtkdataarray-cxx-line-525-vtkidtypearray-type-mismatch-source-float-dest-idtype/7288
**Category:** ParaView Support
**Tags:** vtk
**Created:** [May 25, 2021, 9:46am UTC](https://discourse.paraview.org/t/help-with-error-message-in-vtkdataarray-cxx-line-525-vtkidtypearray-type-mismatch-source-float-dest-idtype/7288 "2021-05-25T09:46:38Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![samridhsharma](https://discourse.paraview.org/user_avatar/discourse.paraview.org/samridhsharma/32/6756_2.png) [@samridhsharma](https://discourse.paraview.org/u/samridhsharma)
#### Post date: [May 25, 2021, 9:46am UTC](https://discourse.paraview.org/t/help-with-error-message-in-vtkdataarray-cxx-line-525-vtkidtypearray-type-mismatch-source-float-dest-idtype/7288/1 "2021-05-25T09:46:38Z")

</div>

When selecting cells and performing “Plot selection over time”, paraview gives following error:

`ERROR: In /build/paraview-vlxewD/paraview-5.7.0/VTK/Common/Core/vtkDataArray.cxx, line 525 vtkIdTypeArray (0x55bae0649ea0): Type mismatch: Source: float Dest: idtype`

And the plot of my variables with time I get is wrong.  
Please help me fix this, I couldn’t find any thread resolving this problem.

 ![parav_forum](https://discourse.paraview.org/uploads/default/original/2X/b/bc58c405ff942ea3dc1d2481bb9956ac85a0d618.png)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 26, 2021, 7:39am UTC](https://discourse.paraview.org/t/help-with-error-message-in-vtkdataarray-cxx-line-525-vtkidtypearray-type-mismatch-source-float-dest-idtype/7288/2 "2021-05-26T07:39:47Z")

</div>

please share a data to reproduce the issue.

---

<div class="post-metadata">

### Author: ![samridhsharma](https://discourse.paraview.org/user_avatar/discourse.paraview.org/samridhsharma/32/6756_2.png) [@samridhsharma](https://discourse.paraview.org/u/samridhsharma)
#### Post date: [May 27, 2021, 7:01am UTC](https://discourse.paraview.org/t/help-with-error-message-in-vtkdataarray-cxx-line-525-vtkidtypearray-type-mismatch-source-float-dest-idtype/7288/3 "2021-05-27T07:01:36Z")

</div>

Hello Mathieu,

I use my own custom solver, so can only share data, which is 1.2 GB in size.  
Is it okay if I send you its google drive link?

Also, I wanted to ask: how does paraview calculates average, max and min value of field variables. Like when I select the cells of my model and get plot over time, what does it do (operating scheme) to calculate these values. Any source code I could look into, because I am unable to search any. Just need to make sure of what it’s doing.

Regards,  
Samridh Sharma

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 27, 2021, 7:37am UTC](https://discourse.paraview.org/t/help-with-error-message-in-vtkdataarray-cxx-line-525-vtkidtypearray-type-mismatch-source-float-dest-idtype/7288/4 "2021-05-27T07:37:22Z")

</div>

> [@samridhsharma](#):
>
> Is it okay if I send you its google drive link?

Yes

> [@](#):
>
> Also, I wanted to ask: how does paraview calculates average, max and min value of field variables. Like when I select the cells of my model and get plot over time, what does it do (operating scheme) to calculate these values. Any source code I could look into, because I am unable to search any. Just need to make sure of what it’s doing.

vtkProbeLineFilter : [https://gitlab.kitware.com/vtk/vtk/-/blob/master/Filters/Parallel/vtkProbeLineFilter.cxx](https://gitlab.kitware.com/vtk/vtk/-/blob/master/Filters/Parallel/vtkProbeLineFilter.cxx)

---

<div class="post-metadata">

### Author: ![samridhsharma](https://discourse.paraview.org/user_avatar/discourse.paraview.org/samridhsharma/32/6756_2.png) [@samridhsharma](https://discourse.paraview.org/u/samridhsharma)
#### Post date: [May 27, 2021, 10:17am UTC](https://discourse.paraview.org/t/help-with-error-message-in-vtkdataarray-cxx-line-525-vtkidtypearray-type-mismatch-source-float-dest-idtype/7288/5 "2021-05-27T10:17:02Z")

</div>

Hello Mathieu,

Following is the link to my data : [cavity - Google Drive](https://drive.google.com/drive/folders/1U4pY14eiIj1lDQVzS3iHIkUNYzAuhX9F?usp=sharing)

What I have been doing so far:

1. Load case.foam on paraview.
2. select complete mesh (through) //using ‘f’ from keyboard
3. Select Plot selection over time, and Apply
4. Plot completes and error is there in output message.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 27, 2021, 1:07pm UTC](https://discourse.paraview.org/t/help-with-error-message-in-vtkdataarray-cxx-line-525-vtkidtypearray-type-mismatch-source-float-dest-idtype/7288/6 "2021-05-27T13:07:59Z")

</div>

The `U_0` is causing these issues (as well as instabilities). I suspect a small bug in the OpenFOAMReader and in ParaView in general.

A simple work around is to uncheck U\_0 in the OpenFOAM reader cell arrays to load.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 27, 2021, 1:47pm UTC](https://discourse.paraview.org/t/help-with-error-message-in-vtkdataarray-cxx-line-525-vtkidtypearray-type-mismatch-source-float-dest-idtype/7288/7 "2021-05-27T13:47:13Z")

</div>

@olesenm FYI

---

<div class="post-metadata">

### Author: ![samridhsharma](https://discourse.paraview.org/user_avatar/discourse.paraview.org/samridhsharma/32/6756_2.png) [@samridhsharma](https://discourse.paraview.org/u/samridhsharma)
#### Post date: [May 27, 2021, 4:05pm UTC](https://discourse.paraview.org/t/help-with-error-message-in-vtkdataarray-cxx-line-525-vtkidtypearray-type-mismatch-source-float-dest-idtype/7288/8 "2021-05-27T16:05:38Z")

</div>

> [@mwestphal](#):
>
> The `U_0` is causing these issues (as well as instabilities). I suspect a small bug in the OpenFOAMReader and in ParaView in general.
> 
> A simple work around is to uncheck U\_0 in the OpenFOAM reader cell arrays to load.

Thanks, this works!

---

<div class="post-metadata">

### Author: ![olesenm](https://discourse.paraview.org/user_avatar/discourse.paraview.org/olesenm/32/17416_2.png) [@olesenm](https://discourse.paraview.org/u/olesenm)
#### Post date: [May 28, 2021, 7:37pm UTC](https://discourse.paraview.org/t/help-with-error-message-in-vtkdataarray-cxx-line-525-vtkidtypearray-type-mismatch-source-float-dest-idtype/7288/9 "2021-05-28T19:37:55Z")

</div>

> [@mwestphal](#):
>
> @olesenm FYI

Was waiting for an issue, or consensus on this, but already have the following code roughed in the OpenFOAM reader:

```auto
#if VTK_FOAMFILE_IGNORE_FIELD_RESTART
    else if (len > 2 && (fieldFile[len - 2] == '_') && (fieldFile[len - 1] == '0'))
    {
      // Exclude "*_0" restart files
      continue;
    }
#endif

```

I would vote for ignoring these restart files, but someone else should make it a VTK issue instead of me just deciding this unilaterally.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 29, 2021, 9:02am UTC](https://discourse.paraview.org/t/help-with-error-message-in-vtkdataarray-cxx-line-525-vtkidtypearray-type-mismatch-source-float-dest-idtype/7288/10 "2021-05-29T09:02:24Z")

</div>

I have no idea what these array are for, but they should not break ParaView. Is the issue related to the name ?
