FileException only when opening image in certain way...

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

FileException only when opening image in certain way...

Mariano Martinez Peck
Hi guys,

Davide Varvello reported me an issue with Fuel, failing to do:

FLSerializer serialize: 'whatever' toFileNamed: 'demo.fuel'.

Such a thing would bring an error like this:

File>>openForWrite:
File>>openForWrite
File>>writeStream
File>>writeStreamDo:
FLPharo5Platform>>fileNamed:writeStreamDo:
FLSerializer>>serialize:toFileNamed:
FLSerializer class>>serialize:toFileNamed:

The code is:

FLPharo5Platform >> fileNamed: aFilename writeStreamDo: aBlock
^ ((Smalltalk at: #File) named: aFilename) writeStreamDo: [ :stream |
stream binary.
aBlock value: stream ]


Now..I have tried to reproduce it but it happens only depending on how the vm/image was started!!! And I only tested on OSX.

Download the oneclick from here:  http://files.pharo.org/platform/Pharo5.0-mac.zip and see my results:

1) Executing VM from command line and passing the image as argument: WORKS.
2) Double clicking on the internal Pharo binary (which auto-starts the image): WORKS
3) Double clicking the internal Pharo image and then "Open With" and I select the Pharo VM: DOES NOT WORK.
4) Double clicking the Pharo one click: DOES NOT WORK. 

Has anyone experienced something like this? Looks like different file / directory permissions when starting in different ways?

Thanks in advance, 



--
Reply | Threaded
Open this post in threaded view
|

Re: FileException only when opening image in certain way...

Mariano Martinez Peck


On Tue, Jul 26, 2016 at 9:48 AM, Mariano Martinez Peck <[hidden email]> wrote:
Hi guys,

Davide Varvello reported me an issue with Fuel, failing to do:

FLSerializer serialize: 'whatever' toFileNamed: 'demo.fuel'.

Such a thing would bring an error like this:

File>>openForWrite:
File>>openForWrite
File>>writeStream
File>>writeStreamDo:
FLPharo5Platform>>fileNamed:writeStreamDo:
FLSerializer>>serialize:toFileNamed:
FLSerializer class>>serialize:toFileNamed:

The code is:

FLPharo5Platform >> fileNamed: aFilename writeStreamDo: aBlock
^ ((Smalltalk at: #File) named: aFilename) writeStreamDo: [ :stream |
stream binary.
aBlock value: stream ]


Now..I have tried to reproduce it but it happens only depending on how the vm/image was started!!! And I only tested on OSX.

Download the oneclick from here:  http://files.pharo.org/platform/Pharo5.0-mac.zip and see my results:

1) Executing VM from command line and passing the image as argument: WORKS.
2) Double clicking on the internal Pharo binary (which auto-starts the image): WORKS
3) Double clicking the internal Pharo image and then "Open With" and I select the Pharo VM: DOES NOT WORK.
4) Double clicking the Pharo one click: DOES NOT WORK. 


I forgot to said... if you create the file in advance, with something like:

FileStream forceNewFileNamed: 'demo.fuel' do: [ :aStream | FLSerializer  serialize: 'whatever' on: aStream binary ]

It does work in all cases.

 
Has anyone experienced something like this? Looks like different file / directory permissions when starting in different ways?

Thanks in advance, 



--



--
Reply | Threaded
Open this post in threaded view
|

Re: FileException only when opening image in certain way...

Dale Henrichs-3

Mariano,

I think your problem might have something to do with how the PWD env var is managed in OSX ... Check the value of the 'PWD' in your different examples and see if that sheds any light ...

Dale

On 7/26/16 5:49 AM, Mariano Martinez Peck wrote:


On Tue, Jul 26, 2016 at 9:48 AM, Mariano Martinez Peck <[hidden email]> wrote:
Hi guys,

Davide Varvello reported me an issue with Fuel, failing to do:

FLSerializer serialize: 'whatever' toFileNamed: 'demo.fuel'.

Such a thing would bring an error like this:

File>>openForWrite:
File>>openForWrite
File>>writeStream
File>>writeStreamDo:
FLPharo5Platform>>fileNamed:writeStreamDo:
FLSerializer>>serialize:toFileNamed:
FLSerializer class>>serialize:toFileNamed:

The code is:

