I created a Visual Studio 2010 project with DCMTK 3.6.0. The project often crashes at function putAndInsertString(DCM_PatientBirthDate, ...) when I run the exe generated in Release mode. It took quite a while to find where it crashed because in Release mode codes can't run step by step and I could only add feedback information after each function. There are some stange points:
1, the problem only occurs in Release mode and in Debug mode the project will run straight to the end.
2, the problem only occurs when I run the exe directly. If i run the project in Visual Studio, no crash heppens.
3, the problem only occurs in fucntion putAndInsertString(DCM_PatientBirthDate, ...). There will be no problem at all if I delete the fucntion or change "DCM_PatientDate" to any other parameter such as putAndInsertString(DCM_PatientName, ...) or putAndInsertString(DCM_StudyDate, ...).
4, in Release mode I have to use DCMTK Release libraries which are also generagted in Release mode. Errors like "_iterator_debug_level value '0' doesn't match value '2'" will apprear if I use Debug libraries.
Is there anything special with putAndInsertString(DCM_PatientBirthDate, ...) in DCMTK Release library? Is there any difference between exe and running in Visual Studio? Thanks
A strange problem in Release mode
Moderator: Moderator Team
-
- Posts: 18
- Joined: Tue, 2007-12-18, 14:25
Re: A strange problem in Release mode
One differnece is the environment: the path where dll will be found differs. But this do not explain your problem.hemp110 wrote: Is there any difference between exe and running in Visual Studio? Thanks
I will try reproduce your error.
-
- DCMTK Developer
- Posts: 2054
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: A strange problem in Release mode
Hi,
maybe this is an old problem popping up again: The construction order of the global data dictionary and the global logger framework which could interfere. Also, re-build your application with a completely new BUILD directory (just to be sure).
After 3.6.0 there have been some changes in order to overcome the logger/dictionary problem. Maybe it is wort to try out a recent snapshot.
Best,
Michael
maybe this is an old problem popping up again: The construction order of the global data dictionary and the global logger framework which could interfere. Also, re-build your application with a completely new BUILD directory (just to be sure).
After 3.6.0 there have been some changes in order to overcome the logger/dictionary problem. Maybe it is wort to try out a recent snapshot.
Best,
Michael
Who is online
Users browsing this forum: No registered users and 1 guest