[vwnc] vw cannot read from files

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

[vwnc] vw cannot read from files

Maximillian Davids
Hello list,
I'm finishing a smalltalk programme, and I wanted to see it running on other machine. At some point the software needs to read text files from disk (discard CDs, DVDs or the like). To my surprise, when I execute the programme on the target machine, visualworks can't read those required files, in fact, it can't read any text file (even when I try reading random files using simple code in the workspace).
If you are wondering, both machines use Windows XP.

This is the error I get:
Unhandled exception: Illegal volume specification

The stack:
------------------
NTFSFilename class(PCFilename class)>>readVolumeFrom:
NTFSFilename class(PCFilename class)>>readBaseLocationFromStream:
NTFSFilename class(Filename class)>>components:
NTFSFilename class(PCFilename class)>>canonicalize:forFileSystemAttributes:
NTFSFilename class>>canonicalize:forFileSystemAttributes:
PCFilename class>>createInstanceNamed:
Filename class>>named:
ByteString(CharacterArray)>>asFilename
myProgramme.FileManager>>loadFile:
------------------

The last line is from my programme :)

Apparently everything goes perfect until >>readVolumeFrom: is called.

Inspecting that, I get this:
------------------
NTFSFilename class(PCFilename class)>>readVolumeFrom:
Receiver:
    a NTFSFilename class
Instance Variables:
    superclass = PCFilename
    methodDict = a MethodDictionary[0]
    format = 16387
    subclasses = nil
    instanceVariables = nil
    organization =
    name = #NTFSFilename
    classPool = nil
    environment = a NameSpace[103]
Arguments:
    aStream = a ReadStream
Temporaries:
    volume = 'D:'
    sep = $\ "16r005C"
Context PC = 53
------------------

The computer has units C, D and E (discarding the dvd/cd reader). As you can see, the volume is D:, so everything is correct.
I just don't understand where the problem is, I tried reloading vw images, cleaning them, etc. The funny thing though, is that in the computer where the programme was developed this problem doesn't exist.

Hopefully this is not the first time the error appears. Am I hallucinating?

Thanks in advance!
-Max.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] vw cannot read from files

Reinout Heeck
Well, that is very strange.


In the method readVolumeFrom: there is a test as follows:

   volume size = 2 and: [volume first asLowercase between: $a and: $z]

Can you tell us whether it fails the first or the second part of this  
test by re-running it in the debugger after you hit the exception?


Again in the debugger can you tell us the result of running
   volume asByteString
and
   volume asByteArray


I'm just guessing that the volume string ('D:') might be encoded in a  
weird way.


Oh, and don't forget to review if you accidentally changed the  
behavior of the code by creating your own version of #size or #and: or  
#first etc.



Happy hunting :-/

R
-



On Mar 4, 2008, at 10:15 PM, Maximillian Davids wrote:

> Hello list,
> I'm finishing a smalltalk programme, and I wanted to see it running  
> on other machine. At some point the software needs to read text  
> files from disk (discard CDs, DVDs or the like). To my surprise,  
> when I execute the programme on the target machine, visualworks  
> can't read those required files, in fact, it can't read any text  
> file (even when I try reading random files using simple code in the  
> workspace).
> If you are wondering, both machines use Windows XP.
>
> This is the error I get:
> Unhandled exception: Illegal volume specification
>
> The stack:
> ------------------
> NTFSFilename class(PCFilename class)>>readVolumeFrom:
> NTFSFilename class(PCFilename class)>>readBaseLocationFromStream:
> NTFSFilename class(Filename class)>>components:
> NTFSFilename class(PCFilename  
> class)>>canonicalize:forFileSystemAttributes:
> NTFSFilename class>>canonicalize:forFileSystemAttributes:
> PCFilename class>>createInstanceNamed:
> Filename class>>named:
> ByteString(CharacterArray)>>asFilename
> myProgramme.FileManager>>loadFile:
> ------------------
>
> The last line is from my programme :)
>
> Apparently everything goes perfect until >>readVolumeFrom: is called.
>
> Inspecting that, I get this:
> ------------------
> NTFSFilename class(PCFilename class)>>readVolumeFrom:
> Receiver:
>     a NTFSFilename class
> Instance Variables:
>     superclass = PCFilename
>     methodDict = a MethodDictionary[0]
>     format = 16387
>     subclasses = nil
>     instanceVariables = nil
>     organization =
>     name = #NTFSFilename
>     classPool = nil
>     environment = a NameSpace[103]
> Arguments:
>     aStream = a ReadStream
> Temporaries:
>     volume = 'D:'
>     sep = $\ "16r005C"
> Context PC = 53
> ------------------
>
> The computer has units C, D and E (discarding the dvd/cd reader). As  
> you can see, the volume is D:, so everything is correct.
> I just don't understand where the problem is, I tried reloading vw  
> images, cleaning them, etc. The funny thing though, is that in the  
> computer where the programme was developed this problem doesn't exist.
>
> Hopefully this is not the first time the error appears. Am I  
> hallucinating?
>
> Thanks in advance!
> -Max.
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] vw cannot read from files

Terry Raymond
In reply to this post by Maximillian Davids

Maximillian

 

One simple test is to use the VW file browser. Open it and

navigate to the file you wish to open. If it works then the problem

is in your program. If it doesn’t then you will need to figure out

what it is about that particular file that is not allowing access.

 

Terry

===========================================================
Terry Raymond
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
<http://www.craftedsmalltalk.com>
===========================================================


From: [hidden email] [mailto:[hidden email]] On Behalf Of Maximillian Davids
Sent: Tuesday, March 04, 2008 4:15 PM
To: vwnc
Subject: [vwnc] vw cannot read from files

 

Hello list,
I'm finishing a smalltalk programme, and I wanted to see it running on other machine. At some point the software needs to read text files from disk (discard CDs, DVDs or the like). To my surprise, when I execute the programme on the target machine, visualworks can't read those required files, in fact, it can't read any text file (even when I try reading random files using simple code in the workspace).
If you are wondering, both machines use Windows XP.

This is the error I get:
Unhandled exception: Illegal volume specification

The stack:
------------------
NTFSFilename class(PCFilename class)>>readVolumeFrom:
NTFSFilename class(PCFilename class)>>readBaseLocationFromStream:
NTFSFilename class(Filename class)>>components:
NTFSFilename class(PCFilename class)>>canonicalize:forFileSystemAttributes:
NTFSFilename class>>canonicalize:forFileSystemAttributes:
PCFilename class>>createInstanceNamed:
Filename class>>named:
ByteString(CharacterArray)>>asFilename
myProgramme.FileManager>>loadFile:
------------------

The last line is from my programme :)

Apparently everything goes perfect until >>readVolumeFrom: is called.

Inspecting that, I get this:
------------------
NTFSFilename class(PCFilename class)>>readVolumeFrom:
Receiver:
    a NTFSFilename class
Instance Variables:
    superclass = PCFilename
    methodDict = a MethodDictionary[0]
    format = 16387
    subclasses = nil
    instanceVariables = nil
    organization =
    name = #NTFSFilename
    classPool = nil
    environment = a NameSpace[103]
Arguments:
    aStream = a ReadStream
Temporaries:
    volume = 'D:'
    sep = $\ "16r005C"
Context PC = 53
------------------

The computer has units C, D and E (discarding the dvd/cd reader). As you can see, the volume is D:, so everything is correct.
I just don't understand where the problem is, I tried reloading vw images, cleaning them, etc. The funny thing though, is that in the computer where the programme was developed this problem doesn't exist.

Hopefully this is not the first time the error appears. Am I hallucinating?

Thanks in advance!
-Max.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] vw cannot read from files

Maximillian Davids
Thank you Reinout and Terry for your help.

I want to explain something:
The first and second computer are not closed to each other, in fact they are in different offices (different developement team), plus I do not have any control of the second computer, I must relay in other person. Considering the last, it is very difficult to perform any kind of test on the second computer.

Finally, I want to remark that we tried a lot of different things. Needless to say that the administrator checked out file accessing rights. We had the same problem with every single file we tried to open (and when I say "with every single file" I mean it). First we tried to open them from the programme, and then just writing some simple code in a workspace. Eventually we considered pointless to continue the tests.

We were both surprised, the first time something like this happens to us.

I will contact the other person tomorrow, and see if he can (and wants) to perform the tests you two already commented me.

If the problem continues I will post any additional information I get.
Thank you again.
-Max.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc