# vtkCaptionWidget crashes

**URL:** https://discourse.vtk.org/t/vtkcaptionwidget-crashes/3911
**Category:** Support
**Created:** [August 5, 2020, 9:39am UTC](https://discourse.vtk.org/t/vtkcaptionwidget-crashes/3911 "2020-08-05T09:39:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![alx](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/a/59ef9b/32.png) [@alx](https://discourse.vtk.org/u/alx)
#### Post date: [August 5, 2020, 9:39am UTC](https://discourse.vtk.org/t/vtkcaptionwidget-crashes/3911/1 "2020-08-05T09:39:47Z")

</div>

Hello,

I am trying to implement a caption widget to show the max / min locations. Unfortunately after rendering and closing the renderWindow VTK crashes. I am using Python 3.7 and VTK 8.2.0.

When I delete the code for the widget, everything works fine. All other widgets for scalar bar, coordinate system etc. are working with no problem.

captionRepresentation = vtk.vtkCaptionRepresentation()  
captionRepresentation.GetCaptionActor2D().SetCaption(“Test”)  
captionRepresentation.SetPosition(0,.85)  
captionRepresentation.SetPosition2(.45,.05)  
captionRepresentation.SetAnchorPosition(point)  
captionWidget = vtk.vtkCaptionWidget()  
captionWidget.SetInteractor(renderWindowInteractor)  
captionWidget.SetRepresentation(captionRepresentation)  
captionWidget.SetEnabled(1)

If I debug the code, Isee the following error (not always!) :

Could not convert to integer: 3221225477. Path ‘exitCode’.

The value for was either too small or too large for an Int32.

Any advice?

Alex
