[squeak-dev] [BUG] MultiByteFileStream(Object)>>error: primGetPosition: failed

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Wed Feb 5 12:18:07 UTC 2020


Hi all, I don't know if someone of you saw this error message recently?


MultiByteFileStream(Object)>>error: primGetPosition: failed
(Just for the case this should be a VM-related problem, I'm using OpenSmalltalk 201912311458 on Win 1903.)

I experienced it various times, and each time, once the error had occurred once, no more access to the sources file was possible. I could neither select any message then nor debug, even quitting the image without saving was not possible; each attempt raised the same error again.

Now I finally discovered a scenario to reproduce this issue:


(Disclaimer: This might crash your image! Save *before* doing this!)

Debug the following, step over #unload, and during then loading happens, interrupt the process via cmd-dot:


[cid:29c3b6a6-5fdf-498d-a47b-a9dd34666273]


Please note that you will probably only have one chance to reproduce it, because the package will be cached.

If you now open a browser, for example, selecting any message will raise the #primGetPosition: failure.
However, if you continue from the interrupt, your image won't suffer consequential damages.

This is a real problem because especially on slower images<http://forum.world.st/The-Inbox-ShoutCore-ct-78-mcz-tp5109909p5110050.html>, various tests can fail and damage your image because of their timeout limits.
In a fresh (!) Trunk image, I could reproduce this several times by running MCPackageTest or MCFileInTest.
Increasing their timeouts would be a dirty workaround for the moment.
I also experienced the same problem in other projects where related MC operations were run in a timeout-limited context.

So, how can we fix it?
I assume that it is problematic if the file pointer does not get closed correctly.
Would you consider a critical block an appropriate solution to fix the issue?
But how would you write one the best way (never faced that stuff before), and doesn't this have undesirable disadvantages such as restricted debugging possibilities?

Questions over questions :-) Any help or response will be appreciated!

Best,
Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200205/9574a480/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 167911 bytes
Desc: pastedImage.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200205/9574a480/attachment-0001.png>


More information about the Squeak-dev mailing list