# Is there a way to see the call stack that caused the crash in vtk?

**URL:** https://discourse.vtk.org/t/is-there-a-way-to-see-the-call-stack-that-caused-the-crash-in-vtk/11969
**Category:** Support
**Created:** [July 19, 2023, 1:47am UTC](https://discourse.vtk.org/t/is-there-a-way-to-see-the-call-stack-that-caused-the-crash-in-vtk/11969 "2023-07-19T01:47:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![gongwaner](https://discourse.vtk.org/user_avatar/discourse.vtk.org/gongwaner/32/6996_2.png) [@gongwaner](https://discourse.vtk.org/u/gongwaner)
#### Post date: [July 19, 2023, 1:47am UTC](https://discourse.vtk.org/t/is-there-a-way-to-see-the-call-stack-that-caused-the-crash-in-vtk/11969/1 "2023-07-19T01:47:23Z")

</div>

I was running into crash recently. Usually vtk output window pops up and reports error messages. The errors are usually in the following format:  
ERROR: In {path\_to\_vtk\_lib}/somefile.cxx: some error messages…

It doesn’t show me the call stack of this error, therefore it’s sometimes hard to debug such errors.  
Is there a way to see the call stack/trace that lead to such errors?

Thanks

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cory.quammen/32/6751_2.png) [@cory.quammen](https://discourse.vtk.org/u/cory.quammen)
#### Post date: [July 21, 2023, 7:24pm UTC](https://discourse.vtk.org/t/is-there-a-way-to-see-the-call-stack-that-caused-the-crash-in-vtk/11969/2 "2023-07-21T19:24:44Z")

</div>

> [@gongwaner](#):
>
> It doesn’t show me the call stack of this error, therefore it’s sometimes hard to debug such errors.  
> Is there a way to see the call stack/trace that lead to such errors?

If you have VTK built in Debug or RelWithDebInfo modes, you can set a breakpoint in your debugger at that error and examine the stack if that breakpoint is hit. The error gives the filename and line number which is the information you need to set the breakpoint.

---

<div class="post-metadata">

### Author: ![gongwaner](https://discourse.vtk.org/user_avatar/discourse.vtk.org/gongwaner/32/6996_2.png) [@gongwaner](https://discourse.vtk.org/u/gongwaner)
#### Post date: [July 22, 2023, 2:32am UTC](https://discourse.vtk.org/t/is-there-a-way-to-see-the-call-stack-that-caused-the-crash-in-vtk/11969/3 "2023-07-22T02:32:27Z")

</div>

Thanks for reply.I see.
