Re-execute the same instance of an application is dangerous
Mantis Issue 731, reported by mgrizonnet, assigned to salbert, created: 2013-06-24
step to reproduce :
- Run extract ROI on only 4 channels of a MS WV2 image (8 bands)
- after the ingestion of the output, do not close the Extract ROI application tab and restart the Extract ROI on the 8 bands.
The application crashes (code dumped) with the above message (assert on the histogram size):
mvd2-catalogue: /home/grizonnetm/projets/otb/src/Monteverdi2/Code/Common/Core/mvdHistogramModel.h :310 : mvd::HistogramModel::MeasurementType mvd::HistogramModel::Quantile(unsigned int, double, mvd::Bound) const: l'assertion « band<m_Histograms->Size() » a échoué. Abandon (core dumped)
1373969991 - salbertBug reproduced with monteverdi2-0.3.1 not directly but after manual editing of color-setup.
This bug might be due to the fact that output image of OTB-application overwrites input image of dataset and that ingesting dataset tests emptiness of dataset directory to choose between loading or importing. Thus, after second run of OTB-application, dataset is reloaded (instead of imported) using the 4-band histogram and not the 8-band histogram.
Maybe a flag in DatasetModel::BuildContext which forces import of dataset may solve the problem.
1374575482 - salbert- Added forced import flag when importing overwritten result of OTB application;
- Added confirm overwrite message-box when executing OTB application;
- Changed File/Open to File/Import (using forced import flag);
- Improved dataset consistency check by using file creation date of dataset and input image (upgrading XML descriptor file).
1379578233 - salbertFixed before releasing v-0.4.