[ 
https://issues.apache.org/jira/browse/PIVOT-756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048576#comment-13048576
 ] 

Yawning Angel commented on PIVOT-756:
-------------------------------------

Errr, this only uses a single FileBrowserSheet (I call close(), immediately 
after the open()).

The problem is intermittent (I think it's a race condition, from looking at the 
code populating the directory listing is done by a separate task.).

What the sample does is:
a) Create a new FileBrowserSheet.
b) Set the root directory to the current working directory.  (Anywhere that's 
not user.home is sufficient.)
c) Set a disabled file filter that will break out of the loop, and raise a 
error, break the loop, if it sees files not in the current working directory.
d) Opens and closes the FileBrowserSheet.

I'm not sure if this is the best way to demonstrate it, but what happens in my 
app (or if I open a FileBrowserSheet) is that once in a while, despite calling 
setRootDirectory(<Somewhere other than user.home>), the directory listing 
contains files from my ~ in addition to files from <Somewhere other than 
user.home>.  More rarely, I see "all files are from the correct directory, but 
everything is duplicated" (Eg: ~/tmp/foo.xml is listed twice).

Even if I don't use a loop here, and just have a simple app with a button that 
opens a FileBrowserSheet after a setRootDirectory(somewhereElse) call, I can 
get the problem to appear eventually with enough manual clicking.  But since 
that is tedious and annoying, I used a loop and a automated way to detect that 
something anomalous has happened.



> FileBrowserSheet displays incorrect directory listing.
> ------------------------------------------------------
>
>                 Key: PIVOT-756
>                 URL: https://issues.apache.org/jira/browse/PIVOT-756
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>         Environment: Windows 7 Professional, Sun JRE 1.6.0_25
>            Reporter: Yawning Angel
>             Fix For: 2.0.1
>
>         Attachments: FileBrowserSheetTest.java
>
>
> I've ran into intermittent issues with FileBrowserSheet displaying a 
> incorrect directory listing.
> The symptoms that I see are:
>  * The file list includes files/directories from user.home (despite 
> setRootDirectory(somewhereElse) being called prior to the open().)
>  * The file list has duplicate entries.
> It's reproducible with a short test case on my system, so I highly doubt that 
> it's a issue with my application code.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to