the mooc is a mine for Pharo bugs...

In the video at 6:12, we have a new method sending the new message. I've made similar mistakes and Pharo does lock up, but then the operating system (Windows 10) kills the Pharo VM. (Or perhaps there's a bug in Pharo itself which just crashes the whole VM. I can't tell the difference.) Is that because it's a memory leak? Does the VM have a fixed amount of memory available, or can it request more from the OS?
Is there a way to recover from this error without killing the whole VM?
Most GUI systems I've used have at least two threads so that pushing a button doesn't lock up the whole UI if the task takes a while. Does Pharo always lock up for long-running tasks, or does it have some kind of threading ability too? If a background thread gets in an infinite loop, how do you kill it without killing the whole VM?


here was my answer

The real answer is a bit more complex so I may write some approximations: - what you did a really tight loops that fills up the memory really fast. - depending on the OS the VM can or not (in its current state) allocate more. In some versions it has to preallocate. "Most GUI systems I've used have at least two threads so that pushing a button doesn't lock up the whole UI if the task takes a while. Does Pharo always lock up for long-running tasks, or does it have some kind of threading ability too? If a background thread gets in an infinite loop, how do you kill it without killing the whole VM?" Pharo has a full model for concurrent programming. Check the class Process, Semaphore. We have some stress tests that create thousands of threads without problems. You have also package such TaskIt to schedule tasks Now the actual problem that you see and that I would love to see fix in the future is that the code you execute is run in the UI thread (arghhhhh) It is still like that for historical reason. We should do one pass on that but this is not that simple because it will raise a couple of bugs.


Now I think that it would be great if people from the pharo core would browse in diagonal the problems that students

encounter because there are our real customers and they show many problems of the system. Especially the ones we do not see anymore.


Reply via email to