Image corrupted after longer coding session - smalltalk

i'm rather new to pharo and I just started another new pharo project (on version 9) and lost my image as the process crashed upon saving.
I cant even load the image anymore.
I have all the changes still in the .changes file, is there any way to file in .changes files into a new image or have Epicea apply those changes?
I can of course manually copy paste all my changes, but that would be a pain with 1500+ lines of unsaved changes.
Happy about any solutions :)

In pharo-local/ombu-sessions you'll find the epicea change stored as ombu files. You can use the code changes browser to load them. If you select the directory of them of the crashed process (of course make a backup copy first) you can apply the changes you want

Related

Need to save twice with guard and livereload

When I save changes to a html file, the browser refreshes the page quickly and correctly. The first time I save changes to a scss file, the page starts to reload, but stops without loading any of the style sheets (although it does load images). If I save it a second time, the page reloads fully. Thereafter, most I only need one save. However, sometimes I have to do a second save in order to get it working properly again.
I am running rails v4.2.5.1, guard v2.13.0, guard-livreload v2.5.1, chrome browser v48 with livereload extensions 2.1.0.
It turned out that when I upgraded by hard drive from a mechanical to a SSD drive, this problem stopped occuring. Maybe something was timing out.
Best to open issues like that in guard-livereload. There are lots of moving parts here. And there are debugging options on both sides.
If an SSD drive fixed things, your editor may have had a lot of plugins activated during save - and if the "total save time" is longer for multiple files, things can get wacky. It could be lots of issues, so it's best to open an issue and ask for help. (There are debugging tutorials in Wikis too).

vwnt pop up in smalltalk

When I try to open my smalltalk project file vwnt pops up. The project wont open. I did save the project properly last time I was working on it. Please help if anyone know how to resolve this issue.
what do you mean by smalltalk project files? VisualWorks doesn't have anything like that. What it has is an .im and .cha file. the .im file is the image, which contains VisualWorks and all the changes you did to it. So when you open the .im file, it'll open VisualWorks. You create classes and methods in VisualWorks and by doing so you modify the whole system. When you save the image, the whole VisualWorks system gets persisted and when you open the image file again, the system is restored.
The .cha file is a text file that contains all the changes that you did to the image.

Using Preview on Mac, why does simply saving a PDF over itself with no changes made completely change the file's contents?

