Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, April 1, 2015 7:46:46 PM(UTC)

Joshua  
Joshua

Groups: Registered
Posts: 28


Hi there,

We've got a bunch of Unit Tests (written using XUnit) in our application that load DicomDataSet instances as part of their functionality. They work fine when run in the Visual Studio 2013 test runner, but when run on our build server (TeamCity) random tests (i.e. always a different one) occasionally fail due to an exception calling the DicomDataSet.Load() method. The exception stack trace of the failed tests always ends in "Leadtools.Dicom.DicomException : Improper file format.".

Before loading a DicomDataSet instance we call the following functions every time:
RasterSupport.Unlock(RasterSupportType.MedicalNet, LEADTOOLS_MEDICAL_KEY);
DicomEngine.Startup();

I know that the XUnit test runner for MSBuild (which is what our build server is running the tests with) creates a new thread for each test, and I'm pretty sure it runs the tests in parallel. I thought that calling these two methods before creating a DicomDataSet instance would be sufficient to ensure that the leadtools enviorment is fully initialized though.

Do you have any idea what would be causing this crash?

We're using the 64 bit .net dll's. The Leadtools.dll has version number 16.5.5.33 and the Leadtools.Dicom.dll has version number 16.5.5.29. Upgrading the dll's is not an option for us at this point in time as it would require a complete re-test of our software that we're not prepared to do right now.

Regards,
Josh
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, April 5, 2015 6:04:37 AM(UTC)

mohamed  
mohamed

Groups: Registered, Tech Support
Posts: 179


Josh,
The build number of the DLLs you're using are not the latest for version 16.x, which as you know is not the current version of LEADTOOLS.
In any case, try to make sure that no more than one thread tries to access the same Dicom data set (or any other disk file) at the same time.
It may be OK to read from the same file using 2 or more threads as long as none of the threads tries to lock the file. Does your Load call use the DicomDataSetLoadFlags.LoadAndClose flag?

Note: It is definitely is not proper to try to write to the same file from multiple threads.
Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.072 seconds.