The result of this test is that the ptr->Save(…) statement crashes in the SECOND (and following) iteration(s) of the loop. The first iteration saves the envi file correctly. The exception itself is a std::domain error.
Why does the save statement crash? …; and how is it resolved??
Thanks in advance!
Iwein
Hi @iwein,
Sorry for the late response. I can reproduce the issue and this is probably a bug in CVB Spectral which will be fixed in the next release where we update CVB Spectral.
To get a fix faster, please contact support@stemmer-imaging.com. And refer to this forum post.
This is for sure a bug, and this is explicitly related with CVB’s unorthodox license policy as the unit test will prove: If you have a license file the bug does not manifest itself… so, my question is what you will fix exactly: either remove the envi/spectral license part in the envi write code (?) or will you fix the bug so that no envi files can be created if you do not have a license (?).
I contacted support@stemmer before I wrote the aforementioned post… they replied with a ~1500 Euro quote. We, in turn, kicked CVB::Spectral::ENVI out of our software - which was only one day of work
The strange part of this all is the fact that our (spinoff) company buys multiple spectral cameras each year (which are not cheat, to say the least). I would suspect that CVB/Stemmer has an agreement with the camera manufacturers in a way that we do not have to buy an extra 2k license… these are spectral cameras after all
@iwein
I need to correct my previous statement. I realized that I tested your code without having my CVB Dongle connected to the system.
When I use a valid licence, I was able to save all the images from every iteration.
So there is no bug here. To save more than the first image, you need to have a valid licence for the Image Manager and CVB Spectral.