Hi All, When one uses PJSIP with another application, one has to register threads. thread_tls_id is a static variable in os_core_win32.cpp. It holds thread id of last thread created or registered. When a new thread is created, thread_tls_id holds its id. Consider this sequence of events: 1. main thread, thread_tls_id =1 2. new thread created, thread_tls_id=2, 3. second thread completes, thread_tls_id=2 4. main thread calls PJ_CHECK_STACK, there is no thread corresponding to id=2, so application crashes. I feel thread_tls_id should not be static in first place. What do the experts think ? -Gaurav