Question

I have a new Pharo 1.3 image, that I've just loaded with SS, DBX, and my apps. I'm using the latest Cog VM on OSX10.6. The VM crashed randomly, and when I tried to restart the image, it exits immediately. The stack trace shows my app getting an error reading an open socket, that of course, no longer exists.

What I would like to know, is there a way to pass a script or command line option, and have Pharo bypass my app and startup? I think I know exactly where in my code that I need to change, so even if I could filein (from the command line) a patch, that would work too.

Basically, what I need is a safe mode to boot the image, and manipulate code, save and restart normally.

Was it helpful?

Solution

You can try passing a .st file to the image. However, the offending code may be executed before the file is processed (all the startup methods are executed before processing the argument). In this case, your only option is to build a debug VM. After you manually edit the VM or use gdb to avoid executing your socket code, fix the code in the now-running image and save. Then you'll be able to run it on a regular VM. For building a VM, see Mariano Martinez Peck's excellent posts/screencasts like this one. Also, see this thread on the Pharo list about my experience doing this.

n.b. this may take quite a while, so consider the tradeoff with simply starting a new image.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top