Corrupted sources file = big trouble

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Corrupted sources file = big trouble

Frank Shearar-3
So I freely confess: I should not have deleted the directory from
which I was running an image. When I saved the image, the image still
worked, but of course its changes file was broken.

I now have a few tens of hours of work in an image that I need to
extract only the following techniques all fail:
* filing out the class
* making a new changeset and filing that out
* saving the package through MC
* deleting the corrupted changes file

So one option that I don't particularly want to do is to open a new
image and hand cut-n-paste (via emacs, because on Linux the line
endings get messed up copying between Squeak images directly), method
by method, the source.

Is there an easier way of recovering from this mess?

frank

Reply | Threaded
Open this post in threaded view
|

Re: Corrupted sources file = big trouble

Max Leske
Would Tanker be an option? http://rmod.lille.inria.fr/web/pier/software/Tanker


On 15.03.2013, at 11:10, Frank Shearar <[hidden email]> wrote:

> So I freely confess: I should not have deleted the directory from
> which I was running an image. When I saved the image, the image still
> worked, but of course its changes file was broken.
>
> I now have a few tens of hours of work in an image that I need to
> extract only the following techniques all fail:
> * filing out the class
> * making a new changeset and filing that out
> * saving the package through MC
> * deleting the corrupted changes file
>
> So one option that I don't particularly want to do is to open a new
> image and hand cut-n-paste (via emacs, because on Linux the line
> endings get messed up copying between Squeak images directly), method
> by method, the source.
>
> Is there an easier way of recovering from this mess?
>
> frank
>


Reply | Threaded
Open this post in threaded view
|

Re: Corrupted sources file = big trouble

Frank Shearar-3
I'm happy to give it a try; I'd like to see Tanker running in Squeak
anyway. If it uses Monticello it might not work though. But if it
serialised the actual CompiledMethods and such it might just work.

frank

On 15 March 2013 10:21, Max Leske <[hidden email]> wrote:

> Would Tanker be an option? http://rmod.lille.inria.fr/web/pier/software/Tanker
>
>
> On 15.03.2013, at 11:10, Frank Shearar <[hidden email]> wrote:
>
>> So I freely confess: I should not have deleted the directory from
>> which I was running an image. When I saved the image, the image still
>> worked, but of course its changes file was broken.
>>
>> I now have a few tens of hours of work in an image that I need to
>> extract only the following techniques all fail:
>> * filing out the class
>> * making a new changeset and filing that out
>> * saving the package through MC
>> * deleting the corrupted changes file
>>
>> So one option that I don't particularly want to do is to open a new
>> image and hand cut-n-paste (via emacs, because on Linux the line
>> endings get messed up copying between Squeak images directly), method
>> by method, the source.
>>
>> Is there an easier way of recovering from this mess?
>>
>> frank
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Corrupted sources file = big trouble

Bob Arning-2
In reply to this post by Frank Shearar-3
Not sure what sort of failures you are seeing, but I tried to replicate anyway. I deleted the changes file, started the image, OK'd the warning and filed out a recently-added class. I got one walkback which I fixed with:

'From Squeak4.4 of 1 March 2013 [latest update: #12489] on 15 March 2013 at 7:14:23 am'!

!BasicClassOrganizer methodsFor: 'fileIn/Out'!
fileOutCommentOn: t1 moveSource: t2 toFile: t3
    | t4 |
    classComment
        ifNotNil: [t1 cr.
            t4 := RemoteString
                        newString: (classComment text ifNil: '**missing comment**')
                        onFileNumber: t3
                        toFile: t1.
            t2
                ifTrue: [classComment := t4]]! !

Otherwise, the fileout seems fine.

Cheers,
Bob

On 3/15/13 6:10 AM, Frank Shearar wrote:
So I freely confess: I should not have deleted the directory from
which I was running an image. When I saved the image, the image still
worked, but of course its changes file was broken.

I now have a few tens of hours of work in an image that I need to
extract only the following techniques all fail:
* filing out the class
* making a new changeset and filing that out
* saving the package through MC
* deleting the corrupted changes file

So one option that I don't particularly want to do is to open a new
image and hand cut-n-paste (via emacs, because on Linux the line
endings get messed up copying between Squeak images directly), method
by method, the source.

Is there an easier way of recovering from this mess?

frank





Reply | Threaded
Open this post in threaded view
|

Re: Corrupted sources file = big trouble

Max Leske
In reply to this post by Frank Shearar-3
If you try Tanker, let me know how that worked for you.


On 15.03.2013, at 11:32, Frank Shearar <[hidden email]> wrote:

> I'm happy to give it a try; I'd like to see Tanker running in Squeak
> anyway. If it uses Monticello it might not work though. But if it
> serialised the actual CompiledMethods and such it might just work.
>
> frank
>
> On 15 March 2013 10:21, Max Leske <[hidden email]> wrote:
>> Would Tanker be an option? http://rmod.lille.inria.fr/web/pier/software/Tanker
>>
>>
>> On 15.03.2013, at 11:10, Frank Shearar <[hidden email]> wrote:
>>
>>> So I freely confess: I should not have deleted the directory from
>>> which I was running an image. When I saved the image, the image still
>>> worked, but of course its changes file was broken.
>>>
>>> I now have a few tens of hours of work in an image that I need to
>>> extract only the following techniques all fail:
>>> * filing out the class
>>> * making a new changeset and filing that out
>>> * saving the package through MC
>>> * deleting the corrupted changes file
>>>
>>> So one option that I don't particularly want to do is to open a new
>>> image and hand cut-n-paste (via emacs, because on Linux the line
>>> endings get messed up copying between Squeak images directly), method
>>> by method, the source.
>>>
>>> Is there an easier way of recovering from this mess?
>>>
>>> frank
>>>
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: Corrupted sources file = big trouble