FLPharo5Platform >> fileNamed: aFilename writeStreamDo: aBlock
^ ((Smalltalk at: #File) named: aFilename) writeStreamDo: [ :stream |
stream binary.
aBlock value: stream ]


Now..I have tried to reproduce it but it happens only depending on how the vm/image was started!!! And I only tested on OSX.

Download the oneclick from here:  http://files.pharo.org/platform/Pharo5.0-mac.zip and see my results:

1) Executing VM from command line and passing the image as argument: WORKS.
2) Double clicking on the internal Pharo binary (which auto-starts the image): WORKS
3) Double clicking the internal Pharo image and then "Open With" and I select the Pharo VM: DOES NOT WORK.
4) Double clicking the Pharo one click: DOES NOT WORK. 


I forgot to said... if you create the file in advance, with something like:

FileStream forceNewFileNamed: 'demo.fuel' do: [ :aStream | FLSerializer  serialize: 'whatever' on: aStream binary ]

It does work in all cases.

 
Has anyone experienced something like this? Looks like different file / directory permissions when starting in different ways?

Thanks in advance, 



--



--

Reply | Threaded
Open this post in threaded view
|

Re: FileException only when opening image in certain way...

Davide Varvello
Moreover, on Pharo4 it's working.
Davide



Dale Henrichs-3 wrote
Mariano,

I think your problem might have something to do with how the PWD env var
is managed in OSX ... Check the value of the 'PWD' in your different
examples and see if that sheds any light ...

Dale

On 7/26/16 5:49 AM, Mariano Martinez Peck wrote:
>
>
> On Tue, Jul 26, 2016 at 9:48 AM, Mariano Martinez Peck
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi guys,
>
>     Davide Varvello reported me an issue with Fuel, failing to do:
>
>     FLSerializer serialize: 'whatever' toFileNamed: 'demo.fuel'.
>
>     Such a thing would bring an error like this:
>
>     File>>openForWrite:
>     File>>openForWrite
>     File>>writeStream
>     File>>writeStreamDo:
>     FLPharo5Platform>>fileNamed:writeStreamDo:
>     FLSerializer>>serialize:toFileNamed:
>     FLSerializer class>>serialize:toFileNamed:
>
>     The code is:
>
>     FLPharo5Platform >> fileNamed: aFilename writeStreamDo: aBlock
>     ^ ((Smalltalk at: #File) named: aFilename) writeStreamDo: [ :stream |
>     stream binary.
>     aBlock value: stream ]
>
>
>     Now..I have tried to reproduce it but it happens only depending on
>     how the vm/image was started!!! And I only tested on OSX.
>
>     Download the oneclick from here:
>     http://files.pharo.org/platform/Pharo5.0-mac.zip and see my results:
>
>     1) Executing VM from command line and passing the image as
>     argument: WORKS.
>     2) Double clicking on the internal Pharo binary (which auto-starts
>     the image): WORKS
>     3) Double clicking the internal Pharo image and then "Open With"
>     and I select the Pharo VM: DOES NOT WORK.
>     4) Double clicking the Pharo one click: DOES NOT WORK.
>
>
> I forgot to said... if you create the file in advance, with something
> like:
>
> FileStream forceNewFileNamed: 'demo.fuel' do: [ :aStream |
> FLSerializer  serialize: 'whatever' on: aStream binary ]
>
> It does work in all cases.
>
>     Has anyone experienced something like this? Looks like different
>     file / directory permissions when starting in different ways?
>
>     Thanks in advance,
>
>
>
>     --
>     Mariano
>     http://marianopeck.wordpress.com
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
Reply | Threaded
Open this post in threaded view
|

Re: FileException only when opening image in certain way...

Pharo Smalltalk Developers mailing list
In reply to this post by Dale Henrichs-3
Moreover, on Pharo4 it's working.
Davide




Dale Henrichs-3 wrote

> Mariano,
>
> I think your problem might have something to do with how the PWD env var
> is managed in OSX ... Check the value of the 'PWD' in your different
> examples and see if that sheds any light ...
>
> Dale
>
> On 7/26/16 5:49 AM, Mariano Martinez Peck wrote:
>>
>>
>> On Tue, Jul 26, 2016 at 9:48 AM, Mariano Martinez Peck
>> &lt;

> marianopeck@

>  &lt;mailto:

> marianopeck@

> &gt;> wrote:
>>
>>     Hi guys,
>>
>>     Davide Varvello reported me an issue with Fuel, failing to do:
>>
>>     FLSerializer serialize: 'whatever' toFileNamed: 'demo.fuel'.
>>
>>     Such a thing would bring an error like this:
>>
>>     File>>openForWrite:
>>     File>>openForWrite
>>     File>>writeStream
>>     File>>writeStreamDo:
>>     FLPharo5Platform>>fileNamed:writeStreamDo:
>>     FLSerializer>>serialize:toFileNamed:
>>     FLSerializer class>>serialize:toFileNamed:
>>
>>     The code is:
>>
>>     FLPharo5Platform >> fileNamed: aFilename writeStreamDo: aBlock
>>     ^ ((Smalltalk at: #File) named: aFilename) writeStreamDo: [ :stream |
>>     stream binary.
>>     aBlock value: stream ]
>>
>>
>>     Now..I have tried to reproduce it but it happens only depending on
>>     how the vm/image was started!!! And I only tested on OSX.
>>
>>     Download the oneclick from here:
>>     http://files.pharo.org/platform/Pharo5.0-mac.zip and see my results:
>>
>>     1) Executing VM from command line and passing the image as
>>     argument: WORKS.
>>     2) Double clicking on the internal Pharo binary (which auto-starts
>>     the image): WORKS
>>     3) Double clicking the internal Pharo image and then "Open With"
>>     and I select the Pharo VM: DOES NOT WORK.
>>     4) Double clicking the Pharo one click: DOES NOT WORK.
>>
>>
>> I forgot to said... if you create the file in advance, with something
>> like:
>>
>> FileStream forceNewFileNamed: 'demo.fuel' do: [ :aStream |
>> FLSerializer  serialize: 'whatever' on: aStream binary ]
>>
>> It does work in all cases.
>>
>>     Has anyone experienced something like this? Looks like different
>>     file / directory permissions when starting in different ways?
>>
>>     Thanks in advance,
>>
>>
>>
>>     --
>>     Mariano
>>     http://marianopeck.wordpress.com
>>
>>
>>
>>
>> --
>> Mariano
>> http://marianopeck.wordpress.com





--
View this message in context: http://forum.world.st/FileException-only-when-opening-image-in-certain-way-tp4908014p4908034.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: FileException only when opening image in certain way...

Davide Varvello
I opened a bug: https://pharo.fogbugz.com/f/cases/18872/Pharo5-vm-crash-on-mac
Davide


Pharo Smalltalk Developers mailing list wrote
Moreover, on Pharo4 it's working.
Davide




Dale Henrichs-3 wrote
> Mariano,
>
> I think your problem might have something to do with how the PWD env var
> is managed in OSX ... Check the value of the 'PWD' in your different
> examples and see if that sheds any light ...
>
> Dale
>
> On 7/26/16 5:49 AM, Mariano Martinez Peck wrote:
>>
>>
>> On Tue, Jul 26, 2016 at 9:48 AM, Mariano Martinez Peck
>> <

> marianopeck@

>  <mailto:

> marianopeck@

> >> wrote:
>>
>>     Hi guys,
>>
>>     Davide Varvello reported me an issue with Fuel, failing to do:
>>
>>     FLSerializer serialize: 'whatever' toFileNamed: 'demo.fuel'.
>>
>>     Such a thing would bring an error like this:
>>
>>     File>>openForWrite:
>>     File>>openForWrite
>>     File>>writeStream
>>     File>>writeStreamDo:
>>     FLPharo5Platform>>fileNamed:writeStreamDo:
>>     FLSerializer>>serialize:toFileNamed:
>>     FLSerializer class>>serialize:toFileNamed:
>>
>>     The code is:
>>
>>     FLPharo5Platform >> fileNamed: aFilename writeStreamDo: aBlock
>>     ^ ((Smalltalk at: #File) named: aFilename) writeStreamDo: [ :stream |
>>     stream binary.
>>     aBlock value: stream ]
>>
>>
>>     Now..I have tried to reproduce it but it happens only depending on
>>     how the vm/image was started!!! And I only tested on OSX.
>>
>>     Download the oneclick from here:
>>     http://files.pharo.org/platform/Pharo5.0-mac.zip and see my results:
>>
>>     1) Executing VM from command line and passing the image as
>>     argument: WORKS.
>>     2) Double clicking on the internal Pharo binary (which auto-starts
>>     the image): WORKS
>>     3) Double clicking the internal Pharo image and then "Open With"
>>     and I select the Pharo VM: DOES NOT WORK.
>>     4) Double clicking the Pharo one click: DOES NOT WORK.
>>
>>
>> I forgot to said... if you create the file in advance, with something
>> like:
>>
>> FileStream forceNewFileNamed: 'demo.fuel' do: [ :aStream |
>> FLSerializer  serialize: 'whatever' on: aStream binary ]
>>
>> It does work in all cases.
>>
>>     Has anyone experienced something like this? Looks like different
>>     file / directory permissions when starting in different ways?
>>
>>     Thanks in advance,
>>
>>
>>
>>     --
>>     Mariano
>>     http://marianopeck.wordpress.com
>>
>>
>>
>>
>> --
>> Mariano
>> http://marianopeck.wordpress.com





