Bug 119222 - Catalogmanager aborts while constantly showing a flickering "data" subdirectory above the usual catalogs
Summary: Catalogmanager aborts while constantly showing a flickering "data" subdirecto...
Status: RESOLVED FIXED
Alias: None
Product: kbabel
Classification: Unclassified
Component: CatalogManager (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Stanislav Visnovsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-30 11:01 UTC by Stephan Johach
Modified: 2007-04-06 22:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Johach 2005-12-30 11:01:37 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc (GCC) 3.3.3
 
OS:                Linux

Since KDE 3.5 I have a problem using catalogmanager.

On opening there are two catalogs shown: messages and docmessages.

Now doing an svn update while catalogmanager is running the display becomes flickering and there's a "data" entry shown, which is constantly
shown and hidden and another entry autom4the.cache shortly appearing until catalogmanager silently disappears.

Starting it from konsole only shows a message like: 

hunsum@leviathan:~/svn/kde3.5$ catalogmanager &
[1] 685
hunsum@leviathan:~/svn/kde3.5$ catalogmanager: WARNING: Old project format assumed
catalogmanager: WARNING: KDataTool desktop file error (0x8258b68). 1 commands and 2 descriptions.
catalogmanager: WARNING: KDataTool desktop file error (0x8258b68). 1 commands and 2 descriptions.
kdecore (KAction): WARNING: KActionCollection::setWidget(): tried to change widget from [KDirOperator pointer (0x82f0e90) to widget KFileDialog::ops, geometry=100x30+0+0] to [KFileDialog pointer (0xbfffd0d0) to widget filedialog, geometry=576x345+288+259]
catalogmanager: WARNING: Old project format assumed

[1]+  Segmentation fault      catalogmanager
hunsum@leviathan:~/svn/kde3.5$

Steps to reproduce:

Open a project and set the the dir for pot-files to

<folder>/templates

set the folder for po-files to

<folder>/de

Wait until catalogmanager has read in the catalogs.

Now open a konsole

Change dir to eg. <folder>/de/messages/extragear-graphics

do a 

touch *.po

Catalogmanager starts flickering after a short while. The "data"
entry appears.

Perhaps catalagmanager has problems handling a directory not present under "templates".
Comment 1 Stephan Johach 2005-12-30 11:33:55 UTC
Using kdebugdialog I got the following traces on konsole.

Beware: I only did a "touch" in <folder>de/messages/extragear-graphics.

[ ... skipped many messages like this ...]
catalogmanager: directory changed: /data/koffice/
catalogmanager: building dir: /data/
catalogmanager: skipping /data/kdeedu/khangman/
catalogmanager: skipping /data/kdeedu/kturtle/
catalogmanager: skipping /data/kdeedu/
catalogmanager: skipping /data/kdegames/ktuberling/
catalogmanager: skipping /data/kdegames/
catalogmanager: skipping /data/koffice/autocorrect/
catalogmanager: skipping /data/koffice/
catalogmanager: directory changed: /data/koffice/autocorrect/
catalogmanager: building dir: /data/
catalogmanager: skipping /data/kdeedu/khangman/
catalogmanager: skipping /data/kdeedu/kturtle/
catalogmanager: skipping /data/kdeedu/
catalogmanager: skipping /data/kdegames/ktuberling/
catalogmanager: skipping /data/kdegames/
catalogmanager: skipping /data/koffice/autocorrect/
catalogmanager: skipping /data/koffice/
catalogmanager: directory changed: /docmessages/
catalogmanager: updating dir /docmessages/
catalogmanager: directory changed: /docmessages/extragear-graphics/
catalogmanager: updating dir /docmessages/extragear-graphics/
catalogmanager: directory changed: /docmessages/extragear-multimedia/
catalogmanager: updating dir /docmessages/extragear-multimedia/
catalogmanager: directory changed: /docmessages/extragear-network/
catalogmanager: updating dir /docmessages/extragear-network/
catalogmanager: directory changed: /docmessages/kdeaccessibility/
catalogmanager: updating dir /docmessages/kdeaccessibility/

[1]+  Segmentation fault      catalogmanager
Comment 2 Nicolas Goutte 2005-12-30 21:00:18 UTC
I do not know what is happening.

A directory being in the PO directory but not in the POT one should not be a problem, at least I do not have a problem with the "internal" directory of trunk/l10n/xx

Just to be sure: you have a file system that is precise to the second, so no VFAT (or any older Windows/MS-DOS file system).

Also in the data directory, you have no file name ending in .po , have you?

Have a nice day!
Comment 3 Stephan Johach 2005-12-30 22:10:26 UTC
No po file under "data". This is the output of ls -R:

hunsum@leviathan:~/svn/kde3.5/l10n/de/data$ ls -R
.:
Makefile  Makefile.am  Makefile.in  kdeedu  kdegames  koffice

./kdeedu:
Makefile  Makefile.am  Makefile.in  khangman  kturtle

./kdeedu/khangman:
IMPROVE.txt  Makefile  Makefile.am  Makefile.in  animals.kvtml  de.txt  easy.kvtml  hard.kvtml  medium.kvtml

./kdeedu/kturtle:
Makefile     beispiel1.logo  einmaleins.logo               logokeywords.de_DE.xml  pfeil.logo            werbung.logo
Makefile.am  dreieck.logo    locken.logo                   nikolaus.logo           quadrat.logo          zufallsname.logo
Makefile.in  dreiecke.logo   logohighlightstyle.de_DE.xml  papierfarben.logo       quadrateimkreis.logo

./kdegames:
Makefile  Makefile.am  Makefile.in  ktuberling

./kdegames/ktuberling:
Makefile     Makefile.in    auge.wav        brille.wav  haare.wav  ohr.wav      schnurrbart.wav
Makefile.am  abzeichen.wav  augenbraue.wav  fliege.wav  hut.wav    ohrring.wav  uhr.wav

./koffice:
Makefile  Makefile.am  Makefile.in  autocorrect

./koffice/autocorrect:
Makefile  Makefile.am  Makefile.in  de.xml
hunsum@leviathan:~/svn/kde3.5/l10n/de/data$
Comment 4 Stephan Johach 2005-12-30 23:54:38 UTC
This trace looks like an endless loop. It is stoped when I close catalogmanager. The single '/' looks somehow suspicious.

catalogmanager: building dir: /autom4te.cache/
catalogmanager: directory changed: /
catalogmanager: updating dir /
catalogmanager: directory changed: /autom4te.cache/
catalogmanager: building dir: /autom4te.cache/
catalogmanager: directory changed: /
catalogmanager: updating dir /
catalogmanager: directory changed: /autom4te.cache/
catalogmanager: building dir: /autom4te.cache/
catalogmanager: directory changed: /
catalogmanager: updating dir /
catalogmanager: directory changed: /autom4te.cache/
catalogmanager: building dir: /autom4te.cache/
catalogmanager: directory changed: /
catalogmanager: updating dir /
Comment 5 Stephan Johach 2005-12-31 14:57:30 UTC
I put some additional kdDebug() traces in. And it looks like after a "touch *.po" catalogmanager is eternally doing the following steps. Perhaps you have
to open a catalog in the view to get the flickering started.

The traces starting with "catalogmanager: directory changed: /autom4te.cache/" are looping. The directories are skipped until the processing again reaches /de. Then it starts processing autom4te.cache and data again.

If you like I can send you the complete (and rather long) trace by mail.

Here's the relevant part, when the looping starts:

catalogmanager: void CatalogManagerView::directoryChanged(const QString& dir)/home/hunsum/svn/kde3.5/l10n/de
catalogmanager: directory changed: /
catalogmanager: updating dir /
catalogmanager: void CatalogManagerView::directoryChanged(const QString& dir)/home/hunsum/svn/kde3.5/l10n/de/autom4te.cache
catalogmanager: directory changed: /autom4te.cache/
catalogmanager: building dir: /autom4te.cache/
catalogmanager: bool CatalogManagerView::buildDir(QString relDir,bool fast)/autom4te.cache/
catalogmanager: CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir, const QString extension , bool fast)/home/hunsum/svn/kde3.5/l10n/templates /autom4te.cache/ .pot
catalogmanager: CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir, const QString extension , bool fast)/home/hunsum/svn/kde3.5/l10n/de /autom4te.cache/ .po
catalogmanager: void CatalogManagerView::deleteDirItem(QString relDir)/autom4te.cache/
catalogmanager: void CatalogManagerView::directoryChanged(const QString& dir)/home/hunsum/svn/kde3.5/l10n/de/data
catalogmanager: directory changed: /data/
catalogmanager: building dir: /data/
catalogmanager: bool CatalogManagerView::buildDir(QString relDir,bool fast)/data/
catalogmanager: CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir, const QString extension , bool fast)/home/hunsum/svn/kde3.5/l10n/templates /data/ .pot
catalogmanager: CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir, const QString extension , bool fast)/home/hunsum/svn/kde3.5/l10n/de /data/ .po
catalogmanager: CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir, const QString extension , bool fast)/home/hunsum/svn/kde3.5/l10n/de /data/kdeedu/ .po
catalogmanager: CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir, const QString extension , bool fast)/home/hunsum/svn/kde3.5/l10n/de /data/kdeedu/khangman/ .po
catalogmanager: skipping /data/kdeedu/khangman/
catalogmanager: void CatalogManagerView::deleteDirItem(QString relDir)/data/kdeedu/khangman/
catalogmanager: CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir, const QString extension , bool fast)/home/hunsum/svn/kde3.5/l10n/de /data/kdeedu/kturtle/ .po
catalogmanager: skipping /data/kdeedu/kturtle/
catalogmanager: void CatalogManagerView::deleteDirItem(QString relDir)/data/kdeedu/kturtle/
catalogmanager: skipping /data/kdeedu/
catalogmanager: void CatalogManagerView::deleteDirItem(QString relDir)/data/kdeedu/
catalogmanager: CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir, const QString extension , bool fast)/home/hunsum/svn/kde3.5/l10n/de /data/kdegames/ .po
catalogmanager: CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir, const QString extension , bool fast)/home/hunsum/svn/kde3.5/l10n/de /data/kdegames/ktuberling/ .po
catalogmanager: skipping /data/kdegames/ktuberling/
catalogmanager: void CatalogManagerView::deleteDirItem(QString relDir)/data/kdegames/ktuberling/
catalogmanager: skipping /data/kdegames/
catalogmanager: void CatalogManagerView::deleteDirItem(QString relDir)/data/kdegames/
catalogmanager: CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir, const QString extension , bool fast)/home/hunsum/svn/kde3.5/l10n/de /data/koffice/ .po
catalogmanager: CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir, const QString extension , bool fast)/home/hunsum/svn/kde3.5/l10n/de /data/koffice/autocorrect/ .po
catalogmanager: skipping /data/koffice/autocorrect/
catalogmanager: void CatalogManagerView::deleteDirItem(QString relDir)/data/koffice/autocorrect/
catalogmanager: skipping /data/koffice/
catalogmanager: void CatalogManagerView::deleteDirItem(QString relDir)/data/koffice/
catalogmanager: void CatalogManagerView::deleteDirItem(QString relDir)/data/
catalogmanager: void CatalogManagerView::directoryChanged(const QString& dir)/home/hunsum/svn/kde3.5/l10n/de
catalogmanager: directory changed: /
catalogmanager: updating dir /
catalogmanager: void CatalogManagerView::directoryChanged(const QString& dir)/home/hunsum/svn/kde3.5/l10n/de/autom4te.cache
catalogmanager: directory changed: /autom4te.cache/
catalogmanager: building dir: /autom4te.cache/
catalogmanager: bool CatalogManagerView::buildDir(QString relDir,bool fast)/autom4te.cache/
catalogmanager: CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir, const QString extension , bool 
Comment 6 Nicolas Goutte 2006-01-05 18:33:11 UTC
I am wondering how much the KDirWatch fixes that were rencently made in KDE 
3.5.x would affect or fix that problem.

