Home > pthread cond t example > pthread_cond_destroy error 16

Pthread_cond_destroy Error 16

Contents

to stop osgViewer from listening to ESCkey? It frequently results into Error: pthread_cond_destroy(,)returned error status, status = 16. I want to control ESC key myself.Thanks. Alberto Luaces 2012-08-04 18:38:41 UTC PermalinkRaw Message

Pthread_cond_t Example

Post by michael kapelkoHi.Can anybody please tell me how to stop osgViewer pthread_cond_t structure from listening to ESCkey? It frequently results into Error: pthread_cond_destroy(,)returned error status, status = 16. I want to

Pthread_cond_initializer

control ESC key myself.I think if you write an osgGA::GUIEventHandler that reports that youhandled the ESC key (by returning true), the viewer won't do its ownprocessing.--Alberto Jean-Sébastien Guay 2012-08-04 21:51:50 pthread_cond_t example in c UTC PermalinkRaw Message Post by Alberto LuacesI think if you write an osgGA::GUIEventHandler that reports that youhandled the ESC key (by returning true), the viewer won't do its ownprocessing.In addition to this, I suggest you look into the following methods ofthe osgViewer::ViewerBase class (which both CompositeViewer and Viewerinherit):/** Set the key event that the viewer checks on each frame tosee if pthread cond init the viewer's done flag should be set to* signal end of viewers main loop.* Default value is Escape (osgGA::GUIEVentAdapter::KEY_Escape).* Setting to 0 switches off the feature.*/void setKeyEventSetsDone(int key) { _keyEventSetsDone = key; }/** get the key event that the viewer checks on each frame tosee if the viewer's done flag.*/int getKeyEventSetsDone() const { return _keyEventSetsDone; }/** if the flag is true, the viewer set its done flag when aQUIT_APPLICATION is received, false disables this feature */void setQuitEventSetsDone(bool flag) { _quitEventSetsDone = flag; }/** @return true if the viewer respond to theQUIT_APPLICATION-event */bool getQuitEventSetsDone() const { return _quitEventSetsDone; }Hope this helps,J-S--______________________________________________________Jean-Sebastien Guay jean_seb-XzQKRVe1yT0V+D8aMU/***@public.gmane.orghttp://whitestar02.dyndns-web.com/ michael kapelko 2012-08-05 05:39:24 UTC PermalinkRaw Message Thanks. ViewerBase::setKeyEventSetsDone(0) did help so that Viewerdoesn't listen to ESC, but now when I call ViewerBase::setDone(true)myself, Viewer still fails to exit and prints:Error: pthread_cond_destroy(,) returned error status, status = 16after that, only Ctrl+C helps, because app hangs.What is this and how do I fight it?Thanks. 3 Replies 3 Views Switch to linear view Disable enhanced parsing Permalink to this page Thread Navigation michael kapelko 2012-08-04 08:03:00 UTC Alberto Luaces 2012-08-04 18:

Discuss PROOF, the Parallel ROOT Facility, here. Moderator: rootdev Post Reply Search Advanced search First unread post • 8 posts • Page 1 of

Pthread_condattr_t

1 EugenyBoger Posts: 33 Joined: Sun Feb 14, 2010 16:43 Location: pthread mutex destroy JINR Dubna gProof->GetManager()->GetFile doesn't work Quote Unread postby EugenyBoger » Fri Feb 19, 2010 15:22 Hello, I'm

Pthread Cond Example

trying to use gProof->GetManager()->GetFile in the (compiled) program after a PROOF session and in such a case GetFile hangs at 16Kb or so. It doesn't work even when http://osg-users.openscenegraph.narkive.com/79t3fVfQ/esc-key-error-pthread-cond-destroy-returned-error-status-status-16 I'm closing the session first and then call TProof::Mgr()->GetFIle(). However, in the ROOT console TProof::Mgr()->GetFIle() works just fine. ROOT version: 5.26 Top ganis Posts: 986 Joined: Tue Sep 02, 2003 11:18 Location: CERN Quote Unread postby ganis » Sat Feb 20, 2010 9:07 Dear Eugeny, Could you please provide the simplest code which after compilation reproduces https://root.cern.ch/phpBB3/viewtopic.php?t=9900 the problem? Please give also details about the way you compile it. Gerri Ganis Top EugenyBoger Posts: 33 Joined: Sun Feb 14, 2010 16:43 Location: JINR Dubna Quote Unread postby EugenyBoger » Sat Feb 20, 2010 12:34 As I just realized, it fails even in CINT. This works fine: Code: Select allbash-3.00$ rm /tmp/xrd
bash-3.00$ root -l
root [0] TProof::Mgr("lxslc22")->GetFile("/afs/ihep.ac.cn/users/e/eugenyboger/root/bin/xrd","/tmp/")
[GetFile] Total 2.03 MB |====================| 100.00 % [11.8 MB/s]
(Int_t)0
root [1]
And this one does not:Code: Select allbash-3.00$ rm /tmp/xrd
bash-3.00$ root -l
root [0] p = TProof::Open("lxslc22")
Starting master: opening connection ...
Starting master: OK
Opening connections to workers: OK (6 workers)
Setting up worker servers: OK (6 workers)
PROOF set to parallel mode (6 workers)
(class TProof*)0x84f9770
root [1] TProof::Mgr("lxslc22")->Get

ESC key? It frequently results into Error: pthread_cond_destroy(,) returned error http://osdir.com/ml/osg-users/2012-08/msg00031.html status, status = 16. I want to control ESC http://abstrakraft.org/cwiid/ticket/16 key myself. Thanks. _______________________________________________ osg-users mailing list osg-users@xxxxxxxxxxxxxxxxxxxxxxxx http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Thread at a glance: Previous Message by Date: Re: [osg-users] [build] Error Compile osgAndroidExampleGLES1 as far as i know this problem only occurs when you build pthread_cond_t example on windows. she sent me some instructions (in french) and i made a half-assed attempt to do it properly, but since i already have it running in linux i can't be bothered to finish it. so i will post 2 links to documents that might pthread_cond_destroy error 16 or might not help you. her instructions in french: https://docs.google.com/document/d/16MM_Tn3biDAvc5el8-_RF_VT-nsmi0Bab_u5Trryj00/edit my attempt in english: https://docs.google.com/document/d/1yXpnZjbLAhNu_1uMMBju2-F0cSP-udGajHshc4gMZ4A/edit hope it helps you. ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49162#49162 _______________________________________________ osg-users mailing list osg-users@xxxxxxxxxxxxxxxxxxxxxxxx http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Previous Message by Thread: Re: [osg-users] [build] Error Compile osgAndroidExampleGLES1 as far as i know this problem only occurs when you build on windows. she sent me some instructions (in french) and i made a half-assed attempt to do it properly, but since i already have it running in linux i can't be bothered to finish it. so i will post 2 links to documents that might or might not help you. her instructions in french: https://docs.google.com/document/d/16MM_Tn3biDAvc5el8-_RF_VT-nsmi0Bab_u5Trryj00/edit my attempt in english: https://docs.google.com/document/d/1yXpnZjbLAhNu_1uMMBju2-F0cSP-udGajHshc4gMZ4A/edit hope it helps you. ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49162#49162 _______________________________________________ osg-users mailing list osg-users@xxxxxxxxxxxxxxxxxxxxxxxx http://lists.open

9 years ago Fix "Error freeing dispatch queue" Reported by: dsmith Owned by: dsmith Priority: minor Milestone: Version 1.0 Component: libcwiid Version: 0.5.02 Keywords: pthread dispatch queue Cc: Description I get an occasional error message (listed above). Due to race condition/multi-threading issue, probably in dispatch cancellation logic. Change History Changed 10 years ago by dsmith status changed from new to assigned Changed 10 years ago by dsmith status changed from assigned to closed resolution set to wontfix Changed 10 years ago by etaurel@… status changed from closed to reopened resolution wontfix deleted Hi, I think there is a way to solve this problem. The error comes from the "queue_free" function of the queue management and more specifically from the "pthread_cond_destroy()" in this function. This call returns the error code EBUSY. I think this system call returns this error due to the thread cancellation while it was waiting in the same condition variable (only a guess) Anyway, by modifying the code in the following way, I do not have error message any more. while (pthread_cond_destroy(&queue->cond) == EBUSY) { pthread_cond_broadcast(queue->cond); } The code passes only once in this loop. Hoping this help Emmanuel Taurel Changed 10 years ago by dsmith I'll leave the ticket open in case there's another 0.5 release, but the API overhaul in 0.6 gets rid of the queues. I hadn't noticed that one, but there's another condition in which the dispatch thread can try to lock a mutex that's already been destroyed. Thanks for the fix. Changed 9 years ago by dsmith status changed from reopened to closed resolution set to wontfix To be reopened if there's another 0.5 release (unlikely). Note: See TracTickets for help on using tickets. Download in other formats: Comma-delimited Text Tab-delimited Text RSS Feed Powered by Trac 0.11.7 By Edgewall Software. webmasterdonnie.smith at gatech.edu

 

Related content

No related pages.