0

I'm stumped on a crash here. I have in the past been able to load .cimg files fine. These files are saved with the CImg.save() function. Paths look like:

"C:\\NionProjects\\TestEnvironment\\Data\\NionCCD\\NionCCD1010Plugin\\Dark_ExpTimeus=121536_Bin=1_DualReadout=1.cimg"

(no spaces)

I'm getting a stack overflow here:

NionCCD1010_x64.dll!cimg_library::CImgList<float>::_load_cimg(_iobuf * const file, const char * const filename) Line 45175  C++

Loading this image with a simple standalone DLL works fine - so the image data itself seems to be OK.

CImg.h is included in multiple DLL's in this system. Is that a possible source of confusion? The call stack looks OK to me:

NionCCD1010_x64.dll!__chkstk()  Unknown
NionCCD1010_x64.dll!cimg_library::CImgList<float>::_load_cimg(_iobuf * const file, const char * const filename) Line 45175  C++
NionCCD1010_x64.dll!cimg_library::CImg<float>::load_cimg(const char * const filename, const char axis, const float align) Line 38130    C++
NionCCD1010_x64.dll!cimg_library::CImg<float>::load(const char * const filename) Line 36485 C++

Are there any other considerations I'm missing?

msarahan
  • 1,081
  • 9
  • 20

1 Answers1

0

This was a red herring, likely due to managed code. I was not being careful enough, and some confusion was going on between things compiled as native, and others as managed. When I removed my attempts to force things to be native (#pragma managed(push,off)), then the crash when away.

msarahan
  • 1,081
  • 9
  • 20