Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - adumais

Pages: [1]
1
Hello,

I downloaded v1.7.2 and it fixed the warning LNK4099, so thanks!

Now we went further in integrating just::thread in our applications and encountered 2 new problems.

PROBLEM #1

When a DLL using justthread_check_vc10x64_mdd.lib is dynamically loaded with LoadLibrary, we get a crash.

For example (otxt.dll is our dynamically loaded DLL that uses Just::Thread) :

               msvcr100d.dll!_NMSG_WRITE()  + 0x9f octets 
               msvcr100d.dll!abort()  + 0x24 octets     
>>>>>   otxt.dll!__jss::`anonymous namespace'::`dynamic initializer for 'sym_manager''()  Ligne 309 + 0x2a octets        C++
               msvcr100d.dll!_initterm()  + 0x2c octets             
               otxt.dll!_CRT_INIT(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Ligne 289 C
               otxt.dll!__DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Ligne 506 + 0x13 octets   C
               otxt.dll!_DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved)  Ligne 477             C
               ntdll.dll!000000007763b0d8()     
                [Les frames ci-dessous sont peut-être incorrects et/ou manquants, aucun symbole chargé pour ntdll.dll]         
               ntdll.dll!000000007762784a()     
                ntdll.dll!0000000077627b2e()     
                KernelBase.dll!000007fefdd2c71f()       
                KernelBase.dll!000007fefdd2a951()       
                kernel32.dll!00000000773970a4()           
                obase.dll!rdll_Open(const char * ModuleName)  Ligne 28 + 0xe octets               C++
               obase.dll!msg_DllInit(const char * DllName)  Ligne 31 + 0xa octets         C++
               obase.dll!err_SetExecMode(err_ExecMode_ch Mode)  Ligne 36 + 0xc octets  C++
               iniget.exe!mainImpl(int argc, char * * argv)  Ligne 37    C++
               iniget.exe!main(int argc, char * * argv)  Ligne 229 + 0xe octets C++
               iniget.exe!__tmainCRTStartup()  Ligne 555 + 0x19 octets            C
               iniget.exe!mainCRTStartup()  Ligne 371               C
               kernel32.dll!000000007739652d()           
                ntdll.dll!000000007762c521()     

There's only one thread started in the process when that crash occurs.

This problem is not encountered with justthread_vc10x64_mdd.lib.


PROBLEM #2

With justthread_vc10x64_mdd.lib (since we're a bit stuck with the check version), there is another problem.

I get a crash in a thread that has not been started using std::thread and that is trying tu use a recursive_mutex:

>             obase.dll!__jss::__recursive_mutex_impl<__jss::mutex>::__owned_by_this_thread()  Ligne 43 + 0x5 octets                C++
               obase.dll!__jss::__recursive_mutex_impl<__jss::mutex>::lock()  Ligne 81 + 0xa octets              C++
               obase.dll!std::recursive_mutex::lock()  Ligne 164           C++
               obase.dll!std::lock_guard<std::recursive_mutex>::lock_guard<std::recursive_mutex>(std::recursive_mutex & m_)  Ligne 70               C++
               obase.dll!rms_ObjectClose(void * Handle)  Ligne 33 + 0x11 octets         C++
               [Code externe]               
               owrapnet.DLL!wrms_Component_c::!wrms_Component_c() Ligne 68                C++
               [Code externe]               
               kernel32.dll!000000007739652d()           
                [Les frames ci-dessous sont peut-être incorrects et/ou manquants, aucun symbole chargé pour kernel32.dll]               
               ntdll.dll!000000007762c521()     

This thread was created before obase.dll (that uses JustThread) was loaded. Someone here suspects that it is related to that fact. We had a similar problem with Thread Local Storage a couple of years ago: when declaring a TLS in a DLL using Microsoft approach, the storage was not automatically created for threads that existed prior to loading that DLL, we had to implement something for that special case.

These threads are created by the system, so on our side we have no control over them, hence no possible workaround...

Otherwise, recursive_mutex seems to work properly on the main thread.

Any cue about these issues?

Thanks a lot!
Alexandre

2
Hello,

I am using just::thread V1.7.0.

I get warning LNK4099 when linking with library justthread_check_vc10x64_mdd.lib.  For example (the english version of this warning is «PDB 'filename' was not found with 'object/library' or at 'path'; linking object as if no debug info».):

justthread_check_vc10x64_mdd.lib(thread.cmddx64.vc10.obj) : warning LNK4099: PDB 'vc100.pdb' n'a pu être trouvé avec 'justthread_check_vc10x64_mdd.lib(thread.cmddx64.vc10.obj)' ou sur 'c:\gsm\jt\load_dbg\vc100.pdb' ; l'objet sera lié sans informations de débogage
justthread_check_vc10x64_mdd.lib(future_errors.cmddx64.vc10.obj) : warning LNK4099: PDB 'vc100.pdb' n'a pu être trouvé avec 'justthread_check_vc10x64_mdd.lib(future_errors.cmddx64.vc10.obj)' ou sur 'c:\gsm\jt\load_dbg\vc100.pdb' ; l'objet sera lié sans informations de débogage
justthread_check_vc10x64_mdd.lib(mutex.cmddx64.vc10.obj) : warning LNK4099: PDB 'vc100.pdb' n'a pu être trouvé avec 'justthread_check_vc10x64_mdd.lib(mutex.cmddx64.vc10.obj)' ou sur 'c:\gsm\jt\load_dbg\vc100.pdb' ; l'objet sera lié sans informations de débogage
justthread_check_vc10x64_mdd.lib(atomic.cmddx64.vc10.obj) : warning LNK4099: PDB 'vc100.pdb' n'a pu être trouvé avec 'justthread_check_vc10x64_mdd.lib(atomic.cmddx64.vc10.obj)' ou sur 'c:\gsm\jt\load_dbg\vc100.pdb' ; l'objet sera lié sans informations de débogage
justthread_check_vc10x64_mdd.lib(chrono.cmddx64.vc10.obj) : warning LNK4099: PDB 'vc100.pdb' n'a pu être trouvé avec 'justthread_check_vc10x64_mdd.lib(chrono.cmddx64.vc10.obj)' ou sur 'c:\gsm\jt\load_dbg\vc100.pdb' ; l'objet sera lié sans informations de débogage
justthread_check_vc10x64_mdd.lib(thread_exit_handlers.cmddx64.vc10.obj) : warning LNK4099: PDB 'vc100.pdb' n'a pu être trouvé avec 'justthread_check_vc10x64_mdd.lib(thread_exit_handlers.cmddx64.vc10.obj)' ou sur 'c:\gsm\jt\load_dbg\vc100.pdb' ; l'objet sera lié sans informations de débogage
justthread_check_vc10x64_mdd.lib(waitable_timer.cmddx64.vc10.obj) : warning LNK4099: PDB 'vc100.pdb'  n'a pu être trouvé avec 'justthread_check_vc10x64_mdd.lib(waitable_timer.cmddx64.vc10.obj)' ou sur 'c:\gsm\jt\load_dbg\vc100.pdb' ; l'objet sera lié sans informations de débogage

When using justthread_vc10x64_mdd.lib or justthread_vc10x64_md.lib, everything is fine. 

We would like to always use *vc10*check*mdd.lib in debug mode and *vc10*md.lib in release mode, but no compilation or link warning is allowed in our environment. Is there something I can do to fix this or should there be .pdb files provided with the *check* libraries?

Thanks!
Alexandre


Pages: [1]