DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Mon, 2018-08-20, 23:50

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon, 2018-03-12, 18:26 
Offline

Joined: Fri, 2018-03-09, 08:47
Posts: 4
Hello, since I cannot get dcmtk3.6.3 working under a single dll and I have to go back to static library. I have to use /MD option since my project all compiled under /MD.
I had a test program which works under debug+debug lib, release+release lib. However it does not work under any other combinations. It just crashes when there is any dynamic memory allocation in the library causing heap corruption.
My problem is: I have to use dcmtk in my application with _ITERATOR_DEBUG_LEVEL=0 (some of my dll modules have to be run under release mode to keep performance). This drives me to use release version dcmtk library to work with my application. However, it crashes the same.

For example, the storescu will crash:
if (OFStandard::fileExists(currentFilename)) when the OFFilename destructor is called. The obj is constructed using strdup and destructed using free.
According to research, this kind of error might be due to different version of CRT.

Anybody has any clue on this?


Top
 Profile  
 
PostPosted: Mon, 2018-03-12, 19:57 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 1963
Location: Oldenburg, Germany
You should first try to compile the DCMTK with CMake option DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS disabled (set to "OFF"). This should set the code generation option of Visual Studio to /MD.


Top
 Profile  
 
PostPosted: Mon, 2018-03-12, 22:19 
Offline

Joined: Fri, 2018-03-09, 08:47
Posts: 4
Yes, I generate the dcmtk library with /MD exactly by the way you mentioned


Top
 Profile  
 
PostPosted: Tue, 2018-03-13, 10:05 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 1963
Location: Oldenburg, Germany
I personally never used _ITERATOR_DEBUG_LEVEL=0 but, maybe, you also need to compile the DCMTK with this setting?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

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


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group