Non-nil FolderItem with no properties?


I did just a debug session where I got an OutOfBoundsException in my App. The funny thing is that these exception was not thrown while using a RemoteDebugger on that machine.
It is a Xojo 2013r3.2 Cocoa build running on Mac OS X 10.6.8.
The code is basically something like this

  for i as integer = VolumeCount-1 DownTo 0
    dim currentVol As FolderItem = Volume(i)
    if currentVol = nil then
       WriteSyslog("currentVol is nil in " +  CurrentMethodName)
    if currentVol.NativePath = "" then
      WriteSyslog("NativePath is empty in " +  CurrentMethodName)

Any idea why there shoud be a FolderItem returned by the “Volume” method which is not nil but has an empty “NativePath”?
Of course the other properties are also empty, 0 or whatever depending on their type.


I just ran this code on my iMac (one internal, 3 external drives) and it never fired either of your messages.

I added a line right after the “FOR” to display VOLUME(i).name and got the names of all devices

Try adding that and see what the NAME of the NIL device is

I saw that never before and I use this code fofor a long time now.

Did not work. As I wrote:

I tried this again today and I was not able to reproduce this issue. I have no idea what’s wrong last week.

Now I have some more debug logging added just in case this issue will show again.