(Also I suppose that I do not see any problem, as my system uses (direct) 
polling and neither any library nor Linux to check for changed files.)

Have a nice day!
Comment 7 Stephan Johach 2006-01-06 14:38:47 UTC
I enabled KDirWatch debug output and it stated using the "stat" method. 

I switched then to dnotify today with recent kdelibs from branch and the problem disappeared, at least until now. I did the above mentioned "touch *.po" several times, and no flickering any more.

So KDirWatch seems indeed to have some influence on the issue.
Comment 8 Thomas Reitelbach 2006-01-08 14:17:34 UTC
I can confirm that the bug exists. As soon as i switched to dnotify the bug disappeared.

So it seems the bug is somehow related to KDirWatch.

Bye,
Thomas
Comment 9 Thomas Reitelbach 2006-01-08 15:33:34 UTC
Hm, it seems i have to correct my previous comment :(

The bug is not fixed when using dnotify, it is just delayed until i minimize and restore the catalogmanager window. So with dnotify enabled the bug is triggered by restoring catalogmanager window or by switching desktops.

Hm, funny ;-)
Comment 10 Thomas Reitelbach 2006-01-08 17:10:41 UTC
*argh* i have to correct myself _again_ :-(
dnotify wasn't working correctly on my system when i wrote the previous comment. now it is working and the bug definitely is fixed with it being enabled.

But my previous comment isn't completely useless since it describes a way to reproduce/trigger the bug without dnotify :)
Comment 11 Aaron J. Seigo 2007-04-06 22:02:41 UTC
SVN commit 651172 by aseigo:

this may block the gui briefly (though testers didn't seem to notice in
any case), but most importantly it doesn't crash anymore.
BUGS:119222,129152


 M  +2 -23     catalogmanagerview.cpp  


--- branches/KDE/3.5/kdesdk/kbabel/catalogmanager/catalogmanagerview.cpp #651171:651172
@@ -323,12 +323,10 @@
    if(flag)
    {
       _updateTimer->stop();
-      if( _dirWatch ) _dirWatch->stopScan();
    }
    else
    {
       _updateTimer->start(10000);
-      if( _dirWatch ) _dirWatch->startScan();
    }
 }
 
