Hidden directories & sidebar treeview crashing -- Long but please read

Scott Zuk szuk at telusplanet.net
Fri Feb 21 06:56:12 GMT 2003


Hi,

There have been numerous bug reports submitted to the kde bugs database from 
users that are experiencing crashing when konqueror (from kde 3.0 and up) is 
browsing hidden directories in file management mode.  The reports keep 
getting closed because the developers cannot reproduce the problem and is 
assumed fixed.  I'm currently using kde 3.1.0 from debian's unstable archives 
and unfortunately I still experience konq crashing with hidden directories.  
The good news is that I believe I've found a way to reproduce the problem so 
hopefully somebody on this list can figure out what's wrong.

First, open up the home directory in konq (kfmclient openProfile 
filemanagement) and set up a few things:  
  - make sure the navigation panel is visible and the home directory tab is 
selected (I'm assuming your home directory has hidden directories like .kde).
  - make sure "Show Hidden Files" and "Link View" are checked, and "View 
Properties Saved in Directory" is unchecked.
  - if the home directory contains a .directory file, delete it.
  - close the konq window to save the settings.

Now lets try to crash konq ;)
  1.) Open konq again (kfmclient openProfile filemanagement).  The sidebar 
tree view should only be listing all regular directories in the home 
directory but the file view will also show all the hidden files and 
directories.
  2.) Click on the .kde directory.  Then click on share and browse around.  
Everything works as expected except the sidebar tree view never changes.
  3.) Click back until you are in the home directory again.
  4.) Uncheck "Show Hidden Files".
  5.) Check "View Properties Saved in Directory"
  6.) Check "Show Hidden Files" again.  There should now be a .directory file 
in the home directory.  If you open it up it should contain ShowDotFiles=true 
under the [URL properties] section.
  7.) Uncheck "View Properties Saved in Directory" again and close konq to 
save the settings.
  8.)  Open konq again.  This time the sidebar tree view _does_ show all the 
hidden directories in addition to the regular ones.
  9-1.)  Try to expand a hidden dir in the tree view by clicking on [+].  Konq 
crashes.
  9-2.) Go back to step 8.) and click on .kde in the file view, then click on 
the directory share.  Konq crashes again.
  9-3.) Go back to step 8.) and try to expand a _regular_ directory in the 
tree view that doesn't contain a .directory file with ShowDotFiles=true.  All 
of the hidden directories in the tree view disappear.  Browsing through 
hidden dirs in the file view will work again.
  9-4.) Go back to step 8.) and close the navigation panel.  Browse more than 
one level deep into a hidden directory in the file view.  Everything will 
work fine until you open the navigation panel again and konq will crash.

It seems to me that konq crashes because the sidebar tree view is not capable 
of expanding a hidden directory, in fact it will only show them if the 
directory contains a .directory file with ShowDotFiles=true.  Each time konq 
crashes a dialog pops up but dissappears too fast to read.  My 
.xsession-errors has tons of the following assert lines:
ASSERT: "fileItem->isDir()" in 
../../../../../konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp 
(310)
ASSERT: "item" in 
../../../../../konqueror/sidebar/trees/dirtree_module/dirtree_module.cpp 
(316)

Can anybody confirm the above behavior?  I suspect it could be related to 
several similar bug reports and hope it can get fixed in time for the next 
release.

I know this is getting long but for an example of some more odd sidebar 
behavior keep reading.

  1.) Set up konq so it is in the same state as described in the beginning of 
this message (start in home dir, view hidden files, delete .directory  etc.)
  2.) Create a new directory in the home directory, I'll call it TESTDIR.
  3.) Create a new text file called .directory in TESTDIR.  Edit the file so 
it contains the following:
[URL properties] 
ShowDotFiles=true
  4.) Create a new hidden directory in TESTDIR, I'll call it .HIDDENDIR.
  5.) Close konq to save the settings and then open it again.
  6.) There should be no hidden directories shown in the sidebar tree view 
now.  Double click on TESTDIR in the sidebar to expand it.  The sidebar now 
shows all hidden dirs, including .HIDDENDIR.
  7.) Now try double clicking on a regular directory in the sidebar.  All the 
hidden dirs disappear but TESTDIR now has a [-] beside it to indicate it is 
still expanded.
  8.) Double click on TESTDIR and it collapses.
  9.) Double click on TESTDIR again to expand it.  This time the sidebar shows 
.HIDDENDIR in the sidebar treeview _twice_.
  10.) Repeat steps 7 to 9 and the sidebar will show 3, 4, 5... instances of 
.HIDDENDIR

Weird huh?

Questions, comments, need more info?  Please CC me as I'm not subscribed to 
this list.

Regards,
~Scott
  






More information about the kfm-devel mailing list