Summary: | Crash when quickly switching to previous/next image [backtrace] | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Dik Takken <kde> |
Component: | DImg-Processing | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | caulier.gilles |
Priority: | VHI | ||
Version: | 0.9.0 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 0.9.0 | |
Sentry Crash Report: | |||
Attachments: | fix a presumed race condition |
Description
Dik Takken
2006-12-12 20:07:28 UTC
Marcel, Look like the crash sound into threaded image io implementation... Gilles Created attachment 18924 [details]
fix a presumed race condition
Please test if this patch fixes your problem. I cannot reproduce the crash
here, but there might be a race condition there that I overlooked.
Toogle to VHI. Must be fixed before 0.9.0-final release Gilles It also seems like RC2 is a lot slower than Beta2. It takes about three seconds to go to the next image, with color management turned off. Does this make sense to you? I might find some time to compile DigiKam from SVN one of these days. I guess the above patch has been committed? There is a lots of debug statements in the colnsole witch can take a while. If you compile digiKam using --enable-final option, all statements are removed and reactivity is speed up. Gilles Dik, No, the patch have not been yet commited. I'm waiting your feedback Gilles I forgot to say that I also experienced this crash 10 days ago. I was not sure if it was related to something wrong with my system or not. But, it was easy to reproduce using shift+mouse-wheel. Anyway, I just tried the patch and it solves the problem ! So, I think you can commit ;-) Thanks Fabien... Dik, can you confirm please ? Gilles Bueeeek! Not so fast, I'm a busy dude too.. :) I will remove my Gentoo packages and try a manual compile tonight, stay tuned. Ok, the patch appears to work for me too. Nice job! SVN commit 613773 by cgilles: digikam from trunk : Patch from Marcel to fix a race condition in threaded image I/O witch can crash digiKam in image editor. BUG: 138715 M +13 -4 loadsavetask.cpp --- trunk/extragear/graphics/digikam/libs/threadimageio/loadsavetask.cpp #613772:613773 @@ -171,6 +171,8 @@ m_usedProcess->removeListener(this); // wake up the process which is waiting until all listeners have removed themselves lock.wakeAll(); + // set to 0, as checked in setStatus + m_usedProcess = 0; //DDebug() << "SharedLoadingTask " << this << ": waited" << endl; return; } @@ -279,6 +281,8 @@ // wait until all listeners have removed themselves while (m_listeners.count() != 0) lock.timedWait(); + // set to 0, as checked in setStatus + m_usedProcess = 0; } }; @@ -311,10 +315,15 @@ { LoadingCache *cache = LoadingCache::cache(); LoadingCache::CacheLock lock(cache); - // remove this from list of listeners - check in continueQuery() of active thread - m_usedProcess->removeListener(this); - // wake all listeners - particularly this - from waiting on cache condvar - lock.wakeAll(); + + // check for m_usedProcess, to avoid race condition that it has finished before + if (m_usedProcess) + { + // remove this from list of listeners - check in continueQuery() of active thread + m_usedProcess->removeListener(this); + // wake all listeners - particularly this - from waiting on cache condvar + lock.wakeAll(); + } } } |