# Bug in Cuda Partilces Problem

**URL:** <https://forums.developer.nvidia.com/t/bug-in-cuda-partilces-problem/17621>\
**Category:** CUDA Programming and Performance\
**Created:** [July 9, 2010, 4:55pm UTC](https://forums.developer.nvidia.com/t/bug-in-cuda-partilces-problem/17621 "2010-07-09T16:55:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shadi](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@shadi](https://forums.developer.nvidia.com/u/shadi)\
**Post date:** [July 9, 2010, 4:55pm UTC](https://forums.developer.nvidia.com/t/bug-in-cuda-partilces-problem/17621/1 "2010-07-09T16:55:19Z")

</div>

Hi all,

I am trying to run cuda particles demo and it works fine but when i tried to use dumpParticles method, it doesnot work . It gives an error says:

“First-chance exception at 0x0872bf50 in particles.exe: 0xC0000005: Access violation reading location 0x00000001”

Any one know the problem?

---

<div class="post-metadata">

**Author:** ![Simon\_Green](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Simon\_Green](https://forums.developer.nvidia.com/u/Simon_Green)\
**Post date:** [July 13, 2010, 9:51am UTC](https://forums.developer.nvidia.com/t/bug-in-cuda-partilces-problem/17621/2 "2010-07-13T09:51:04Z")

</div>

It looks like somebody made a mistake when updating this for the new interop API. You need to change this line in dumpParticles():

> [@](#):
>
> copyArrayFromDevice(m\_hPos, 0, m\_posVbo, sizeof(float)_4_count);

to

> [@](#):
>
> copyArrayFromDevice(m\_hPos, 0, &m\_cuda\_posvbo\_resource, sizeof(float)_4_count);

and change the function prototype in particleSystem.cuh to:

> [@](#):
>
> void copyArrayFromDevice(void\* host, const void\* device, struct cudaGraphicsResource \*\*cuda\_vbo\_resource, int size);
