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

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Thu Feb 6 19:16:20 UTC 2020


System-ct.1136 should fix the original issue. However, interrupting this operation via cmd+dot still leads to failures. Do we want to fix this?

Once I stumbled about some comment in Squeak that expressed the wish to have a UserInterruptException. Spoken generally, is this wish consensus and still up to date?

One could argue that is is not useful to debug a method in a state at which a big part of usual Squeak features is disabled. In the given example, you cannot even expand the debugger without dealing with decompiler errors raised by Shout.

One could also argue that each time we catch a UserInterruptException (though this should be really few occurrences) to prevent the handled code being interrupted we also disable advanced users to explore the details of this behavior interactively.

The original example that proposed the UserInterruptException was Debugger >> runUntil. In this example, UserInterruptException could be used to hide the bytecode implementation against the inexperienced user.

Maybe the usage of such a UserInterruptException could be stuff for another preference?


Looking forward to your opinions!


Best,

Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Thiede, Christoph
Gesendet: Mittwoch, 5. Februar 2020 13:18 Uhr
An: Squeak Dev
Betreff: [squeak-dev] [BUG] MultiByteFileStream(Object)>>error: primGetPosition: failed


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/20200206/380722c3/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/20200206/380722c3/attachment-0001.png>


More information about the Squeak-dev mailing list