DICOM file read with dcmtk 3.6.0 crashes in CentOS 6.2 x64

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
mmilch
Posts: 1
Joined: Fri, 2012-05-11, 23:23

DICOM file read with dcmtk 3.6.0 crashes in CentOS 6.2 x64

#1 Post by mmilch » Mon, 2012-05-14, 17:30

Hello,

I have a suite of DICOM command line tools that uses dcmtk, compiled on Windows 7 64 bit and Cent OS 64 bit release 6.2. Under Linux, I use configure script to compile and static dcmtk library linking.

Switching from 3.5.4 to 3.6.0 on Cent OS resulted in crash of every DICOM tool that attempts to read a DICOM file. In particular, the code below returns no error on line 5, but then dataset on line 6 is set to NULL and "illegal condition" error is indicated. When the same code is executed again, it crashes on line 4.

The same code runs fine on Windows 7 both with 3.5.4 and 3.6.0, and on Cent OS with dcmtk 3.5.4. I thus hypothesized that a wrong Linux library is being linked in (as in FAQ #1).

Will be grateful for any leads as to how to locate the specific library that's causing the problem.

1 DcmFileFormat f;
2 DCMDataset* dataset;
3 <loop starts>
4 OFCondition res=f.loadFile(nextFile);
5 if (res.bad()) continue;
6 DCMDataset* dataset=f.getDataset();
7 if ( !dataset )
8 {
9 cout << "Could not read the dataset from " << nextFile << endl;
10 cout << f.error().text() << endl;
11 continue;
12 }
13 ...
14 (operations on dataset)
15 <loop ends>

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest