Status: New Owner: ---- Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any
New issue 83 by adamn...@gmail.com: DirView expand fails when bad symlinks encountered http://code.google.com/p/gambas/issues/detail?id=83 1) This problem regards the DirView control in both GB2 and GB3 (and the DirChooser control as well) The issue is a little obscure and it is important to see the bug and not the symptom, so please bear with me. The issue arises if there is a broken symbolic link in a subdirectory below the root directory shown by the DirView. The bug occurs if some action is taken on the directory while the DirView is expanding (via one of the events). When the broken link is encountered, gambas correctly raises an error and thus control is returned to the application. However, if the application does not handle the error execution continues but the bug is apparent. The bug is that the remainder of the subdirectory with the broken link AND ALL OTHER DIRECTORIES AT THE SAME LEVEL ARE IGNORED BY THE DIRVIEW. I have attached a demonstration project (GB3) that shows one way to expose the bug. Note the stress is on "one way", there are others but the demo project shows it as simply as I can. 2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate): Version: TRUNK and 2.23.? Revision: r4032 Operating system: Linux Distribution: Gentoo based Architecture: x86 GUI component: GTK+ Desktop used: LXDE 3) Provide a little project that reproduces the bug or the crash. Attached. 4) If your project needs a database, try to provide it, or part of it. N/A 5) Explain clearly how to reproduce the bug or the crash. This project creates a set of subdirectories under itself to demonstrate the problem. The instructions are: a) When the program starts, the dirview shows its own directory, ignore this b) Click on "1. Set up demo". This creates a heirarchy of directories beneath the project directory in a directory called "testbed", each of the 5 directories contains 5 subdirectories. Except Dir3, which contains an extra directory (Subdir2a) that will be used for the demonstration. c) Expand the directories in the dirview so you can understand the structure. Each directory contains a symlink to a picture in the project directory, which d) Make sure that "Dir3" is expanded and selected. e) Click on "2. Make bad symlink". This sets up the problem so it can be seen. (It changes the icon link for SubDir2a to a new picture and then deletes that picture. Thus creating a broken symbolic link) f) Click on "3. Show Bug". This refreshes the DirView. Which now only shows two directories in Dir3. The other 4 are ignored. The sequence of buttons can be repeated. 6) By doing that carefully, you have done 50% of the bug fix job! Finally, I repeat. This is one way of making the bug occur. Obviously there is a workaround for the demo in that the DirView1_Icon handler should do a Try DirView1.Icon = Picture.Load(Path &/ "icon.png" If Error ... However, in my situation the bug is occurring in a DirView1_Change handler that does not involve setting the icon. It is occurring in a non-interactive piece of code far removed from the form code and where the error has been consumed silently because other (expected) run time errors are handled. Oh, I almost forgot. This demo also somehow results in circular references. I am not sure if that is related or not. Attachments: badsymlinks-0.0.1.tar.gz 742 KB ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user