masoud khanlo
masoud khanlo

Reputation: 307

ImageReader Access violation with release config in gdcm

I want to use the x64 gdcm library in my c++ app and it works in debug builds, But when i make a build with release configuration then i have :

Access violation reading location 0x0000000000000008.

When calling getDataSet() function :

gdcm::File &file = reader.GetFile();
gdcm::DataSet dataset = file.GetDataSet();

Can anyone help me to i fix this problem?

Thanks

Upvotes: 1

Views: 66

Answers (1)

Trantor
Trantor

Reputation: 766

If everything is ok with your file object (and its reference), then the right way to call GetDataSet method seems to be:

const gdcm::DataSet &ds = file.GetDataSet();

So you get the reference to the internals and don't try to copy them; at least this is how it works in my code.

Upvotes: 0

Related Questions