When you insert a jpeg from a file, for some reason the file descriptor (stream) is kept open (at least in the Windows end of things). Then, if a second page is to be generated, the following error is shown:
'MessageNotUnderstood: receiver of "reset" is nil PDFJpegElement>>stream: JPEGReadWriter aJPEGReadWriter JPEGReadWriter(ImageReadWriter)>>on: nil Sample code: aPage := PDFPage new. imageStream := FileStream fileNamed: 'lsi-tec.jpg'. aPage add: ((PDFJpegElement fromStream: imageStream) from: 15 mm @ 20 mm; dimension: 40 mm @ 40 mm). imageStream close. Generated report is in annex The only way to recover is to close pharo, start it again. Then the file descriptor (stream) is released and it is possible to go on. Has anyone faced this problem? How to solve it? Best regards, Casimiro Barreto ReqII09Ex01MHz-20171019141118.pdf (18K) Download Attachment |
Hi Casimiro, Which version of Pharo do you use ? 6.1 ? Olivier :) 2017-10-19 18:27 GMT+02:00 <[hidden email]>: When you insert a jpeg from a file, for some reason the file descriptor (stream) is kept open (at least in the Windows end of things). Then, if a second page is to be generated, the following error is shown: |
6.1 32 bits. Windows 10 pro... Em 20 de out de 2017 3:40 AM, "olivier auverlot" <[hidden email]> escreveu:
|
In reply to this post by Olivier Auverlot
Interesting enough… I have installed Pharo6.1 (Windows). But then I go System>>about it returns Pharo 6.0 Latest update: #60511 De: Pharo-dev [mailto:[hidden email]] Em nome de olivier auverlot Hi Casimiro, Which version of Pharo do you use ? 6.1 ? Olivier :) |
In reply to this post by Olivier Auverlot
But it seems that the problem is either with OSWindows or OSProcess (I guess Artefact uses OSProcess) because the windows side of things just is not aware that task is complete and it must finish things, close streams, etc… Because you see… in the Pharo side I even closed the file descriptor (explicitly). Best regards, Casimiro De: Pharo-dev [mailto:[hidden email]] Em nome de olivier auverlot Hi Casimiro, Which version of Pharo do you use ? 6.1 ? Olivier :) 2017-10-19 18:27 GMT+02:00 <[hidden email]>:
|
Hi Casimiro
I do not thing that artefact use OSProcess and (OSWindow is for handling even). Can you try using plain FileSystem instead of FileStream because may be this is the problem. 'myfile.jpeg' asFileReference readStream And let us know. Stef On Fri, Oct 20, 2017 at 5:02 PM, <[hidden email]> wrote: > But it seems that the problem is either with OSWindows or OSProcess (I guess > Artefact uses OSProcess) because the windows side of things just is not > aware that task is complete and it must finish things, close streams, etc… > Because you see… in the Pharo side I even closed the file descriptor > (explicitly). > > > > Best regards, > > > > Casimiro > > > > De: Pharo-dev [mailto:[hidden email]] Em nome de olivier > auverlot > Enviada em: sexta-feira, 20 de outubro de 2017 03:40 > Para: Pharo Development List <[hidden email]> > Assunto: Re: [Pharo-dev] Anoying bug fond in Artefact running in Windows 10 > > > > Hi Casimiro, > > > > Which version of Pharo do you use ? 6.1 ? > > > > Olivier :) > > > > 2017-10-19 18:27 GMT+02:00 <[hidden email]>: > > When you insert a jpeg from a file, for some reason the file descriptor > (stream) is kept open (at least in the Windows end of things). Then, if a > second page is to be generated, the following error is shown: > > 'MessageNotUnderstood: receiver of "reset" is nil > > PDFJpegElement>>stream: > JPEGReadWriter > aJPEGReadWriter > JPEGReadWriter(ImageReadWriter)>>on: > nil > > Sample code: > > aPage := PDFPage new. > > imageStream := FileStream fileNamed: 'lsi-tec.jpg'. > > aPage > add: > ((PDFJpegElement fromStream: imageStream) > from: 15 mm @ 20 mm; > dimension: 40 mm @ 40 mm). > imageStream close. > > Generated report is in annex > > The only way to recover is to close pharo, start it again. Then the file > descriptor (stream) is released and it is possible to go on. > > Has anyone faced this problem? > How to solve it? > > Best regards, > > Casimiro Barreto > > |
Free forum by Nabble | Edit this page |