I have a 3 page PDF file open in Preview on the Mac. If I make no changes to the file, hit cmd-s and save the file, the binary content of the file changes heavily. Why is this?
I can tell this is the case because of my process:
make a duplicate copy of a pdf (cp a.pdf b.pdf)
vimdiff a.pdf b.pdf (no changes, exactly the same content)
open a.pdf in Preview (make no edits)
vimdiff a.pdf b.pdf (no changes, exactly the same content)
hit cmd-s (save pdf)
vimdiff a.pdf b.pdf (tons of changes, well beyond the pdf's meta-data)
Can anyone explain why/how a PDF gets "re-written" even though no changes were made?
Indeed, Preview heavily re-writes any PDF that was initially created by any non-Quartz application upon saving it for the first time.
I earn (part of) my living with debugging PDFs.
And I made it a habit now to never-ever respond to a customer with suggestions how to fix any (even the most simple) reported problem as soon as I discover the provided sample PDF has been touched by Quartz (fortunately, Apple admits its involvement by updating the /Producer metadata key with Mac OS X 10.7.4 Quartz PDFContext or similar):
because I never know if this PDF was the original PDF that exhibited the described problem, or if the customer was just trying to mail the original problem PDF via his MacBook and unintentionally re-saved + re-wrote the PDF when operating his mail app.
Therefor I always need to first establish a procedure with Apple customers which guarantees I get to analyze the original PDF files exhibiting a particular bug or problem, not the ones which where spoiled by Quartz/Preview. I've mis-spend quite some man days of work on 'analyzing' the wrong files before I discovered the problem about a year ago....
A lot of True Believers of the Apple Cult are not aware of this behavior, and a lot of prepress Pros are also completely clueless about it.
When saving a PDF the second time, chances are, that only the /ModDate metadata key is s updated (unless you're using a new version of Quartz on your Mac)... but you never know until you take a really really close look at the PDFs in question.
Update (with some additional info)
BTW, for me the simple hit on [cmd]+[s] does not yet change the PDF. But I'm on Mac OS X Lion 10.7.4, with Preview.app Version 552 (719.23). On Lion the change is triggered by saving the file under a new name (Duplicate => Save...).
k00k seems to be on Mac OS X Mountain Lion 10.8.1, with Preview.app Version 6.00 (765). For him a simple hit on [cmd]+[s] suffices to trigger the change.
(I'm not saying that the changes Apple makes to Preview-ed PDF files are necessarily bad. In quite some cases this may silently 'repair' damaged files and could be argued to be 'user-friendly' behavior. -- What I'm saying is that there are changes (whether for the good or for the bad is irrelevant) which go beyond metadata-stamping a new /ModDate value into the file, and which can make troubleshooting PDF problems very painful...)
I do not have the source code of the Preview application, so I cannot say for sure. I can guess that they are not just saving the same data that was loaded, instead it seems they are re-constructing an "equivalent" PDF file.
Additionally, when a PDF file is "re-created", there are a few items inside that will always be different (unique IDs, last date/time modification, etc).

Squeak Win 7 Error: No content to install

So I decided to take a look at Smalltalk. Googling led me to Squeak and Squeak By Example. Squeak By Example tells me to drag the .image file onto the Squeak.exe icon. I do this and get an error:
"Error: No content to install"
If I load squeak.exe by itself, no error message occurs. I assume this is because it uses the image file that was included in the download from squeak.org instead of the on I'm trying to use. I've verified that the .image and .changes files are not read only and are unblocked (you know, that little button that exists on the properties dialog of a file that was downloaded from the internet).
Squeak version: Squeak-4.2-All-in-One
SBE: 1.3
What's next?
Edit:
Proceeding with the book a bit, I got to the part where you save the environment, then try to open your recently saved image. I got the same error. So it must be an issue with how I'm opening it, or an permissions thing or something. I made sure both my user and the system user have full control over the image and changes files. I also tried forcing squeak.exe to run as administrator. Still having problems.
Saving the default image while exiting instead of a save-as and simply loading squeak.exe (and the default image) worked without error. I'll look at it some more later.
It seems that when an ImageFile is specified in Squeak.ini (as is the case in Squeak-4.2-All-in-One) that image file is always used. And if you pass a file as an argument to Squeak.exe (or drag and drop it) that file is passed to the image as a source file to be executed instead.
If you want to open an image file by dropping it on the Squeak.exe icon remove the ImageFile directive from Squeak.ini

Xcode snapshots

What exactly does Xcode do with project snapshots after the Xcode project is moved or renamed. I have noticed they completely disapear...Where should I look?
Defintely not in ~/Library/Application Support/Developer/Shared/SnapshotRepository.sparseimage
~/Library/Application Support/Developer/Shared/SnapshotRepository.sparseimage is a disk image. You have to mount it and look in there.
Snapshots are stored based on a hash of the project name; change the project name and you lose the snapshot history. If you take a snapshot of the new project, and can find the old snapshot on the disk image, you can probably move the old snapshot into the new one's directory.
If they are not in ~/Library/Application Support/Developer/Shared/SnapshotRepository.sparseimage then I think you may be out of luck. I tend to rely on snapshots only as a first line of defence, with Time Machine as a more reliable second line, and then SCM and proper backups as the third and fourth.
They are inside the image allright... but making so that Xcode will recognize them won't be that easy...
In that image, you have the folder with all the snapshots (with some hierarchy)... and a plist file... in that plist file they have a HARDCODED (non relative to project file) paring system between each snapshot and the ORIGINAL PATH of the project folder.
So, if you really want to move/rename yar project, you'll need to change ALL the paths in that little plist file...
P.S.
if you're gonna do the changes, you might wanna close Xcode before you do... it might make him angry... :P
Another thing you should be aware of:
If you open and mount ~/Library/Application Support/Developer/Shared/SnapshotRepository.sparseimage as a disk image and then start Xcode to recover or look into your snapshots Xcode will complain that the Snapshot Repository is broken and move it into the Trash!
So remember to unmount the repository before starting Xcode.
To recover a trashed Snapshot Repository just drag it into the correct path (see above) and remove the date stamp inside the filename.
I ran in to this issue having renamed the App and if I renamed it back to the original, quit Xcode and reopened it the restores were available again.