Problems exporting code...

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Problems exporting code...

Postby jtuchel » Thu Apr 10, 2008 11:53 am

Hi

I have some strange phenomenon here. I received a .dat file from a Customer who runs VAST 7.5.2 on an XP Pro SP2 box. He exported some config maps to this .dat, just a few apps in there.
I tried importing the code into several VA ST 7.5.2 libraries, one on an XP Home SP2 box, one on Vista and one on a mac under VMware fusion. The code seems to import and load just fine, but it behaves quite strange:

One of the classes has an override of new with the obligatory ^super new initialize, and #initialize does simply one assignment to a variable: #
initialize
myDict := Dictionary new.^self

The funny thing is, if I inspect "ThisClass new" the instvar myDict is nil. The even funnier thing is: if I add a Breakpoint to #initialize, I can see the instVar being assigned a Dictionary, but the instvar remains nil.

Now comes the funny part: If I change the initialie method by entering a blank and save it, The instvar gets filled with a Dictionary, just as expected, BUT: the first time this instvar is being accessed (using an accessor which really only returns the value of the instvar), I get a debugger telling me that Dictionary *class* doesn't understand #at:ifAbsent: . Even weirder is the fact that the very same debugger shows the contents of the instvar as an empty Dictionary.

I didn't believe it, and because my first attempt was on the mac, I tried the other two machines which totally independent, local installations of VA ST 7.5.2, and they all behave the same. On our customer's machine everything works as expected.

This sounds so strange that I don't ask anybody to help directly, but maybe someone can tell me where I could look for any problems here.

Could we have one of the following problems here:
* a corrupted library at the customer's site
* a corrupted export library (we tried several exports...)
* a bug in VA ST
* any other ideas?

cu

Joachim
jtuchel
[|]
 
Posts: 245
Joined: Fri Oct 05, 2007 1:05 am
Location: Ludwigsburg, Germany

Re: Problems exporting code...

Postby jtuchel » Thu Apr 10, 2008 12:49 pm

Having played around a bit more, I found the following. The instvar had been renamed a few versions earlier.
after recompiling the methods accessing the variable, the code runs nicely in one of my images (I didn't have the time to check others as well).
So the problems seems to be related to the instance variable rename... I've never seen this before, has anybody else?
jtuchel
[|]
 
Posts: 245
Joined: Fri Oct 05, 2007 1:05 am
Location: Ludwigsburg, Germany

Re: Problems exporting code...

Postby jtuchel » Fri Apr 11, 2008 10:54 pm

Hi again,

my current suspect is the "rename instvar and accessors" refactoring. I've never before had such a problem but I also have never used this refactoring. I always used rename instvar, and renamed the accessors later on. While my customer doesn't remember whether or not he used that refactoring, he said he does use it from time to time. The editions history in the customers library suggests that instvar rename and accessor rename happened at the same time rather than a few seconds apart from each other.

Now, how would I try to find out whether this refactoring doesn't work correctly, given that the effect cannot be seen in the image in which the code was refactored... ???
jtuchel
[|]
 
Posts: 245
Joined: Fri Oct 05, 2007 1:05 am
Location: Ludwigsburg, Germany


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest