Is it me, or a problem with FileDirectory?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it me, or a problem with FileDirectory?

dsl101
I've been trying to debug an application running on Squeak 4.1 randomly crashing on certain setups. It turns out it's where people have their 'My Documents' folder on Windows platforms set to a network share.

As a trivial test case, I can trigger the error like this:

1. Set up a share (can be on the same machine) called 'share'
2. Check you can browse in Explorer to '\\server\share' - should be empty
3. Execute the following in a Workspace:

d := FileDirectory on: 'c:\NewDir'. d assureExistence.

That should create a directory called 'NewDir' on the root of the C drive (assuming your machine has a C drive :), just to check everything is working OK.

Now try:

d := FileDirectory on: '\\server\share\NewDir'. d assureExistence.

I get 'PrimitiveFailed: DosFileDirectory>>primCreateDirectory'. From what I can tell, that method doesn't see '\\server\share' as effectively the 'root' of a filesystem and keeps stepping up a level. I don't know if that's the fault of the FilePlugin module, or something else. For info, the versions of the methods in the debug trace are:

DosFileDirectory>>primCreateDirectory: ar 2/2/2001 15:09
FileDirectory>>createDirectory: yo 2/24/2005 18:33
FileDirectory>>assureExistenceOfPath: jcg 5/10/2010 14:44
FileDirectory>>assureExistence: hg 2/2/2002 16:37

But my guess is that the problem is in FileDirectory>>directoryExists:, as this is where there appears to be handling of special cases for certain file systems. I can't see anything clever in there for UNC paths though.

See also http://lists.squeakfoundation.org/pipermail/squeak-dev/2002-March/037091.html - it's related, but I can't track down the fix that Bert referred to, to see if it helps.

Thanks,

David.

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Is it me, or a problem with FileDirectory?

Bert Freudenberg

On 2012-06-15, at 12:17, David Lomas wrote:

> I've been trying to debug an application running on Squeak 4.1 randomly crashing on certain setups. It turns out it's where people have their 'My Documents' folder on Windows platforms set to a network share.
>
> As a trivial test case, I can trigger the error like this:
>
> 1. Set up a share (can be on the same machine) called 'share'
> 2. Check you can browse in Explorer to '\\server\share' - should be empty
> 3. Execute the following in a Workspace:
>
> d := FileDirectory on: 'c:\NewDir'. d assureExistence.
>
> That should create a directory called 'NewDir' on the root of the C drive (assuming your machine has a C drive :), just to check everything is working OK.
>
> Now try:
>
> d := FileDirectory on: '\\server\share\NewDir'. d assureExistence.
>
> I get 'PrimitiveFailed: DosFileDirectory>>primCreateDirectory'. From what I can tell, that method doesn't see '\\server\share' as effectively the 'root' of a filesystem and keeps stepping up a level. I don't know if that's the fault of the FilePlugin module, or something else. For info, the versions of the methods in the debug trace are:
>
> DosFileDirectory>>primCreateDirectory: ar 2/2/2001 15:09
> FileDirectory>>createDirectory: yo 2/24/2005 18:33
> FileDirectory>>assureExistenceOfPath: jcg 5/10/2010 14:44
> FileDirectory>>assureExistence: hg 2/2/2002 16:37
>
> But my guess is that the problem is in FileDirectory>>directoryExists:, as this is where there appears to be handling of special cases for certain file systems. I can't see anything clever in there for UNC paths though.
>
> See also http://lists.squeakfoundation.org/pipermail/squeak-dev/2002-March/037091.html - it's related, but I can't track down the fix that Bert referred to, to see if it helps.

That particular fix is probably unrelated. But the code was fixed last in 2010 (e.g. the timestamp on assureExistenceOfPath: is now "bf 9/9/2010").

You may want to try in a 4.3 image, and if necessary backport the fixes.

- Bert -


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Is it me, or a problem with FileDirectory?

dsl101
In reply to this post by dsl101
First, apologies if the threading is lost - I was unsubscribed from the list on email, therefore I didn't get my original post or replies, so I'm not sure if this will join up!

Thanks Bert - 4.3 works well, so I'll backport it. I tried Pharo 1.4 which I happened to have lying around, and that still has the issue, but there's discussion on the issue tracker about abandoning FileDirectory, so I guess it's not so important to fix there...

Back to Squeak - can I just export the whole FileDirectory class from 4.3 and install it into 4.1? Or does it depend on too many other things?

Thanks again,

David.


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Is it me, or a problem with FileDirectory?

Bert Freudenberg

On 2012-06-15, at 14:23, David Lomas wrote:

> First, apologies if the threading is lost - I was unsubscribed from the list on email, therefore I didn't get my original post or replies, so I'm not sure if this will join up!
>
> Thanks Bert - 4.3 works well, so I'll backport it. I tried Pharo 1.4 which I happened to have lying around, and that still has the issue, but there's discussion on the issue tracker about abandoning FileDirectory, so I guess it's not so important to fix there...
>
> Back to Squeak - can I just export the whole FileDirectory class from 4.3 and install it into 4.1? Or does it depend on too many other things?

It's worth a try to just take the whole class and then fix issues as they arise. Can't promise there are no problems, but I'd think the chances aren't that bad.

- Bert -


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Is it me, or a problem with FileDirectory?

dsl101
Great - thanks.

On Fri, Jun 15, 2012 at 3:20 PM, Bert Freudenberg <[hidden email]> wrote:

On 2012-06-15, at 14:23, David Lomas wrote:

> First, apologies if the threading is lost - I was unsubscribed from the list on email, therefore I didn't get my original post or replies, so I'm not sure if this will join up!
>
> Thanks Bert - 4.3 works well, so I'll backport it. I tried Pharo 1.4 which I happened to have lying around, and that still has the issue, but there's discussion on the issue tracker about abandoning FileDirectory, so I guess it's not so important to fix there...
>
> Back to Squeak - can I just export the whole FileDirectory class from 4.3 and install it into 4.1? Or does it depend on too many other things?

It's worth a try to just take the whole class and then fix issues as they arise. Can't promise there are no problems, but I'd think the chances aren't that bad.

- Bert -


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners