# vtksys 9.2 Debug vs. Release mode

**URL:** https://discourse.vtk.org/t/vtksys-9-2-debug-vs-release-mode/9163
**Category:** Support
**Created:** [August 17, 2022, 11:32am UTC](https://discourse.vtk.org/t/vtksys-9-2-debug-vs-release-mode/9163 "2022-08-17T11:32:21Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ShaneKirkbride](https://discourse.vtk.org/user_avatar/discourse.vtk.org/shanekirkbride/32/1392_2.png) [@ShaneKirkbride](https://discourse.vtk.org/u/ShaneKirkbride)
#### Post date: [August 17, 2022, 11:32am UTC](https://discourse.vtk.org/t/vtksys-9-2-debug-vs-release-mode/9163/1 "2022-08-17T11:32:21Z")

</div>

I’m running a windows 11 environment compiling with VS2019.

I complied 9.2.rc2 in release and in debug mode.

I followed the example: [https://kitware.github.io/vtk-examples/site/Cxx/Utilities/FilenameFunctions/](https://kitware.github.io/vtk-examples/site/Cxx/Utilities/FilenameFunctions/)

In Debug it runs fine but in Release mode I get an Access violation exception. I saw this issue here:

[https://gitlab.kitware.com/vtk/vtk/-/issues/14780](https://gitlab.kitware.com/vtk/vtk/-/issues/14780) But it looks like it was closed and never resolved. Was this ever fixed or do Windows users have to use the debug version?

---

<div class="post-metadata">

### Author: ![ShaneKirkbride](https://discourse.vtk.org/user_avatar/discourse.vtk.org/shanekirkbride/32/1392_2.png) [@ShaneKirkbride](https://discourse.vtk.org/u/ShaneKirkbride)
#### Post date: [August 17, 2022, 11:53am UTC](https://discourse.vtk.org/t/vtksys-9-2-debug-vs-release-mode/9163/2 "2022-08-17T11:53:33Z")

</div>

I also found a similiar issue with the vtkCommonColor libraries.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [August 17, 2022, 6:05pm UTC](https://discourse.vtk.org/t/vtksys-9-2-debug-vs-release-mode/9163/3 "2022-08-17T18:05:43Z")

</div>

Could you please provide the code that crashes? The issue was closed before we migrated to GitLab because it was reported to have been a mixup where some debug libraries were being loaded by the release build (or vice versa).

---

<div class="post-metadata">

### Author: ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)
#### Post date: [August 19, 2022, 11:47am UTC](https://discourse.vtk.org/t/vtksys-9-2-debug-vs-release-mode/9163/4 "2022-08-19T11:47:49Z")

</div>

If you build the debug version of VTK and then build one of the examples please ensure your paths point to the debug version of VTK. Similarly if you build the example in release mode it must use the release dlls of the VTK build. I get caught sometimes in that ifthe example is built in release mode but my system VTK path is pointing to the debug dlls, hence the crash.
