Changes between Initial Version and Version 2 of Ticket #6305
- Timestamp:
- Mar 11, 2009, 2:59:19 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #6305 – Description
initial v2 2 2 3 3 Example: 4 4 {{{ 5 5 Thread 12 (Thread 0x49396950 (LWP 11152)): 6 6 #0 0x00007fdd7ee1c2d9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 … … 38 38 #32 0x00007fdd7ca4acbd in clone () from /lib/libc.so.6 39 39 #33 0x0000000000000000 in ?? () 40 }}} 40 41 41 42 It looks there is multiple places where the QWaitCondition.wait/wakeall have been implemented incorrectly and therefore the code doesn't work as intended. 42 43 43 44 Example: 44 45 {{{ 45 46 // Qt4 requires a QMutex as a parameter... 46 47 // not sure if this is the best solution. Mutex Must be locked before wait. … … 54 55 mainpaused = true; 55 56 pauseWait.wakeAll(); 57 }}} 56 58 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 57 59 No locks around this and no predicative set 58 60 to make sure that the signal is detected in the receiver 59 61 {{{ 60 62 if (IsPaused() && tvrec) 61 63 tvrec->RecorderPaused(); 62 64 63 65 unpauseWait.wait(&mutex, 100); 66 }}} 64 67 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 65 68 Uses a bogus mutex, doesn't have a proper locking around 66 69 the wait-call and no predicative checking in order to detect 67 70 if the wake-call has already been sent before we come to the wait()-call. 68 71 {{{ 69 72 if (cleartimeonpause) 70 73 gettimeofday(&stm, &tzone); 71 74 continue; 75 }}} 72 76 ------------------------------------------------------------ 73 77