--
View this message in context: http://forum.world.st/FileException-only-when-opening-image-in-certain-way-tp4908014p4908034.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: FileException only when opening image in certain way...

Pharo Smalltalk Developers mailing list
In reply to this post by Pharo Smalltalk Developers mailing list
I opened a bug:
https://pharo.fogbugz.com/f/cases/18872/Pharo5-vm-crash-on-mac
Davide



Pharo Smalltalk Developers mailing list wrote

> Moreover, on Pharo4 it's working.
> Davide
>
>
>
>
> Dale Henrichs-3 wrote
>> Mariano,
>>
>> I think your problem might have something to do with how the PWD env var
>> is managed in OSX ... Check the value of the 'PWD' in your different
>> examples and see if that sheds any light ...
>>
>> Dale
>>
>> On 7/26/16 5:49 AM, Mariano Martinez Peck wrote:
>>>
>>>
>>> On Tue, Jul 26, 2016 at 9:48 AM, Mariano Martinez Peck
>>> &lt;
>
>> marianopeck@
>
>>  &lt;mailto:
>
>> marianopeck@
>
>> &gt;> wrote:
>>>
>>>     Hi guys,
>>>
>>>     Davide Varvello reported me an issue with Fuel, failing to do:
>>>
>>>     FLSerializer serialize: 'whatever' toFileNamed: 'demo.fuel'.
>>>
>>>     Such a thing would bring an error like this:
>>>
>>>     File>>openForWrite:
>>>     File>>openForWrite
>>>     File>>writeStream
>>>     File>>writeStreamDo:
>>>     FLPharo5Platform>>fileNamed:writeStreamDo:
>>>     FLSerializer>>serialize:toFileNamed:
>>>     FLSerializer class>>serialize:toFileNamed:
>>>
>>>     The code is:
>>>
>>>     FLPharo5Platform >> fileNamed: aFilename writeStreamDo: aBlock
>>>     ^ ((Smalltalk at: #File) named: aFilename) writeStreamDo: [ :stream
>>> |
>>>     stream binary.
>>>     aBlock value: stream ]
>>>
>>>
>>>     Now..I have tried to reproduce it but it happens only depending on
>>>     how the vm/image was started!!! And I only tested on OSX.
>>>
>>>     Download the oneclick from here:
>>>     http://files.pharo.org/platform/Pharo5.0-mac.zip and see my results:
>>>
>>>     1) Executing VM from command line and passing the image as
>>>     argument: WORKS.
>>>     2) Double clicking on the internal Pharo binary (which auto-starts
>>>     the image): WORKS
>>>     3) Double clicking the internal Pharo image and then "Open With"
>>>     and I select the Pharo VM: DOES NOT WORK.
>>>     4) Double clicking the Pharo one click: DOES NOT WORK.
>>>
>>>
>>> I forgot to said... if you create the file in advance, with something
>>> like:
>>>
>>> FileStream forceNewFileNamed: 'demo.fuel' do: [ :aStream |
>>> FLSerializer  serialize: 'whatever' on: aStream binary ]
>>>
>>> It does work in all cases.
>>>
>>>     Has anyone experienced something like this? Looks like different
>>>     file / directory permissions when starting in different ways?
>>>
>>>     Thanks in advance,
>>>
>>>
>>>
>>>     --
>>>     Mariano
>>>     http://marianopeck.wordpress.com
>>>
>>>
>>>
>>>
>>> --
>>> Mariano
>>> http://marianopeck.wordpress.com
>
>
>
>
>
> --
> View this message in context:
> http://forum.world.st/FileException-only-when-opening-image-in-certain-way-tp4908014p4908034.html
> Sent from the Pharo Smalltalk Developers mailing list archive at
> Nabble.com.





--
View this message in context: http://forum.world.st/FileException-only-when-opening-image-in-certain-way-tp4908014p4910595.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.