[vwnc] Exception when reloading parcel into image without sources

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

[vwnc] Exception when reloading parcel into image without sources

Terry Raymond
Our product automatically generates parcels which it loads and reloads into a
stripped image. While these parcels have the same name they may not have the
same contents. We encountered an exception when one of these parcels was reloaded.
Additionally, the stripped images have the sources discarded.

When we load the parcel we first unload it if it is in the image. It appears that when
a parcel is unloaded the system attempts to rescue the sources. It was during the
rescue the error occurred. Apparently, our pst file somehow was assigned a file index
of 1. Subsequently, when the rescue was performed it encountered a comment in a
system class whose fileIndex was 1, the *.sou file, and it attempted to read the
comment string which caused an xml parsing error because the comment did
not belong to the parcel.

Has anyone seen this sort of problem?

Terry
 
===========================================================
Terry Raymond
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
<http://www.craftedsmalltalk.com>
===========================================================


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Exception when reloading parcel into image without sources

James Robertson-7
I'm not sure why you unload first; I've found reloading to have been  
pretty stable since at least 7.4.  As to source code, I find it useful  
to ignore that exception when loading into a runtime:

[[| pcl |
                pcl := Parcel loadParcelFrom: parcelFile.
                pcl definedClasses do: [:each | each flushVMmethodCache]]
                        on: Parcel parcelAlreadyLoadedSignal, CodeStorageError,  
MissingParcelSource
                        do: [:ex | ex resume: true]]
                                on: DuplicateBindingsError
                                do: [:ex | ex resume]


James Robertson
Cincom Smalltalk Product Evangelist
http://www.cincomsmalltalk.com/blog/blogView
Talk Small and Carry a Big Class Library




On Apr 8, 2009, at 9:49 AM, Terry Raymond wrote:

> Our product automatically generates parcels which it loads and  
> reloads into a
> stripped image. While these parcels have the same name they may not  
> have the
> same contents. We encountered an exception when one of these parcels  
> was reloaded.
> Additionally, the stripped images have the sources discarded.
>
> When we load the parcel we first unload it if it is in the image. It  
> appears that when
> a parcel is unloaded the system attempts to rescue the sources. It  
> was during the
> rescue the error occurred. Apparently, our pst file somehow was  
> assigned a file index
> of 1. Subsequently, when the rescue was performed it encountered a  
> comment in a
> system class whose fileIndex was 1, the *.sou file, and it attempted  
> to read the
> comment string which caused an xml parsing error because the comment  
> did
> not belong to the parcel.
>
> Has anyone seen this sort of problem?
>
> Terry
>
> ===========================================================
> Terry Raymond
> Crafted Smalltalk
> 80 Lazywood Ln.
> Tiverton, RI  02878
> (401) 624-4517      [hidden email]
> <http://www.craftedsmalltalk.com>
> ===========================================================
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Exception when reloading parcel into image withoutsources

Terry Raymond
Well, I see two errors here.

1. When sources are discarded all references of the discarded
   file index should be nilled out, unless the file name is set
   to #decompile. But in any case comment pointers should be nilled.

2. The system assumes that file index 1 is the 'sources' file and
   index 2 is the 'changes' file. These indexes should not be
   available for any other use if the default files have been
   discarded.

Terry
 
===========================================================
Terry Raymond
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
<http://www.craftedsmalltalk.com>
===========================================================
-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of James Robertson
Sent: Wednesday, April 08, 2009 10:05 AM
To: VW NC
Subject: Re: [vwnc] Exception when reloading parcel into image withoutsources

I'm not sure why you unload first; I've found reloading to have been  
pretty stable since at least 7.4.  As to source code, I find it useful  
to ignore that exception when loading into a runtime:

[[| pcl |
                pcl := Parcel loadParcelFrom: parcelFile.
                pcl definedClasses do: [:each | each flushVMmethodCache]]
                        on: Parcel parcelAlreadyLoadedSignal, CodeStorageError,  
MissingParcelSource
                        do: [:ex | ex resume: true]]
                                on: DuplicateBindingsError
                                do: [:ex | ex resume]


James Robertson
Cincom Smalltalk Product Evangelist
http://www.cincomsmalltalk.com/blog/blogView
Talk Small and Carry a Big Class Library




On Apr 8, 2009, at 9:49 AM, Terry Raymond wrote:

> Our product automatically generates parcels which it loads and  
> reloads into a
> stripped image. While these parcels have the same name they may not  
> have the
> same contents. We encountered an exception when one of these parcels  
> was reloaded.
> Additionally, the stripped images have the sources discarded.
>
> When we load the parcel we first unload it if it is in the image. It  
> appears that when
> a parcel is unloaded the system attempts to rescue the sources. It  
> was during the
> rescue the error occurred. Apparently, our pst file somehow was  
> assigned a file index
> of 1. Subsequently, when the rescue was performed it encountered a  
> comment in a
> system class whose fileIndex was 1, the *.sou file, and it attempted  
> to read the
> comment string which caused an xml parsing error because the comment  
> did
> not belong to the parcel.
>
> Has anyone seen this sort of problem?
>
> Terry
>
> ===========================================================
> Terry Raymond
> Crafted Smalltalk
> 80 Lazywood Ln.
> Tiverton, RI  02878
> (401) 624-4517      [hidden email]
> <http://www.craftedsmalltalk.com>
> ===========================================================
>
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc