DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Sun, 2017-04-23, 06:32

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri, 2014-10-24, 18:15 
Offline

Joined: Fri, 2012-05-11, 20:57
Posts: 11
I am using dcmtk-3.6.1_20140617. I have recompiled as /MD. I have recoded img2dcm and dcmsend to library functions (Same as I did in 3.5.4). I recoded everything back to /MT and I still have the exact some problem.

The img2dcm calls are working fine. Its the DcmSend code that is having problems, always crashing here:

bool
Logger::isEnabledFor (LogLevel ll) const
{
return value->isEnabledFor (ll);
}

Setting #define LOG4CPLUS_DISABLE_TRACE does not seem to matter.

Adding this:

dcmtk::log4cplus::Logger log = dcmtk::log4cplus::Logger::getRoot();
log.removeAllAppenders();
log.addAppender(nullapp);

Does not seem to matter. Any ideas? I read the other post (another person with the same crash, but I did not see any resolution). Any hints would be very helpful. It appears to be heap corruption.

Thanks!

Adding more info. The problem always occurs in the while loop adding dicom files:

while (if_iter != if_last)
{
currentFilename = (*if_iter).c_str();
/* and add them to the list of instances to be transmitted */
status = storageSCU.addDicomFile(currentFilename, opt_readMode, opt_checkUIDValues); <=== problem is here. Status is always good but the heap is corrupted
if (status.bad())

/* check for empty filename */
if (strlen(currentFilename) == 0)
currentFilename = "<empty string>";
/* if something went wrong, we either terminate or ignore the file */
if (opt_haltOnInvalidFile)
{
//OFLOG_FATAL(dcmsendLogger, "bad DICOM file: " << currentFilename << ": " << status.text());
CString strFileName = currentFilename;
CString strStatus = status.text();
CString strMessage = _T("bad DICOM file: ") + strFileName + _T(" status: ") + strStatus;
char * message = (char *) strMessage.GetString();
m_pCPrimDICOMCtrl->LogMsg(0, message);
cleanup();
//m_pCPrimDICOMCtrl->SendComplete(0, EXITCODE_INVALID_INPUT_FILE);
return eERROR_INVALID_INPUT_FILE;
} else {

//OFLOG_WARN(dcmsendLogger, "bad DICOM file: " << currentFilename << ": " << status.text() << ", ignoring file");
}
++numInvalidFiles;
}
++if_iter;
}


Top
 Profile  
 
PostPosted: Fri, 2014-10-24, 20:43 
Offline

Joined: Fri, 2012-05-11, 20:57
Posts: 11
I meant to post this is general. Is there a way to move this? (Sorry...)

Thanks!


Top
 Profile  
 
PostPosted: Mon, 2014-10-27, 16:10 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 1805
Location: Oldenburg, Germany
Quote:
I have recoded img2dcm and dcmsend to library functions

What do you mean by that? Both tools are actually based on C++ classes.


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: Bing [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:  
Powered by phpBB® Forum Software © phpBB Group