Ask Your Question

Revision history [back]

I've had a very closely related problem (crash in DeviceInfo query, only in release). I narrowed it down to the DeviceInfo structure itself, and it's use of std::string for storing name_. There seemed to be conflict between the way my application laid out the std::string internal members and the way the opencv dll did it, but I don't have a definite answer. What I did to fix it is go into the opencv source, make 'name_' a char[256] (same as cudaDeviceProps), change the string assignment to a strcpy and just cast to std::string in the getter (so not to break the interface). Seems fine now.