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 : Friday, August 1, 2008 6:12:44 AM(UTC)
marklysaght

Groups: Registered
Posts: 3


Guys,
The file version of LeadTools we're using is 15,0,0,31.
Code written in VB.Net for VS2005

Our software takes incoming files, performs some checks and shuffels them into different destinations.
Incoming tifs are checked for undue stretching and corrected. We use LeadTools to do this.

We have several worker threads each picking up a file and processing it.

RasterCodecs.Startup() is called on the main thread. RasterCodecs.Load is called on a worker thread.

Mostly everthing works well, except occasionally (and on one cleint site in particular) the call to RasterCodecs.Load fails with "Leadtools.RasterException: File not found" - trust me, the file is there.

I have a very simple test harness that will sometimes work, sometimes not.

My question is, should RasterCodecs.Startup() be called for each thread? If so, do we need an exact match between calls to StartUp() and Shutdown().

Is this a "now you see it, now you don't" because of the underlying windows threading model. If so, and assuming we should call Startup() for each thread, do we need to ensure they've been called for the underlying thread, or is it sufficient to look after .net threading only.

Any help with this would be appreciated.
Thanks,

P.S. This "appears" to go away when Startup() is called for each thread, but because it's intermittent and I don't know what caused the original problem, I don't trust it as a solution.


 

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, August 3, 2008 5:39:45 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

First, you are using an old build of LEADTOOLS DLLs. I suggest that you send your LEADTOOLS serial number to a new email to support@leadtools.com and mention this post.

About the problem itself, I can try to get a complete answer if you send me your small test harness (not your full application) in a ZIP or RAR file. You can either post it here or send it with the support email message.

 
#3 Posted : Monday, August 4, 2008 11:28:31 PM(UTC)
marklysaght

Groups: Registered
Posts: 3


Thanks, very much.
Here is the Sample application
File Attachment(s):
LeadToolsConsole.zip (5kb) downloaded 25 time(s).
 
#4 Posted : Tuesday, August 5, 2008 4:02:06 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

I tested your project using the latest LEADTOOLS v15 DLLs from the latest patches, and I did not see the problem. Is there any special steps I need to follow to see the problem? Can you test your project at your side with the latest DLLs and see if the problem is still active?
 
#5 Posted : Tuesday, August 5, 2008 6:39:33 AM(UTC)
marklysaght

Groups: Registered
Posts: 3


Hi. Can I ask are there any thread specific data initialised by RasterCodecs.Startup?

If the answer is no we can stop investigating threading and look at other environmental factors.

Thanks,
 
#6 Posted : Wednesday, August 6, 2008 6:09:30 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

RasterCodecs.Startup() initializes threading settings for the current thread. So if you have a multiple threaded application, and you want to use RasterCodecs inside the thread procedure, you need to call RasterCodecs.Startup and create a new instance of RasterCodecs inside that procedure.

 
#7 Posted : Sunday, August 10, 2008 9:56:50 PM(UTC)

Joshua  
Joshua

Groups: Registered
Posts: 28


You might want to update your doc's on this since they state: "This static (shared) method must be called before using other members of the Codecs namespace. This usually occurs at the start of your application." (http://www.leadtools.com/Help/LEADTOOLS/v15/DH/CO/Leadtools.Codecs~Leadtools.Codecs.RasterCodecs~Startup.html), which is a little vague in my opinion since if the call initializes thread specific data then it must be called on each thread that wishes to use the raster codecs class.
 
#8 Posted : Monday, August 11, 2008 8:11:56 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

I will update our .NET documentation about this.
 
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.106 seconds.