[Pharo-dev] Anoying bug fond in Artefact running in Windows 10

casimiro.barreto at gmail.com casimiro.barreto at gmail.com
Thu Oct 19 12:27:24 EDT 2017


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ReqII09Ex01MHz-20171019141118.pdf
Type: application/pdf
Size: 14172 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20171019/d83dcb00/attachment.pdf>


More information about the Pharo-dev mailing list