| Author |  Topic  |  | 
              
                | am24
   
 
                30 Posts | 
                    
                      |  Posted - May 01 2014 :  05:18:20     
 |  
                      | When I try to load RAW files in the main thread and in a background thread by using the ielib32/64 DLLs, my application starts to hang. When I use the dcrawlib.dll everything works fine. 
 Without the dcrawlib, it also works when I protect loadfromfile operations with a critical section.
 
 Here's a trace report to see where it hangs without dcraw or my own critical sections (Using version 5.1.0 and Delphi XE5):
 
 main thread ($1898):
 776eefe8 +000 ntdll.dll                              RtlEnterCriticalSection
 0827af92 +052 ielib32.dll                            ?createDCRAWDecoder@IELib@ievisionexp@@UAGJAAVStream@2@AAVVectorString@2@PBX2HAAPAVDCRAWDecoder@2@@Z
 0040c129 +009 project1.exe System         35447   +6 @IntfCopy
 00895c6b +663 project1.exe ieraw           6290 +116 IEReadCameraRAWStream
 008bd404 +0b8 project1.exe imageenio      25549  +14 TImageEnIO.SyncLoadFromStreamRAW
 008bd5a3 +077 project1.exe imageenio      25624  +11 TImageEnIO.LoadFromFileRAW
 0089dcde +3ee project1.exe imageenio      10959 +102 TImageEnIO.LoadFromFile
 
 
 |  | 
              
                | xequte
      
 
                39218 Posts | 
                    
                      |  Posted - Mar 31 2016 :  03:47:25     
 |  
                      | Hi 
 IELib should be thread safe.
 
 Can you email us a small project that reproduces the issue?
 
 Nigel
 Xequte Software
 www.xequte.com
 nigel@xequte.com
 
 |  
                      |  |  | 
              
                | wesleybobato
    
 
                Brazil367 Posts
 |  | 
              
                | am24
   
 
                30 Posts | 
                    
                      |  Posted - Mar 31 2016 :  07:37:33     
 |  
                      | OK, my initial question is already 2 years old before it was answered, so many things happened in the meantime ;) 
 The crash was caused by an ImageEn helper function, but I cannot remember which one. As I could fix this myself, it runs in a thread without any problem since then.
 |  
                      |  |  | 
              
                | wesleybobato
    
 
                Brazil367 Posts
 | 
                    
                      |  Posted - Mar 31 2016 :  08:27:51     
 |  
                      | Hi 
 Please Post Your Code.
 |  
                      |  |  | 
              
                | am24
   
 
                30 Posts | 
                    
                      |  Posted - Mar 31 2016 :  08:43:58     
 |  
                      | As this is part of a commercial product I'm not able to post any code, sorry. |  
                      |  |  | 
              
                | w2m
     
 
                USA1990 Posts
 | 
                    
                      |  Posted - Mar 31 2016 :  08:47:52     
 |  
                      | Writing threads is not for the faint of heart, so without code I doubt anyone can help you.  You could recreate the part of the code where you are having problems in a small demo. 
 Bill Miller
 Adirondack Software & Graphics
 Email: w2m@hughes.net
 EBook: http://www.imageen.com/ebook/
 Custom Commercial ImageEn Development
 |  
                      |  |  | 
              
                | wesleybobato
    
 
                Brazil367 Posts
 | 
                    
                      |  Posted - Mar 31 2016 :  09:08:04     
 |  
                      | Hi 
 Build your project in DEBUG mode or Install EurekaLog
 
 Renders your routine To Cause the error.
 
 Use PrintScreen error Only.
 
 and shares in order to be able to help you.
 |  
                      |  |  | 
              
                | am24
   
 
                30 Posts | 
                    
                      |  Posted - Mar 31 2016 :  09:08:30     
 |  
                      | @w2m: Seems that you have missed my post #4 in that thread, here it is again: 
 
  OK, my initial question is already 2 years old before it was answered, so many things happened in the meantime ;)
 
 The crash was caused by an ImageEn helper function, but I cannot remember which one. As I could fix this myself, it runs in a thread without any problem since then.
 
 
 I don't have a problem with threads and everything runs perfectly well since ~2 years.
 |  
                      |  |  | 
              
                | xequte
      
 
                39218 Posts | 
                    
                      |  Posted - Mar 31 2016 :  13:19:58     
 |  
                      | Hi 
 Yes, sorry. I don't know how we missed your message the first time, but a customer brought it to my attention.
 
 
 
 Nigel
 Xequte Software
 www.xequte.com
 nigel@xequte.com
 
 |  
                      |  |  | 
              
                |  |  Topic  |  |