Today I had a very strange error in one of our development platforms:
Assume a class named "A" containing an instance method: "x:". In lots of methods I create instances of class "A" and set the attribute values via "x:" like: ^A new initialize ... ; x: aValue ; ...; yourself And ALL methods calling "x:" are now not working any more. Gemstone tells me, that x: can not be found. Executing the code in a workspace works without problems. To get rid of this error I enter the source code, add a space, recompile the method and now "x:" can be called without problems. Marten -- Marten Feldtmann _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
I could fix it via:
(SystemNavigation default sendersOf: #'x:' ) do: [:eachGSNMethod | eachGSNMethod _recompileWithSource: eachGSNMethod fullSource ] Am 15.10.2014 um 13:15 schrieb [hidden email] via Glass: > Today I had a very strange error in one of our development platforms: > > Assume a class named "A" containing an instance method: "x:". > > In lots of methods I create instances of class "A" and set the attribute > values via "x:" like: > > ^A new initialize > ... ; > x: aValue ; > ...; > yourself > > And ALL methods calling "x:" are now not working any more. Gemstone > tells me, that x: can not be found. Executing the code in a workspace > works without problems. > > To get rid of this error I enter the source code, add a space, recompile > the method and now "x:" can be called without problems. > > > Marten > > -- Marten Feldtmann _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
In reply to this post by GLASS mailing list
My suspicion is that the compiled method referred to a class A that did not have method #’x:’. How could that happen? If you had a class A but removed it and created a new A, then the compiled method would still refer to the removed class. Recompiling the method did the lookup over again and found the new A.
James On Oct 15, 2014, at 4:15 AM, [hidden email] via Glass <[hidden email]> wrote: > Today I had a very strange error in one of our development platforms: > > Assume a class named "A" containing an instance method: "x:". > > In lots of methods I create instances of class "A" and set the attribute > values via "x:" like: > > ^A new initialize > ... ; > x: aValue ; > ...; > yourself > > And ALL methods calling "x:" are now not working any more. Gemstone > tells me, that x: can not be found. Executing the code in a workspace > works without problems. > > To get rid of this error I enter the source code, add a space, recompile > the method and now "x:" can be called without problems. > > > Marten > > > -- > Marten Feldtmann > _______________________________________________ > Glass mailing list > [hidden email] > http://lists.gemtalksystems.com/mailman/listinfo/glass _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Just by chance...was A in a class hierarchy with some subclasses? was A updated from Monticello at some point? If you updated A from Monticello, did it warn you about something? On Wed, Oct 15, 2014 at 11:02 AM, James Foster via Glass <[hidden email]> wrote: My suspicion is that the compiled method referred to a class A that did not have method #’x:’. How could that happen? If you had a class A but removed it and created a new A, then the compiled method would still refer to the removed class. Recompiling the method did the lookup over again and found the new A. Mariano http://marianopeck.wordpress.com _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
In reply to this post by GLASS mailing list
* the method is there. I saw it and all code worked in a workspace in
Jade without any problems - and recompiling all methods solved the problems. The structure of the class A has not changed and is pretty old and was not updated and other methods of this class worked without problems. I see no class versions or stuff like this. Actually I had/have no idea what went wrong. I just wanted to mention it. Marten Am 15.10.2014 um 16:02 schrieb James Foster: > My suspicion is that the compiled method referred to a class A that did not have method #’x:’. How could that happen? If you had a class A but removed it and created a new A, then the compiled method would still refer to the removed class. Recompiling the method did the lookup over again and found the new A. > > James > > On Oct 15, 2014, at 4:15 AM, [hidden email] via Glass <[hidden email]> wrote: > >> Today I had a very strange error in one of our development platforms: >> >> Assume a class named "A" containing an instance method: "x:". >> >> In lots of methods I create instances of class "A" and set the attribute >> values via "x:" like: >> >> ^A new initialize >> ... ; >> x: aValue ; >> ...; >> yourself >> >> And ALL methods calling "x:" are now not working any more. Gemstone >> tells me, that x: can not be found. Executing the code in a workspace >> works without problems. >> >> To get rid of this error I enter the source code, add a space, recompile >> the method and now "x:" can be called without problems. >> >> >> Marten >> >> >> -- >> Marten Feldtmann >> _______________________________________________ >> Glass mailing list >> [hidden email] >> http://lists.gemtalksystems.com/mailman/listinfo/glass > -- Marten Feldtmann _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Okay. If you have removed all evidence of the problem then we won’t be able to do much more to diagnose it. If it happens again we can investigate it further.
James On Oct 15, 2014, at 9:23 AM, [hidden email] via Glass <[hidden email]> wrote: > * the method is there. I saw it and all code worked in a workspace in > Jade without any problems - and recompiling all methods solved the > problems. The structure of the class A has not changed and is pretty old > and was not updated and other methods of this class worked without > problems. I see no class versions or stuff like this. > > Actually I had/have no idea what went wrong. I just wanted to mention it. > > Marten > > Am 15.10.2014 um 16:02 schrieb James Foster: >> My suspicion is that the compiled method referred to a class A that did not have method #’x:’. How could that happen? If you had a class A but removed it and created a new A, then the compiled method would still refer to the removed class. Recompiling the method did the lookup over again and found the new A. >> >> James >> >> On Oct 15, 2014, at 4:15 AM, [hidden email] via Glass <[hidden email]> wrote: >> >>> Today I had a very strange error in one of our development platforms: >>> >>> Assume a class named "A" containing an instance method: "x:". >>> >>> In lots of methods I create instances of class "A" and set the attribute >>> values via "x:" like: >>> >>> ^A new initialize >>> ... ; >>> x: aValue ; >>> ...; >>> yourself >>> >>> And ALL methods calling "x:" are now not working any more. Gemstone >>> tells me, that x: can not be found. Executing the code in a workspace >>> works without problems. >>> >>> To get rid of this error I enter the source code, add a space, recompile >>> the method and now "x:" can be called without problems. >>> >>> >>> Marten >>> >>> >>> -- >>> Marten Feldtmann >>> _______________________________________________ >>> Glass mailing list >>> [hidden email] >>> http://lists.gemtalksystems.com/mailman/listinfo/glass >> > > > -- > Marten Feldtmann > _______________________________________________ > Glass mailing list > [hidden email] > http://lists.gemtalksystems.com/mailman/listinfo/glass _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
In reply to this post by GLASS mailing list
Marten, I assume that you are using 3.2.2? To get the behavior that you are describing: workspace evaluation works, pre-compiled evaluation does not; implies that an association for a new version of the class has been created. New association because the old association is embedded in the compiled method. New version of the class because the method x: is missing in the "old version" and present in the "new version". I can think of three ways that this can happen: 3. if the association is invariant, then a direct reference to the class is compiled into the method. On Wed, Oct 15, 2014 at 4:15 AM, [hidden email] via Glass <[hidden email]> wrote: Today I had a very strange error in one of our development platforms: _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
What surprises me more is the fact, that loading the Monticello packages
(several times) did not solve the problems. Is this understandable ? Marten -- Marten Feldtmann _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Marten, When Monticello packages load, the definitions in the packages are compared to the definitions in the image and only the differences are actually loaded.On Thu, Oct 16, 2014 at 1:12 AM, [hidden email] via Glass <[hidden email]> wrote: What surprises me more is the fact, that loading the Monticello packages _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Free forum by Nabble | Edit this page |