Search code examples
wxwidgets

wxWidget error, [error due to thread concept]


i m using wxWidget and there i m using wxThread, some time things going good, sometime give unexpected result.... once i got error like:-

ass8-1-login_report: pthread_mutex_lock.c:62: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.

please anybody can tell me what is the meaning of this error


Solution

  • Basicially problem was Thread, wxThread, by default thread is Detatched , it automatically delete when finish working. here during thread alive when we check
    if( obj->IsAlive())
    , no problem but when thread end then we checked this ` if(obj -> IsAlive ) showing problem because when thread delete , there are no object of thread.still we are checking this. [ it was the main problme ]. i use a extern variable to check thread is live or dead , now my code is working fine