seeing-things / zwo

ZWO SDK and custom software for debugging and using it.
23 stars 4 forks source link

Crashed when AGC slider switched to 1 #67

Closed bgottula closed 1 year ago

bgottula commented 2 years ago

Got the following when I moved the AGC slider from 0 to 1

terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(4.2.0) ../modules/highgui/src/window_gtk.cpp:1510: error: (-27:Null pointer) No trackbar found in function 'cvSetTrackbarPos'

Prior to moving that slider I had moved exposure time and gain sliders. I started the program with a file argument but had not started writing to the file yet.

This was on commit b81107d3.

bgottula commented 1 year ago

I found the problem. I changed the name of the exposure time trackbar from "exposure time" to "exposure time [us]" when it's created but forgot to change this later in the code where the position of the trackbars are set.

https://github.com/seeing-things/zwo/blob/master/capture/src/preview.cpp#L147 https://github.com/seeing-things/zwo/blob/master/capture/src/preview.cpp#L259