tvwerkhoven/FOAM — Issue #46: Check for 0-length MLA config
Author: tvwerkhoven
Created: 2012-02-25 09:15:25+00:00
State: open
Labels: main, modules

FOAM crashes when trying to calculate with 0-length vectors (i.e. when there are no subapertures defined). Add checks for all cases where this might happen, or install GSL error handlers.

Log (~December 6, 2011):

[dbg2] Device::on_message_common('grab 0 0 128 128 1 histogram') ixoncam
[dbg2] Device::on_message_common('grab 0 0 128 128 1 histogram') ixoncam
[dbg2] FOAM_ExpoAO::open_loop()
[dbg2] Device::on_message_common('grab 0 0 128 128 1 histogram') ixoncam
[dbg2] Device::on_message_common('mla del 54') ixonwfs
[xnfo] Shwfs::calibrate(): Calibrating for basis 'SENSOR'
[dbg2] Wfs::calibrate()
[dbg2] Shwfs::get_mla_str()
[dbg2] Shift::calc_shifts(uint16_t)
[info] FOAM_ExpoAO::wfs_m: -0.769 -0.42 -0.73 -0.325 -0.788 -0.47 -0.549
-0.586 -0.556 -0.59 -0.979 -0.436 -0.586 -0.686 -0.657 -0.592 -0.979 -0.439
-0.655 -0.362 -0.957 -0.635 -0.715 -0.377 -0.502 -0.466 -0.553 -0.455
-0.721 -0.456 -0.576 -0.408 -0.705 -0.362 -0.544 -0.642 -0.764 -0.433
-0.611 -0.295 -0.599 -0.355 -0.653 -0.653 -0.831 -0.632 -0.438 -0.72 -0.877
-0.341 -0.589 -0.453 -0.411 -0.644 -0.453 -0.457 -0.475 -0.601 -0.673
-0.411 -0.494 -0.373 -0.878 -0.488 -0.588 -0.319 -0.558 -0.329 -0.706
-0.547 -0.53 -0.382 -0.945 -0.413 -0.706 -0.72 -0.666 -0.357 -0.832 -0.505
-0.918 -0.412 -0.702 -0.507 -0.68 -0.471 -0.86 -0.497 -0.939 -0.527 -0.423
-0.56 -0.813 -0.491 -0.447 -0.241 -0.61 -0.553 -0.735 -0.315 -0.721 -0.485
-0.606 -0.496 -0.935 -0.605 -0.764 -0.454
gsl: blas.c:614: ERROR: invalid length
Default GSL error handler invoked.
[warn] AndorCam::cam_handler(R) no new data in 2500 milliseconds?
DRV_NO_NEW_DATA
[dbg2] Device::on_message_common('grab 0 0 128 128 1 histogram') ixoncam
[warn] AndorCam::cam_handler(R) no new data in 2500 milliseconds?
DRV_NO_NEW_DATA
[warn] AndorCam::cam_handler(R) no new data in 2500 milliseconds?
DRV_NO_NEW_DATA