Frank Shearar-3
In reply to this post by Bob Arning-2
On 15 March 2013 11:19, Bob Arning <[hidden email]> wrote:

> Not sure what sort of failures you are seeing, but I tried to replicate
> anyway. I deleted the changes file, started the image, OK'd the warning and
> filed out a recently-added class. I got one walkback which I fixed with:
>
> 'From Squeak4.4 of 1 March 2013 [latest update: #12489] on 15 March 2013 at
> 7:14:23 am'!
>
> !BasicClassOrganizer methodsFor: 'fileIn/Out'!
> fileOutCommentOn: t1 moveSource: t2 toFile: t3
>     | t4 |
>     classComment
>         ifNotNil: [t1 cr.
>             t4 := RemoteString
>                         newString: (classComment text ifNil: '**missing
> comment**')
>                         onFileNumber: t3
>                         toFile: t1.
>             t2
>                 ifTrue: [classComment := t4]]! !
>
> Otherwise, the fileout seems fine.

OK, that looks like the same walkback I saw. To be clear, it looks
like you turned `classComment text` into `classComment text ifNil:
'**missing comment**'` ?

frank

> Cheers,
> Bob
>
> On 3/15/13 6:10 AM, Frank Shearar wrote:
>
> So I freely confess: I should not have deleted the directory from
> which I was running an image. When I saved the image, the image still
> worked, but of course its changes file was broken.
>
> I now have a few tens of hours of work in an image that I need to
> extract only the following techniques all fail:
> * filing out the class
> * making a new changeset and filing that out
> * saving the package through MC
> * deleting the corrupted changes file
>
> So one option that I don't particularly want to do is to open a new
> image and hand cut-n-paste (via emacs, because on Linux the line
> endings get messed up copying between Squeak images directly), method
> by method, the source.
>
> Is there an easier way of recovering from this mess?
>
> frank
>
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Corrupted sources file = big trouble

Bob Arning-2
right. it was trying to fetch the class comment from the now missing source file. I just gave it a fallback much like methods dropping back to t1 t2 t3 when local names are not available.

Cheers,
Bob

On 3/15/13 7:28 AM, Frank Shearar wrote:
On 15 March 2013 11:19, Bob Arning [hidden email] wrote:
Not sure what sort of failures you are seeing, but I tried to replicate
anyway. I deleted the changes file, started the image, OK'd the warning and
filed out a recently-added class. I got one walkback which I fixed with:

'From Squeak4.4 of 1 March 2013 [latest update: #12489] on 15 March 2013 at
7:14:23 am'!

!BasicClassOrganizer methodsFor: 'fileIn/Out'!
fileOutCommentOn: t1 moveSource: t2 toFile: t3
    | t4 |
    classComment
        ifNotNil: [t1 cr.
            t4 := RemoteString
                        newString: (classComment text ifNil: '**missing
comment**')
                        onFileNumber: t3
                        toFile: t1.
            t2
                ifTrue: [classComment := t4]]! !

Otherwise, the fileout seems fine.
OK, that looks like the same walkback I saw. To be clear, it looks
like you turned `classComment text` into `classComment text ifNil:
'**missing comment**'` ?

frank

Cheers,
Bob

On 3/15/13 6:10 AM, Frank Shearar wrote:

So I freely confess: I should not have deleted the directory from
which I was running an image. When I saved the image, the image still
worked, but of course its changes file was broken.

I now have a few tens of hours of work in an image that I need to
extract only the following techniques all fail:
* filing out the class
* making a new changeset and filing that out
* saving the package through MC
* deleting the corrupted changes file

So one option that I don't particularly want to do is to open a new
image and hand cut-n-paste (via emacs, because on Linux the line
endings get messed up copying between Squeak images directly), method
by method, the source.

Is there an easier way of recovering from this mess?

frank










Reply | Threaded
Open this post in threaded view
|

Re: Corrupted sources file = big trouble

Colin Putney-3
In reply to this post by Frank Shearar-3
On 2013-03-15, at 3:10 AM, Frank Shearar <[hidden email]> wrote:

> So I freely confess: I should not have deleted the directory from
> which I was running an image. When I saved the image, the image still
> worked, but of course its changes file was broken.
>
> I now have a few tens of hours of work in an image that I need to
> extract only the following techniques all fail:
> * filing out the class
> * making a new changeset and filing that out
> * saving the package through MC
> * deleting the corrupted changes file
>
> So one option that I don't particularly want to do is to open a new
> image and hand cut-n-paste (via emacs, because on Linux the line
> endings get messed up copying between Squeak images directly), method
> by method, the source.
>
> Is there an easier way of recovering from this mess?

If the image is still running (ie, you haven't shut it down since
deleting the directory) it may still have an open file descriptor for
the changes file, even though the directory entry is gone. If so, you
could write a DoIt to copy the contents to another file.

Otherwise, you'll have to rely on the decompiler.