@@ -1378,7 +1376,6 @@
 	    }
 	} else kdDebug(KBABEL_CATMAN) << "Skipping " << item->poFile() << endl;
 	emit signalSearchedFile(1);
-	kapp->processEvents(10);
 	if( _stop || _stopSearch ) {
 	    _stopSearch = false;
 	    rest.clear();
@@ -1842,11 +1839,7 @@
    while ( it.current() && !_stop)
    {
       it.current()->checkUpdate(true);
-
-      kapp->processEvents(10);
-
-      i++;
-
+      ++i;
       ++it;
    }
 
@@ -1856,11 +1849,7 @@
    while ( dit.current() && !_stop)
    {
       dit.current()->checkUpdate();
-
-      kapp->processEvents(10);
-
-      i++;
-
+      ++i;
       ++dit;
    }
 
@@ -1956,8 +1945,6 @@
 
       for (  it = entryList.constBegin(); it != entryList.constEnd() && !_stop ; ++it )
       {
-          kapp->processEvents(100);
-
 	  if( _stop ) return false;
 
           if((*it)=="." || (*it)=="..")
@@ -2059,8 +2046,6 @@
 
       for (  it = entryList.constBegin(); it != entryList.constEnd(); ++it )
       {
-          kapp->processEvents(100);
-
           if( _stop ) return;
 
           if((*it)=="." || (*it)=="..")
@@ -2143,8 +2128,6 @@
 
       for (  it = entryList.constBegin(); it != entryList.constEnd(); ++it )
       {
-          kapp->processEvents(100);
-
           if( _stop ) return;
 
           if((*it)=="." || (*it)=="..")
@@ -2237,7 +2220,6 @@
 void CatalogManagerView::directoryChanged(const QString& dir)
 {
    pause(true);
-   _dirWatch->stopScan();
 
    QString relDir, relDirPo, relDirPot;
    if(dir.startsWith(_settings.poBaseDir))
@@ -2326,7 +2308,6 @@
       updateDir(relDir);
    }
 
-   _dirWatch->startScan();
    pause(false);
 }
 
@@ -2334,7 +2315,6 @@
 void CatalogManagerView::directoryDeleted(const QString& dir)
 {
    pause(true);
-   _dirWatch->stopScan();
 
    QString relDir, relDirPo, relDirPot;
    if(dir.startsWith(_settings.poBaseDir))
@@ -2432,7 +2412,6 @@
       }
    }
 
-   _dirWatch->startScan();
    pause(false);
 }