Closed dsand closed 2 years ago
Update. @pndaly thinks this could be a gclib issue and will investigate.
OK, after the Xmas break I took a look at the code. I think gclib is exonerated as things are now working OK with the independent Galil_DMC_22x0_CLI code (which has gclib dependencies only and is nothing to do with INDI). I rebuilt the INDI driver and it still failed so I dug into the code. Since the failure is a 'child process termination', it smacked of a memory violation. I isolated the line(s) where is was failing:
_gfiltn = (int)round(tcp_val.lv.gfiltn); gfilter_changeS[_gfiltn - 1].s = ISS_ON;
So, the problem is that gfiltn initializes to 99999.0 and the array specifies indexes 0-6. Fixing that with:
if (_gfiltn>=0 && _gfiltn<=BOK_GFILTERS) { gfilter_changeS[_gfiltn - 1].s = ISS_ON; // Subtract one since zero based }
and re-building the driver makes everything work again. There may be other instances like this so I'll check the code.
In short, the only thing I can think of (since the source code didn't change before/after the 'apt update' that caused the problem), is that the GCC compiler is now much more strict in run-time and causes the segmentation fault.
Clear as mud?
quotes from Phil. Do not want to lose this thread.